[英]Emacs: can't open load file for windows.el, possible char encoding error
I am trying to install Windows Mode
from here: http://www.emacswiki.org/emacs/WindowsMode and I am having issues with loading the windows.el
file upon initialization, where the minibuffer tells me Cannot open load file: windows
. 我正在尝试从此处安装
Windows Mode
: http : windows.el
并且初始化时加载windows.el
文件时出现问题,微型缓冲区告诉我Cannot open load file: windows
。 After saving the file, I added this to my init file: 保存文件后,将其添加到我的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)
And here is where I saved the file: 这是我保存文件的位置:
[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
I suspect the character encoding, which is listed at the top of the windows.el
file (full file on the link) as -*- coding: euc-jp -*-
. 我怀疑字符编码在
windows.el
文件(链接上的完整文件)的顶部列出为-*- coding: euc-jp -*-
。 Initially saving this file gave me an error (see below), prompting me to specify the encoding. 最初保存此文件给我一个错误(请参阅下文),提示我指定编码。 I tried saving the file as
euc-jp
then again as utf-8
, but I still get the Cannot open load file...
error. 我尝试将文件另存为
euc-jp
然后再次另存为utf-8
,但仍然出现Cannot open load file...
错误。
Here is the message that I get when trying to save: 这是我尝试保存时收到的消息:
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
Assuming that the encoding is the source of the problem, how can I setup my emacs to be compatible with these encodings? 假设编码是问题的根源,我如何设置我的emacs与这些编码兼容?
load-path
is a list of directories in which to look for elisp libraries. load-path
是在其中寻找elisp库的目录的列表。
Use this: 用这个:
(add-to-list 'load-path (expand-file-name "~/workspace/emacs/.emacs.d/elisp"))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.