GNU bug report logs - #2577
23.0.91; startup.el should choose .emacs ahead of .emacs.elc if .emacs is newer

Previous Next

Package: emacs;

Reported by: Alex <alex <at> bennee.com>

Date: Thu, 5 Mar 2009 09:45:02 UTC

Severity: wishlist

Tags: wontfix

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2577 in the body.
You can then email your comments to 2577 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Thu, 05 Mar 2009 09:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex <alex <at> bennee.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 05 Mar 2009 09:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Alex <alex <at> bennee.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.91; startup.el should choose .emacs ahead of .emacs.elc if
	.emacs is newer
Date: Thu, 5 Mar 2009 09:44:40 +0100
Following on from discussion at:

http://curiousprogrammer.wordpress.com/2009/03/04/compiling-at-emacs-startup

I humbly submit the following bug report:

From:  <alex <at> bennee.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.91; startup.el should choose .emacs ahead of .emacs.elc if .emacs is newer
--text follows this line--

Currently startup.el warns if .emacs.elc is newer than .emacs however
this hides subtle bugs if people don't carefully watch their logs/mode
line during startup. Although many people have clever auto-compile
magic every tiome they save .emacs this often break down when they
pull in updates via SCMs.

It should still warn, but by default it should go with the newest
version.

-- 
Alex, homepage: http://www.bennee.com/~alex/
It is far better to be deceived than to be undeceived by those we love.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Thu, 05 Mar 2009 16:55:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 05 Mar 2009 16:55:03 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alex <alex <at> bennee.com>
Cc: 2577 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#2577: 23.0.91; startup.el should choose .emacs ahead of .emacs.elc if .emacs is newer
Date: Thu, 05 Mar 2009 11:49:42 -0500
> Currently startup.el warns if .emacs.elc is newer than .emacs however
> this hides subtle bugs if people don't carefully watch their logs/mode
> line during startup. Although many people have clever auto-compile
> magic every tiome they save .emacs this often break down when they
> pull in updates via SCMs.

I think that if people compile their .emacs they get what they ask for.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Thu, 05 Mar 2009 16:55:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 05 Mar 2009 16:55:07 GMT) Full text and rfc822 format available.

Tags added: wontfix Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> emacsbugs.donarmstrong.com. (Thu, 05 Mar 2009 23:50:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Fri, 06 Mar 2009 10:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex <alex <at> bennee.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 06 Mar 2009 10:30:03 GMT) Full text and rfc822 format available.

Message #22 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Alex <alex <at> bennee.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 2577 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#2577: 23.0.91; startup.el should choose .emacs ahead of
	.emacs.elc if .emacs is newer
Date: Fri, 6 Mar 2009 11:18:54 +0100
On Thu, Mar 05, 2009 at 11:49:42AM -0500, Stefan Monnier wrote:
> > Currently startup.el warns if .emacs.elc is newer than .emacs however
> > this hides subtle bugs if people don't carefully watch their logs/mode
> > line during startup. Although many people have clever auto-compile
> > magic every tiome they save .emacs this often break down when they
> > pull in updates via SCMs.
> 
> I think that if people compile their .emacs they get what they ask for.

That's not very helpful. Emacs obviously supports compiles .emacs as
it has code to deal with it. The code also spots the failure case but
only emits a warning. All I'm arguing is the warning is insufficient
and a cleaner solution is needed. If that solution is to remove
compiled .emacs support then so be it.

I think it is possible for a compiled .emacs to know if it is running
the compiled code and redo the test that starup.el does and act
accordingly so workarounds ar probably possible. But workarounds still
indicate bugs IMHO.

-- 
Alex, homepage: http://www.bennee.com/~alex/
People usually get what's coming to them ... unless it's been mailed.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Fri, 06 Mar 2009 10:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex <alex <at> bennee.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 06 Mar 2009 10:30:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Fri, 06 Mar 2009 11:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 06 Mar 2009 11:00:03 GMT) Full text and rfc822 format available.

Message #32 received at 2577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alex <alex <at> bennee.com>, 2577 <at> debbugs.gnu.org
Cc: monnier <at> iro.umontreal.ca
Subject: Re: bug#2577: 23.0.91;	startup.el should choose .emacs ahead of .emacs.elc if .emacs is	newer
Date: Fri, 06 Mar 2009 12:55:06 +0200
> Date: Fri, 6 Mar 2009 11:18:54 +0100
> From: Alex <alex <at> bennee.com>
> Cc: emacs-pretest-bug <at> gnu.org, 2577 <at> emacsbugs.donarmstrong.com
> 
> On Thu, Mar 05, 2009 at 11:49:42AM -0500, Stefan Monnier wrote:
> > > Currently startup.el warns if .emacs.elc is newer than .emacs however
> > > this hides subtle bugs if people don't carefully watch their logs/mode
> > > line during startup. Although many people have clever auto-compile
> > > magic every tiome they save .emacs this often break down when they
> > > pull in updates via SCMs.
> > 
> > I think that if people compile their .emacs they get what they ask for.
> 
> That's not very helpful.

