Making Emacs Work For Me

Reference:
http://zeekat.nl/articles/making-emacs-work-for-me.html#sec-1

第一步:Install GNU Emacs 24 or higher

第二步:Install Cask from https://github.com/cask/cask
1)执行以下命令

$ curl -fsSkL https://raw.github.com/cask/cask/master/go | python
编译完成后有以下提示

Successfully installed Cask! Now, add the cask binary to your $PATH:
export PATH="/home/xxx/.cask/bin:$PATH"

2)根据其要求执行 (请根据自己的系统配置xxx替换为自己的用户名)

$ export PATH="/home/xxx/.cask/bin:$PATH"

 

第三步: Clone the repository as $HOME/.emacs.d

如果存在~/.emacs.d 目录,先将其删除
$ git clone https://github.com/joodie/emacs-literal-config.git
$ mv emacs-literal-config .emacs.d

 

第四步:Run cask install in $HOME/.emacs.d

$ cd ~/.emacs.d
$ cask install

 

遇到的问题1:

$ cask install
Traceback (most recent call last):
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)

解决方法:

修改 .cask/bin/cask,在其中加入编码设定

default_encoding = 'utf-8'
if sys.getdefaultencoding() != default_encoding:
    reload(sys)
    sys.setdefaultencoding(default_encoding)

 

详细如下图:

Making Emacs Work For Me_第1张图片

 

第五步:运行emacs

你可能感兴趣的:(emacs)