我正在尝试从此处安装Windows Mode
:http://www.emacswiki.org/emacs/WindowsMode我在初始化时加载windows.el
文件时遇到问题,迷你缓冲区告诉我Cannot open load file: windows
。保存文件后,我将其添加到我的init文件中:
(add-to-list 'load-path "~/workspace/emacs/.emacs.d/elisp/windows.el")
(require 'windows)
(win:startup-with-window)
(define-key ctl-x-map "C" 'see-you-again)
这是我保存文件的地方:
[lucas@lucas-ThinkPad-W520]~/workspace/emacs/.emacs.d/elisp$ ls -la
total 296
drwxr-xr-x 4 lucas lucas 4096 Apr 20 01:06 .
drwxr-xr-x 14 lucas lucas 4096 Apr 20 01:14 ..
-rw-r--r-- 1 lucas lucas 31502 Mar 29 21:40 multi-term.el
-rw-r--r-- 1 lucas lucas 35201 Apr 20 01:01 revive.el
drwxr-xr-x 3 lucas lucas 4096 Mar 9 14:57 theme-changer
drwxr-xr-x 3 lucas lucas 4096 Mar 29 01:05 themes
-rw-r--r-- 1 lucas lucas 115222 Apr 20 01:06 windows2.el
-rw-r--r-- 1 lucas lucas 96830 Apr 20 01:01 windows.el
我怀疑字符编码在windows.el
文件的顶部(链接上的完整文件)列为-*- coding: euc-jp -*-
。最初保存此文件给了我一个错误(见下文),提示我指定编码。我尝试将文件保存为euc-jp
,然后再次保存为utf-8
,但我仍然收到Cannot open load file...
错误。
以下是我在尝试保存时收到的消息:
These default coding systems were tried to encode text
in the buffer `windows2.el':
(japanese-iso-8bit-unix (13580 . 65533) (13581 . 65533) (13582
. 65533) (13583 . 65533) (13584 . 65533) (13585 . 65533) (13586
. 65533) (13587 . 65533) (13588 . 65533) (13589 . 65533) (13590
. 65533))
However, each of them encountered characters it couldn't encode:
japanese-iso-8bit-unix cannot encode these: � � � � � � � � � � ...
Click on a character (or switch to this window by `C-x o'
and select the characters by RET) to jump to the place it appears,
where `C-u C-x =' will give information about it.
Select one of the safe coding systems listed below,
or cancel the writing with C-g and edit the buffer
to remove or modify the problematic characters,
or specify any other coding system (and risk losing
the problematic characters).
utf-8 gb18030 utf-7 utf-16 utf-16be-with-signature
utf-16le-with-signature utf-16be utf-16le iso-2022-7bit utf-8-auto
utf-8-with-signature utf-7-imap utf-8-emacs
假设编码是问题的根源,我如何设置我的emacs以与这些编码兼容?
答案 0 :(得分:1)
load-path
是目录的列表,可在其中查找elisp库。
使用此:
(add-to-list 'load-path (expand-file-name "~/workspace/emacs/.emacs.d/elisp"))