[问题] emacs 23启动 .emacs 文件出错 。

Vim、Emacs配置和使用
codycody23
帖子: 167
注册时间: 2008-06-19 15:27

[问题] emacs 23启动 .emacs 文件出错 。

#1

帖子 codycody23 » 2008-08-18 16:10

emacs 启动 .emacs 文件出错
ubuntu8.04,我的是emacs23,扩展包是:color-theme-6.6.0
我是按照这个 http://aifreedom.com/technology/59 操作的,看了置项的,按照置项的配置 错误也一样

.emacs的配置:
////////////////////
mojian@ubuntu:~$ gedit .emacs

----------------------------
(set-default-font "courier 10 pitch-12")
(set-fontset-font "fontset-default"
'han '("WenQuanYi Bitmap Song" . "unicode-bmp"))
(set-fontset-font "fontset-default"
'cjk-misc '("WenQuanYi Bitmap Song" . "unicode-bmp"))
(set-fontset-font "fontset-default"
'bopomofo '("WenQuanYi Bitmap Song" . "unicode-bmp"))
(set-fontset-font "fontset-default"
'gb18030 '("WenQuanYi Bitmap Song". "unicode-bmp"))
(set-fontset-font "fontset-default"
'symbol '("WenQuanYi Bitmap Song". "unicode-bmp"))
(add-to-list 'default-frame-alist '(font . "courier 10 pitch-12"))

