emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Under windows, ~/.emacs.d/.emacs(.el) is not laoded at startup


From: Cheng Gao
Subject: Re: Under windows, ~/.emacs.d/.emacs(.el) is not laoded at startup
Date: Wed, 22 Sep 2004 01:25:30 +0800
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (windows-nt)

,----
| And I think Emacs doc need clarify one thing.
| Not init file can be ~/.emacs, ~/.emacs.el and its byte-compiled version
| ~/.emacs.elc, ~/.emacs.d/.emacs, ~/.emacs.d/.emacs.el and its
| byte-compiled version ~/.emacs.d/.emacs.elc. So there exists problem of
| priority. 
| 
| Say if all of above mentioned six files exist, what's the priority
| order? (I know only one file will be used.)
`----
Please forgive me for my stupidity. I'll reply my question.

A simple test reveals the priority order is:

~/.emacs.elc -> ~/.emacs.el -> ~/.emacs -> ~/.emacs.d/.emacs.elc ->
~/.emacs.d/.emacs.el -> ~/.emacs.d/.emacs

My testing method:

I just copy my ~/.emacs.el as ~.emacs, ~/.emacs.d/~.emacs.el &
~/.emacs.d/.emacs.

At the beginning of each file, I add a

(setq iam "~/.emacs.el") <- Change this to reflect the real path/name

And I byte-compiled ~/.emacs.el to ~/.emacs.elc and ~/.emacs.d/.emacs.el
to ~/.emacs.d/~.emacs.elc. Then I open two .elc files and manually
change iam to .elc file names as:

(setq iam "~/.emacs.elc")
(setq iam "~/.emacs.d/.emacs.elc")

Then I start emacs, and within *scratch* buffer, evaluate `iam.
First evaluation shows "~/emacs.elc"
then I close Emacs, and delete ~/.emacs.elc
and reiterate this stupid test

At last, I find the priority order.

Wish this test can amuse other newbies with the same newbiety as me.

CG
-- 
德不孤,必有邻
         -- 《论语-里仁》






reply via email to

[Prev in Thread] Current Thread [Next in Thread]