* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-24 16:48 if both .emacs and .emacs.elc,which one emacs load? Xiong Guanglei
@ 2003-05-24 2:45 ` Benjamin Rutt
2003-05-24 6:34 ` Niels Freimann
` (2 more replies)
2003-05-28 8:51 ` Rob Thorpe
1 sibling, 3 replies; 14+ messages in thread
From: Benjamin Rutt @ 2003-05-24 2:45 UTC (permalink / raw)
Xiong Guanglei <xgl99@mails.tsinghua.edu.cn> writes:
> can .emacs.elc speed up the loading process?
Not typically. Byte-compiling pays off when code is evaluated many
times. The lisp in your .emacs is typically executed only once.
Besides, it's not worth your time you'll lose someday when you'll edit
the non-compiled version, expect a change to happen, and you'll forget
to re-compile it, and wonder why your change didn't have any effect.
--
Benjamin
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-24 2:45 ` Benjamin Rutt
@ 2003-05-24 6:34 ` Niels Freimann
2003-05-24 10:27 ` Eli Zaretskii
[not found] ` <mailman.6680.1053758270.21513.help-gnu-emacs@gnu.org>
2003-05-24 18:59 ` Bruce Ingalls
2 siblings, 1 reply; 14+ messages in thread
From: Niels Freimann @ 2003-05-24 6:34 UTC (permalink / raw)
try it out and you'll never forget to re-compile:
(defun autocompile()
"compile itself if ~/.emacs"
(interactive)
(if (string= (buffer-file-name) (concat default-directory ".emacs"))
(byte-compile-file (buffer-file-name))))
(add-hook 'after-save-hook 'autocompile())
> Besides, it's not worth your time you'll lose someday when you'll edit
> the non-compiled version, expect a change to happen, and you'll forget
> to re-compile it, and wonder why your change didn't have any effect
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-24 6:34 ` Niels Freimann
@ 2003-05-24 10:27 ` Eli Zaretskii
2003-05-24 11:00 ` Niels Freimann
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2003-05-24 10:27 UTC (permalink / raw)
> From: Niels Freimann <nfreimann@firemail.de>
> Date: Sat, 24 May 2003 08:34:23 +0200
>
> (defun autocompile()
> "compile itself if ~/.emacs"
> (interactive)
> (if (string= (buffer-file-name) (concat default-directory ".emacs"))
> (byte-compile-file (buffer-file-name))))
Beware: this doesn't take into account those platforms where the init
file might be called "_emacs" instead.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-24 10:27 ` Eli Zaretskii
@ 2003-05-24 11:00 ` Niels Freimann
2003-05-24 17:35 ` Eli Zaretskii
[not found] ` <mailman.6699.1053797730.21513.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 14+ messages in thread
From: Niels Freimann @ 2003-05-24 11:00 UTC (permalink / raw)
... however it works on:
-linux
-cygwin (windows)
-native windows
no matter its a tty or x11 (motif,gtk2)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
[not found] ` <mailman.6680.1053758270.21513.help-gnu-emacs@gnu.org>
@ 2003-05-24 15:21 ` Stefan Monnier
0 siblings, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2003-05-24 15:21 UTC (permalink / raw)
> (add-hook 'after-save-hook 'autocompile())
^^
I'm pretty sure this () doesn't do what you think it does ;-)
Stefan
^ permalink raw reply [flat|nested] 14+ messages in thread
* if both .emacs and .emacs.elc,which one emacs load?
@ 2003-05-24 16:48 Xiong Guanglei
2003-05-24 2:45 ` Benjamin Rutt
2003-05-28 8:51 ` Rob Thorpe
0 siblings, 2 replies; 14+ messages in thread
From: Xiong Guanglei @ 2003-05-24 16:48 UTC (permalink / raw)
can .emacs.elc speed up the loading process?
--
Guanglei Xiong
Department of Automation
Tsinghua University I love Linux,and Linux loves me!
Beijing,P.R.China I like CV,and hope CV likes me!
100084
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-24 11:00 ` Niels Freimann
@ 2003-05-24 17:35 ` Eli Zaretskii
[not found] ` <mailman.6699.1053797730.21513.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2003-05-24 17:35 UTC (permalink / raw)
> From: Niels Freimann <nfreimann@firemail.de>
> Reply-To: nfreimann@firemail.de
> Date: Sat, 24 May 2003 13:00:08 +0200
>
> ... however it works on:
> -linux
> -cygwin (windows)
> -native windows
> no matter its a tty or x11 (motif,gtk2)
The Windows port allows the init file to be called _emacs; some
Windows users think (incorrectly) that file names with leading dots
are not allowed. Your code will fail for such users.
Is it so hard to make an allowance for "_emacs" that you are so
motivated to reject my suggestion?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-24 2:45 ` Benjamin Rutt
2003-05-24 6:34 ` Niels Freimann
[not found] ` <mailman.6680.1053758270.21513.help-gnu-emacs@gnu.org>
@ 2003-05-24 18:59 ` Bruce Ingalls
2 siblings, 0 replies; 14+ messages in thread
From: Bruce Ingalls @ 2003-05-24 18:59 UTC (permalink / raw)
Benjamin Rutt wrote:
> Xiong Guanglei <xgl99@mails.tsinghua.edu.cn> writes:
>>can .emacs.elc speed up the loading process?
>
> Not typically. ...
You also lose portability between linux/gnu emacs and xemacs,
as well as other versions of *emacs.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
[not found] ` <mailman.6699.1053797730.21513.help-gnu-emacs@gnu.org>
@ 2003-05-25 9:02 ` Peter J. Acklam
2003-05-25 19:01 ` Kai Großjohann
2003-05-25 13:30 ` Piet van Oostrum
1 sibling, 1 reply; 14+ messages in thread
From: Peter J. Acklam @ 2003-05-25 9:02 UTC (permalink / raw)
"Eli Zaretskii" <eliz@elta.co.il> wrote:
> Is it so hard to make an allowance for "_emacs" that you are so
> motivated to reject my suggestion?
Why don't _you_ just add the required code and stop complaining?
Peter
--
I wish dialog boxes had a button saying "Whatever". I hate being
forced to answer "Yes" or "No" to a question I have no opinion on
whatsoever. There ought to be a button matching my indifference.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
[not found] ` <mailman.6699.1053797730.21513.help-gnu-emacs@gnu.org>
2003-05-25 9:02 ` Peter J. Acklam
@ 2003-05-25 13:30 ` Piet van Oostrum
1 sibling, 0 replies; 14+ messages in thread
From: Piet van Oostrum @ 2003-05-25 13:30 UTC (permalink / raw)
>>>>> "Eli Zaretskii" <eliz@elta.co.il> (EZ) wrote:
>> From: Niels Freimann <nfreimann@firemail.de>
>> Reply-To: nfreimann@firemail.de
>> Date: Sat, 24 May 2003 13:00:08 +0200
>>
>> ... however it works on:
>> -linux
>> -cygwin (windows)
>> -native windows
>> no matter its a tty or x11 (motif,gtk2)
EZ> The Windows port allows the init file to be called _emacs; some
EZ> Windows users think (incorrectly) that file names with leading dots
EZ> are not allowed. Your code will fail for such users.
EZ> Is it so hard to make an allowance for "_emacs" that you are so
EZ> motivated to reject my suggestion?
Make after-save-hook local in that buffer and the test can disappear.
For example, I have:
;;; Local Variables:
;;; after-save-hook: ((lambda () (byte-compile-file buffer-file-name)))
;;; End:
--
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-25 9:02 ` Peter J. Acklam
@ 2003-05-25 19:01 ` Kai Großjohann
2003-05-25 19:22 ` Peter J. Acklam
0 siblings, 1 reply; 14+ messages in thread
From: Kai Großjohann @ 2003-05-25 19:01 UTC (permalink / raw)
pjacklam@online.no (Peter J. Acklam) writes:
> "Eli Zaretskii" <eliz@elta.co.il> wrote:
>
>> Is it so hard to make an allowance for "_emacs" that you are so
>> motivated to reject my suggestion?
>
> Why don't _you_ just add the required code and stop complaining?
It just doesn't make sense for Eli to add code to Niels' ~/.emacs
file.
--
This line is not blank.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-25 19:01 ` Kai Großjohann
@ 2003-05-25 19:22 ` Peter J. Acklam
2003-05-26 3:24 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Peter J. Acklam @ 2003-05-25 19:22 UTC (permalink / raw)
kai.grossjohann@gmx.net (Kai Großjohann) wrote:
> pjacklam@online.no (Peter J. Acklam) writes:
>
> > "Eli Zaretskii" <eliz@elta.co.il> wrote:
> >
> > > Is it so hard to make an allowance for "_emacs" that you are
> > > so motivated to reject my suggestion?
> >
> > Why don't _you_ just add the required code and stop complaining?
>
> It just doesn't make sense for Eli to add code to Niels'
> ~/.emacs file.
As long as Eli is the only one complaining, I think he should.
Peter
--
I wish dialog boxes had a button saying "Whatever". I hate being
forced to answer "Yes" or "No" to a question I have no opinion on
whatsoever. There ought to be a button matching my indifference.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-25 19:22 ` Peter J. Acklam
@ 2003-05-26 3:24 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2003-05-26 3:24 UTC (permalink / raw)
> Newsgroups: gnu.emacs.help
> From: pjacklam@online.no (Peter J. Acklam)
> Date: Sun, 25 May 2003 21:22:03 +0200
> > >
> > > Why don't _you_ just add the required code and stop complaining?
> >
> > It just doesn't make sense for Eli to add code to Niels'
> > ~/.emacs file.
>
> As long as Eli is the only one complaining, I think he should.
I didn't complain. I made a suggestion for improvement, based on my
experience with different non-Posix systems. If my suggestion is not
to someone's liking, feel free to ignore it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: if both .emacs and .emacs.elc,which one emacs load?
2003-05-24 16:48 if both .emacs and .emacs.elc,which one emacs load? Xiong Guanglei
2003-05-24 2:45 ` Benjamin Rutt
@ 2003-05-28 8:51 ` Rob Thorpe
1 sibling, 0 replies; 14+ messages in thread
From: Rob Thorpe @ 2003-05-28 8:51 UTC (permalink / raw)
Xiong Guanglei <xgl99@mails.tsinghua.edu.cn> wrote in message news:<1xyoi93s.fsf@tu202155.tsinghua.edu.cn>...
> can .emacs.elc speed up the loading process?
If you have written any major editing commands try putting them in a
separate file, byte-compiling this file and loading it in .emacs .
This keeps them away from configurations you may change often. As
others have said theres not much to be gained though.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2003-05-28 8:51 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-24 16:48 if both .emacs and .emacs.elc,which one emacs load? Xiong Guanglei
2003-05-24 2:45 ` Benjamin Rutt
2003-05-24 6:34 ` Niels Freimann
2003-05-24 10:27 ` Eli Zaretskii
2003-05-24 11:00 ` Niels Freimann
2003-05-24 17:35 ` Eli Zaretskii
[not found] ` <mailman.6699.1053797730.21513.help-gnu-emacs@gnu.org>
2003-05-25 9:02 ` Peter J. Acklam
2003-05-25 19:01 ` Kai Großjohann
2003-05-25 19:22 ` Peter J. Acklam
2003-05-26 3:24 ` Eli Zaretskii
2003-05-25 13:30 ` Piet van Oostrum
[not found] ` <mailman.6680.1053758270.21513.help-gnu-emacs@gnu.org>
2003-05-24 15:21 ` Stefan Monnier
2003-05-24 18:59 ` Bruce Ingalls
2003-05-28 8:51 ` Rob Thorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).