• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

xyguo/emacs.d: My emacs config file with support for C/C++, Matlab, Haskell, LaT ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

xyguo/emacs.d

开源软件地址(OpenSource Url):

https://github.com/xyguo/emacs.d

开源编程语言(OpenSource Language):

Emacs Lisp 97.2%

开源软件介绍(OpenSource Introduction):

A usable emacs config

This is my emacs configuration tree which originates from that of Purcell's. But I eliminated many functions of that.

This config now supports for the following:

  • C/C++
  • Matlab
  • Markdown/LaTeX
  • Haskell

Requirements

These are requirements that must be met:

  • Emacs 24.4.1 or greater
  • git 1.9.4 or greater

and these are not necessary if you don't use that language

  • clang 3.2-10 or greater (for C/C++, necessary for auto-complete-clang)
  • ghci 7.10.1 or greater (for Haskell)

Enable TLS for securely connecting to ELPA

ELPA is accessed over HTTP by default, which may result in security problems, so I prefer to use HTTPS instead. This can be done simply by replace the "http" in ELPA repository addresses with "https", and turn on the TLS checking.

By default, both HTTPS and TLS checking are disabled. If you do like to turn them on (and I recommend you to), then the following requirements must be met:

  • remove the comment before (require 'init-security) line in init.el
  • gnutls 3.4 or greater
  • The certifi package from pypi (pip install certifi)

More detailed description can be found in this article.

Installation

To install, clone this repo to ~/.emacs.d, i.e. ensure that the init.el contained in this repo ends up at ~/.emacs.d/init.el:

git clone https://github.com/xyguo/emacs.d.git ~/.emacs.d

Upon starting up Emacs for the first time, further third-party packages will be automatically downloaded and installed.

Update

Update the config with git pull. You'll probably also want/need to update the third-party packages regularly too:

M-x package-list-packages, then U followed by x.

Troubleshooting

"Symbol's function definition is void: XXX" or "Package XXX is not available for installation"

Errors of this type are mostly caused by obsolete package or outdated Emacs version. Thus, when you encounter such errors, first check that your Emacs' version has satisfied the requirement listed above in section "Requirements", if so, do the following:

Execute Emacs with the --debug-init option, i.e.
$ emacs --debug-init
Read the debugging info, it usually begins with something like

Debugger entered--Lisp error: (void-function XXX) ... (the unfoldded calling stack)

Now you have some choices:
  • File an issue and I'll help you deal with that.
  • (A quick-and-dirty way, not recommended) Most times you can just comment out the corresponding line (which can be found through the debugging info) in the init.el file to bypass the initialization step that triggers the problem.
  • Sometimes, a package maintainer decides to change the package's name, which results in a "package not available" error. You can simply Google for the unavailable package's name and if lucky you'll find its new name. After that, file an issue and I'll be glad to fix the init files.

auto-complete-clang

Note that the ac-clang-flags set in init-ac-source.el is platform-dependent. It's actually clang's include file search path. According to the Troubleshooting section of auto-complete-clang, you can use the following method to find the correct path:

echo "" | g++ -v -x c++ -E -

and you'll get something like this:

#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.8
 /usr/include/x86_64-linux-gnu/c++/4.8
 /usr/include/c++/4.8/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

Just use them to replace the corresponding string.

Support/issues

If you hit any problems, please

  1. Check that whether you have met system requirements listed in section "Requirements".
  2. Ensure that you are using the latest version of this code, and that you have updated your packages to the most recent available versions (see "Updates" above).
  3. If you still experience problems, go ahead and file an issue.

-Xiang-Yu Guo




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap