Emacs:can';无法打开windows.el的加载文件,可能存在字符编码错误
我正在尝试从此处安装Emacs:can';无法打开windows.el的加载文件,可能存在字符编码错误,emacs,encoding,Emacs,Encoding,我正在尝试从此处安装Windows模式:初始化时加载Windows.el文件时遇到问题,其中微型缓冲区告诉我无法打开加载文件: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-ag
Windows模式
:初始化时加载Windows.el
文件时遇到问题,其中微型缓冲区告诉我无法打开加载文件: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
文件(链接上的完整文件)顶部的字符编码是-*-编码:euc jp-*-
。最初保存此文件时出现错误(请参见下文),提示我指定编码。我尝试将文件保存为euc-jp
,然后再次保存为utf-8
,但仍然出现无法打开加载文件…
错误
以下是我在尝试保存时收到的消息:
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使其与这些编码兼容
加载路径
是要在其中查找elisp库的目录列表
使用以下命令:
(添加到列表的加载路径(展开文件名“~/workspace/emacs/.emacs.d/elisp”))
< /代码>作为替代方案,您可以考虑使用Emacs 24.4(或者DEV快照,直到很快发布)。您可以使用Emacs桌面保存和恢复帧和窗口配置。没有台式机,你也可以这样做。