(add-to-list 'load-path "~/color-theme-6.6.0")
;(require 'color-theme) ;-------》 这里注释掉这个选项 启用 “.emacs-color-theme“
(load-file "~/.emacs-color-theme")
(my-color-theme)
-----------------------------

////////////////////////////////

启动emscs:
emacs显示
----------------------
Loading 00debian-vars...
No /etc/mailname. Reverting to default...
Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/50autoconf.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Skipping dictionaries-common setup for emacs-snapshot
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...
Loading cjk-enc...done
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done


An error has occurred while loading `/home/mojian/.emacs':

File error: Cannot open load file, /home/mojian/.emacs-color-theme


To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.

For information about GNU Emacs and the GNU system, type C-h C-a


///////////////////////////

我的配置文件在~/下面都有,为什么 .emacs 打不开?

mojian@ubuntu:~$ cd ~
mojian@ubuntu:~$ ls -a
. .google .sudo_as_admin_successful
.. .gstreamer-0.10 .sudoku
.adobe .gtk-bookmarks .Tencent
.bash_history .gvfs .themes
.bash_logout .ICEauthority .thumbnails
.bashrc .icons .update-manager-core
.cache .kde .update-notifier
.chewing .local .wapi
color-theme-6.6.0 .macromedia wget-log
.config .mcop .Xauthority
.DCOPserver_ubuntu__0 .mcoprc .xine
.DCOPserver_ubuntu_:0 mc.txt .Xresources
.dmrc .metacity ..Xresources
.emacs .mozilla .Xresources~
.emacs~ .mplayer .xsession-errors
emacs-color-theme .nautilus 公共的
.emacs.d .profile 模板
.esd_auth .pulse 视频
Examples .pulse-cookie 图片
.gconf .qt 文档
.gconfd .recently-used.xbel 新文件~
.gksu.lock .scim 音乐
.gnome2 .smplayer 桌面
.gnome2_private .ssh
.gnupg .stardict
mojian@ubuntu:~$[/url]
上次由 codycody23 在 2008-08-18 16:49,总共编辑 4 次。
头像
jarodlau
帖子: 501
注册时间: 2005-09-06 20:34
联系:

#2

帖子 jarodlau » 2008-08-18 16:14

6.6版本的color theme插件在emacs 23(emacs cvs)版本里一直又这样的问题
codycody23
帖子: 167
注册时间: 2008-06-19 15:27

#3

帖子 codycody23 » 2008-08-18 16:30

jarodlau 写了:6.6版本的color theme插件在emacs 23(emacs cvs)版本里一直又这样的问题
我设的load path 是 ~/color-theme-6.6.0 是在这个文件里


而 emacs 在 直接在~/下面 是不是两个 路径 不一样造成的


下面是ls
color-theme-6.6.0 文件里面的 情况:

代码: 全选


mojian@ubuntu:~$ cd color-theme-6.6.0/
mojian@ubuntu:~/color-theme-6.6.0$ ls
AUTHORS      ChangeLog                 color-theme.elc  HACKING        README
BUGS         color-theme-autoloads.in  configure-stamp  Makefile       themes
build-stamp  color-theme.el            COPYING          Makefile.defs


mojian@ubuntu:~/color-theme-6.6.0$ ls -a
.        build-stamp               color-theme.elc  Makefile
..       ChangeLog                 configure-stamp  Makefile.defs
AUTHORS  color-theme-autoloads.in  COPYING          README
BUGS     color-theme.el            HACKING          themes
mojian@ubuntu:~/color-theme-6.6.0$ 
[/code]
codycody23
帖子: 167
注册时间: 2008-06-19 15:27

#4

帖子 codycody23 » 2008-08-18 16:35

jarodlau 写了:6.6版本的color theme插件在emacs 23(emacs cvs)版本里一直又这样的问题
就算color theme 出错 为什么 load .emacs 时也出错?


An error has occurred while loading `/home/mojian/.emacs'


[/code]
头像
jarodlau
帖子: 501
注册时间: 2005-09-06 20:34
联系:

#5

帖子 jarodlau » 2008-08-18 16:39

加载color theme难道不是加载emacs么?

color theme也是你emacs配置文件的一部分啊

你可以把加载color theme那一部分,暂时注释掉

等你启动了emacs,再加载color theme试验一下

有耐心就自己hack一下
codycody23
帖子: 167
注册时间: 2008-06-19 15:27

#6

帖子 codycody23 » 2008-08-18 17:05

hack。。。。。。。。。。。。。。。。。 :oops:
codycody23
帖子: 167
注册时间: 2008-06-19 15:27

#7

帖子 codycody23 » 2008-08-18 17:09

hack。。。。。。。。。。。。 :oops:
头像
jarodlau
帖子: 501
注册时间: 2005-09-06 20:34
联系:

#8

帖子 jarodlau » 2008-08-18 17:10

codycody23 写了:hack。。。。。。。。。。。。。。。。。 :oops:
(add-to-list 'load-path "~/color-theme-6.6.0")
;(require 'color-theme) ;-------》 这里注释掉这个选项 启用 “.emacs-color-theme“
(load-file "~/.emacs-color-theme")
(my-color-theme)

要注释就都注释掉
desperadoshaw
帖子: 12
注册时间: 2006-08-08 21:33

#9

帖子 desperadoshaw » 2008-09-12 8:42

应该是加载的路径不对吧,我的配置
(add-to-list 'load-path "~/.emacs.d/elisp/color-theme-6.6.0")
(require 'color-theme)
(color-theme-initialize)
(color-theme-blue-mood)

应该能用的
codycody23
帖子: 167
注册时间: 2008-06-19 15:27

#10

帖子 codycody23 » 2008-09-14 12:51

emacs 23 试了 6.5版本的color-theme.el 也是加载出错

只能在tools那里手工选择配置方案 不能自动加载。。。。。。。。。。


有谁用emacs23成功的配置自动加载配色方案成功的吗?
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#11

帖子 BigSnake.NET » 2008-09-14 12:53

File error: Cannot open load file, /home/mojian/.emacs-color-theme

很明显没有这个文件嘛
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
codycody23
帖子: 167
注册时间: 2008-06-19 15:27

#12

帖子 codycody23 » 2008-09-14 13:00

试了几次了 你们都是能正常自动加载配色方案吗?


ubuntu8.03+emacs23:

我安装color-theme6.6 或者是6.5都无法自动加载选择的配色方案

老是提示加载文件出错, 有谁成功过的吗?

我直接将color-theme文件解压放在~/下,
然后.emacs配置命令:

代码:
-----------------------------

(load-file "~/color-theme.el")
(require 'color-theme)
(color-theme-gnome2)-------->>gnome2这个是color-theme自选的配色方案

------------------------------
codycody23
帖子: 167
注册时间: 2008-06-19 15:27

#13

帖子 codycody23 » 2008-09-14 13:14

png~~~~~~~~~~~~~~~~~~~~~~~~~~

试了几次了 你们都是能正常自动加载配色方案吗?


ubuntu8.03+emacs23:

我安装color-theme6.6 或者是6.5都无法自动加载选择的配色方案

老是提示加载文件出错, 有谁成功过的吗?

我直接将color-theme文件解压放在~/下,
然后.emacs配置命令:

代码:
-----------------------------------

(load-file "~/color-theme.el")
(require 'color-theme)
(color-theme-gnome2)-------->>gnome2这个是color-theme自选的配色方案,可以自选别的.

-----------------------------------
emacs启动信息一闪而过,不知在那里可以找到只能瞬间截个图了:(

图片

图片
附件
Screenshot.png
上次由 codycody23 在 2008-09-14 13:34,总共编辑 1 次。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#14

帖子 BigSnake.NET » 2008-09-14 13:20

color-theme.el 每这个文件嘛
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
codycody23
帖子: 167
注册时间: 2008-06-19 15:27

#15

帖子 codycody23 » 2008-09-14 13:35

BigSnake.NET 写了:color-theme.el 每这个文件嘛
在/home/mojian下啊~~~~~~~


ls 给你看:

代码: 全选

mojian@ubuntu:~$ ls -l
总用量 20084
-rw-r--r-- 1 mojian mojian  147629 2008-09-14 01:35 2008-09-14-013552_1280x952_scrot.png
-rw-r--r-- 1 mojian mojian   78633 2008-09-14 13:29 2008-09-14-132950_702x783_scrot.png
-rw-r--r-- 1 mojian mojian 3394212 2008-05-04 19:24 AWholeNewWorld.mp3
-rw-r--r-- 1 mojian mojian  450784 2008-09-06 22:59 cairo-dock-plug-ins_v1.5.6_i686.deb
-rw-r--r-- 1 mojian mojian  242014 2008-09-06 22:24 cairo-dock_v1.5.6_i686.deb
-rw-r--r-- 1 mojian mojian  271214 2008-09-06 22:34 cairo-dock_v1.5.6_i686.deb.1
-rw-r--r-- 1 mojian mojian  583652 2008-09-06 22:00 cairo-dock_v1.6.1.2_i686.deb
-rw-r--r-- 1 mojian mojian  655192 2008-09-06 22:48 cairo-dock_v1.6.1.2_i686.deb.1
-rw------- 1 mojian mojian  371419 2006-02-19 06:31 cc-mode-5.31.3.tar.gz
-rw-r--r-- 1 mojian mojian  770696 2005-10-24 09:11 color-theme.el--------》》》》》》在这里
-rw-r--r-- 1 mojian mojian 4605360 2003-05-03 01:39 Cucurrucucu_Paloma_Caetano.mp3
drwxr-xr-x 3 mojian mojian    4096 2008-09-14 12:21 emacs
-rw-r--r-- 1 mojian mojian     435 2008-09-14 13:29 #.emacs#
lrwxrwxrwx 1 mojian mojian      26 2008-08-28 03:33 Examples -> /usr/share/example-content
drwxr-xr-x 3 mojian mojian    4096 2008-09-12 18:42 test
-rw-r--r-- 1 mojian mojian 6051286 2007-04-19 22:56 waybackintolovedemo.mp3
回复