Maybe not, but it isn't clear, at least not to me, what alternative
behavior do you suggest.  How about spelling it out?

If this is your suggestion:

> It should still warn, but by default it should go with the newest
> version.

then I doubt that it will fly, as Emacs does not do this with any
other Lisp file.  It always warns and goes with the .elc file.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Fri, 06 Mar 2009 13:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jason Rumney <jasonr <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 06 Mar 2009 13:45:04 GMT) Full text and rfc822 format available.

Message #37 received at 2577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Alex <alex <at> bennee.com>, 2577 <at> debbugs.gnu.org
Subject: Re: bug#2577: 23.0.91;	startup.el should choose .emacs ahead of .emacs.elc
 if .emacs is	newer
Date: Fri, 06 Mar 2009 21:37:53 +0800
Alex wrote:
>> I think that if people compile their .emacs they get what they ask for.
>>     
>
> That's not very helpful.

For you, perhaps not. But we have discussed this on emacs-devel numerous 
times in the past, and every time it has been clear that different 
people have different opinions. Many people consider lisp source to be 
"work in progress" until they compile it, and do not want Emacs to load 
it by default if there is a compiled version around. The compromise is 
to issue a warning.

If you have a problem remembering to compile your .emacs, then either 
delete the .emacs.elc file and stop compiling it, or investigate one of 
the solutions that people have come up with to compile it automatically.






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Fri, 06 Mar 2009 20:10:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Phil Hagelberg <phil <at> hagelb.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 06 Mar 2009 20:10:05 GMT) Full text and rfc822 format available.

Message #42 received at 2577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Phil Hagelberg <phil <at> hagelb.org>
To: 2577 <at> debbugs.gnu.org
Subject: Re: bug#2577: 23.0.91; startup.el should choose .emacs ahead of .emacs.elc if .emacs is newer
Date: Fri, 06 Mar 2009 12:04:42 -0800
The specific failure is this:

A user keeps his entire .emacs.d in an SCM system. This includes not
only his personal customizations, (which would hardly benefit from
compilation) but third-party libraries that haven't made it into Emacs
proper yet. These third-party libraries are byte-compiled in every
checkout of the user's .emacs.d, which span multiple machines.

One of these libraries gets a bug fixed, so he installs the update and
checks it in. Now he moves to another machine that has his dotfiles
checked out, and he pulls in the update, but it's ignored in favour of
the out-of-date .elc file.

Everyone I know who uses Emacs seriously keeps their .emacs.d in an SCM
as well as third-party libraries, so I don't consider this much of an
edge case.

Ideally a flag would exist that could instruct Emacs to ignore
out-of-date .elc files. I understand this is not appropriate to submit
during a feature freeze, but saying it's not a problem is not helpful.

-Phil




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Fri, 06 Mar 2009 20:30:03 GMT) Full text and rfc822 format available.

Message #45 received at 2577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 2577 <at> debbugs.gnu.org
Subject: Re: bug#2577: 23.0.91; startup.el should choose .emacs ahead of .emacs.elc if .emacs is newer
Date: Fri, 06 Mar 2009 15:23:13 -0500
tags 2577 =
forcemerge 2061 2577
stop 

Phil Hagelberg wrote:

> Ideally a flag would exist that could instruct Emacs to ignore
> out-of-date .elc files. I understand this is not appropriate to submit
> during a feature freeze, but saying it's not a problem is not helpful.

Then this is a duplicate of wishlist item #2061.




Tags set to: Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 06 Mar 2009 20:30:04 GMT) Full text and rfc822 format available.

Forcibly Merged 2061 2577. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 06 Mar 2009 20:30:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Sat, 07 Mar 2009 14:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 07 Mar 2009 14:30:04 GMT) Full text and rfc822 format available.

Message #54 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#2577: 23.0.91; startup.el should choose .emacs ahead of .emacs.elc if .emacs is newer
Date: Sat, 07 Mar 2009 14:24:18 +0000
On 2009-03-06 20:04 +0000, Phil Hagelberg wrote:
> One of these libraries gets a bug fixed, so he installs the update and
> checks it in. Now he moves to another machine that has his dotfiles
> checked out, and he pulls in the update, but it's ignored in favour of
> the out-of-date .elc file.

Personally, I quite like the current behaviour. As mentioned in another
post, it gives users the power to compile .el files when they are mature
and continue working on them.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Sat, 07 Mar 2009 22:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex <alex <at> bennee.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 07 Mar 2009 22:20:03 GMT) Full text and rfc822 format available.

Message #59 received at 2577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Alex <alex <at> bennee.com>
To: Jason Rumney <jasonr <at> gnu.org>
Cc: 2577 <at> debbugs.gnu.org
Subject: Re: bug#2577: 23.0.91; startup.el should choose .emacs ahead of
	.emacs.elc if .emacs is newer
Date: Sat, 7 Mar 2009 23:08:11 +0100
On Fri, Mar 06, 2009 at 09:37:53PM +0800, Jason Rumney wrote:
> Alex wrote:
>>> I think that if people compile their .emacs they get what they ask for.
>>>     
>>
>> That's not very helpful.
>
> For you, perhaps not. But we have discussed this on emacs-devel numerous  
> times in the past, and every time it has been clear that different  
> people have different opinions. Many people consider lisp source to be  
> "work in progress" until they compile it, and do not want Emacs to load  
> it by default if there is a compiled version around. The compromise is  
> to issue a warning.
>
> If you have a problem remembering to compile your .emacs, then either  
> delete the .emacs.elc file and stop compiling it, or investigate one of  
> the solutions that people have come up with to compile it
automatically.

Typically it's pulling in a later version from an SCM that the warning
case trips up on, as the doesn't trip the compile-on-save hook that
most people use to auto compile .emacs.

As Emacs is a configurable editor would adding a variable to control
this behaviour be the way forward? A lot of people do run their
configs out of an SCM these days. Someone else suggested maybe being
able to use def advice to modify the behaviour which might make any
work-arounds less hacky but I'm not sure what this would entail for
the core code.

-- 
Alex, homepage: http://www.bennee.com/~alex/
Tax and title extra.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Sat, 07 Mar 2009 23:20:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 07 Mar 2009 23:20:06 GMT) Full text and rfc822 format available.

Message #64 received at 2577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alex <alex <at> bennee.com>
Cc: 2577 <at> debbugs.gnu.org, Jason Rumney <jasonr <at> gnu.org>
Subject: Re: bug#2577: 23.0.91; startup.el should choose .emacs ahead of .emacs.elc if .emacs is newer
Date: Sat, 07 Mar 2009 18:11:26 -0500
> Typically it's pulling in a later version from an SCM that the warning
> case trips up on, as the doesn't trip the compile-on-save hook that
> most people use to auto compile .emacs.

People waste more time dealing with problems introduced by compiling
their .emacs than they win by have the file load more quickly.

> As Emacs is a configurable editor would adding a variable to control
> this behaviour be the way forward? A lot of people do run their

Since Emacs is configurable, you can do that in your .emacs actually:
check whether the .el is more recent and load it explicitly if so.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2577; Package emacs. (Sun, 08 Mar 2009 01:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 08 Mar 2009 01:15:03 GMT) Full text and rfc822 format available.

Message #69 received at 2577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, 2577 <at> debbugs.gnu.org
Cc: Alex <alex <at> bennee.com>
Subject: Re: bug#2577: 23.0.91; startup.el should choose .emacs ahead of 
	.emacs.elc if .emacs is newer
Date: Sun, 8 Mar 2009 02:06:37 +0100
On Sun, Mar 8, 2009 at 12:11 AM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>> Typically it's pulling in a later version from an SCM that the warning
>> case trips up on, as the doesn't trip the compile-on-save hook that
>> most people use to auto compile .emacs.
>
> People waste more time dealing with problems introduced by compiling
> their .emacs than they win by have the file load more quickly.
>
>> As Emacs is a configurable editor would adding a variable to control
>> this behaviour be the way forward? A lot of people do run their
>
> Since Emacs is configurable, you can do that in your .emacs actually:
> check whether the .el is more recent and load it explicitly if so.

It is easier to do this if you divide .emacs in one part that just
load another file that contains what you now have in your .emacs.




Disconnected #2577 from all other report(s). Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 04 Jun 2011 22:41:01 GMT) Full text and rfc822 format available.

Message #72 received at 2577-quiet <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 2577-quiet <at> debbugs.gnu.org
Subject: Re: bug#2577
Date: Sat, 4 Jun 2011 18:40:04 -0400
unmerge 2577
stop

Actually, this isn't just a dupe of 2061. If there were some variable
you could set to prefer loading of .el if newer than .elc, it would
not help for the specific case of .emacs, because the setting would
have to go... in .emacs. Maybe there could be an environment variable
as well. But this probably remains a "wontfix".




bug closed, send any further explanations to 2577 <at> debbugs.gnu.org and Alex <alex <at> bennee.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 08 Dec 2012 03:00:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Jan 2013 12:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 18 Dec 2013 03:28:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#2577; Package emacs. (Wed, 18 Dec 2013 03:36:02 GMT) Full text and rfc822 format available.

Message #81 received at 2577 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 2577 <at> debbugs.gnu.org
Subject: Re: bug#2577: startup.el should choose .emacs ahead of .emacs.elc if
 .emacs is newer
Date: Tue, 17 Dec 2013 22:35:45 -0500
Emacs 24.4 will have a `load-prefer-newer' option.
Since the default is nil, it does not help with loading the init file,
if the init file is where you set it non-nil...

Personally I think it would be fine to eg simply bind it non-nil around
loading of the init file, but people seem to feel quite strongly about
this issue, and I'm not going to argue it.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 15 Jan 2014 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.