unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#2061: 23.0.60; Add preference to force load of Elisp files when they are newer than corresponding byte-compiled file
@ 2009-01-26  2:19 Brent Goodrick
  2009-01-26  4:08 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Brent Goodrick @ 2009-01-26  2:19 UTC (permalink / raw)
  To: emacs-pretest-bug


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

The load function will load a .elc file even if the .el file is newer
than the .elc file.  There are warnings issued, but it is likely that
the message is lost in the ton of messages that usually are emitted,
especially during Emacs invocation.

When would the user ever prefer to load the .elc file after having
modified the .el file?

My suggestion is to add a customizable preference variable called,
say, load-prefer-newer-lisp-files (that needs a better name), that is
recognized by the load function (defined in C code). When
load-prefer-newer-lisp-files is non-nil, and when there is a .el and
.elc file, and when the .el file is newer than the .elc file, it loads
the .el file and not the .elc file (and possibly emits a warning of
this action).

Having it be a customizable preference variable avoids surprising
other users who are used to the existing behavior.

I could hack around this by fset'ing `load' to be my own function that
removes the .elc file when the .el file is found to be newer, but that
is an expensive operation involving calling such functions such as
locate-file-internal to find both .el and .elc files, testing their
modification date-time stamps, etc., operations that the `load' C
function performs already.  Hence, why I think it is best to change
the load function to allow for both approaches via a preference
variable.

Thanks!
Brent


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/home/brentg/emacs_from_source/install/share/emacs/23.0.60/etc/DEBUG for instructions.


In GNU Emacs 23.0.60.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.12.11)
 of 2009-01-25 on hungover
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--with-x-toolkit' '--prefix=/home/brentg/emacs_from_source/install''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  erc-list-mode: t
  erc-menu-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-netsplit-mode: t
  desktop-save-mode: t
  iswitchb-mode: t
  erc-ring-mode: t
  erc-services-mode: t
  erc-networks-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  delete-selection-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: 1
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
C-p C-p C-p C-p M-f M-f SPC f o r m C-e M-b M-f SPC 
t h e SPC . e l SPC f i l e SPC i n t o SPC a SPC . 
e l c SPC f i l e C-d C-a M-q C-n C-n C-n C-n C-n C-n 
C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n 
C-n C-n C-e C-b SPC f o r SPC d e m o n s t r a t i 
o n SPC p u r o <backspace> p o <backspace> o s e s 
C-a C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n M-f M-f M-f M-f M-f M-f 
M-f M-f M-f M-f M-f M-f M-b M-b M-b M-b f o r SPC M-f 
M-f M-q M-f M-f C-b , SPC w h i c h SPC i s SPC SPC 
<backspace> a SPC l i C-SPC M-b M-b M-b w r o n g SPC 
b e c a u s e SPC t h e SPC . e l c SPC f i l e SPC 
d o e s SPC i n e <backspace> d e e d SPC e x i s t 
M-q C-a C-n C-n C-n C-n C-n C-n M-f M-f M-f M-f M-f 
M-f M-f M-f M-f M-f C-n C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-c 
C-c y e s <return> <down-mouse-1> <mouse-1> M-SPC <return> 
<return> M-x r e p p o r t M-P <return>

Recent messages:
/home/brentg/.authin: 100% (398/398)
334 VXNlcm5hbWU6
334 UGFzc3dvcmQ6
235 2.7.0 Accepted
250 2.1.0 OK k41sm12274699rvb.3
250 2.1.5 OK k41sm12274699rvb.3
354  Go ahead k41sm12274699rvb.3
250 2.0.0 OK 1232907223 k41sm12274699rvb.3
221 2.0.0 closing connection k41sm12274699rvb.3
Sending...done






^ permalink raw reply	[flat|nested] 14+ messages in thread
* bug#2061: 23.0.60; Add preference to force load of Elisp files when they are newer than corresponding byte-compiled file
@ 2009-01-27  0:49 Stefan Monnier
  2009-02-02 18:56 ` Juanma Barranquero
  2009-02-03  9:59 ` Richard M Stallman
  0 siblings, 2 replies; 14+ messages in thread
From: Stefan Monnier @ 2009-01-27  0:49 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 2061, Brent Goodrick

> Isn't easier just to compile the .el file? If you're developing or
> modifying a package, and want to try it at once, create a macro to
> compile it as soon as you save it...

A common case for me is "bzr pull" or "cvs update" or "tla star-merge"
to bring in new changes.  I don't look at all the Elisp files brought in
so byte-compile-file is not convenient, and byte-compilation often leads
to odd results because the `require's read the old .elc files.


        Stefan






^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-02-03 21:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26  2:19 bug#2061: 23.0.60; Add preference to force load of Elisp files when they are newer than corresponding byte-compiled file Brent Goodrick
2009-01-26  4:08 ` Eli Zaretskii
2009-01-27 15:08   ` Brent Goodrick
2009-01-26  8:45 ` Juanma Barranquero
2009-01-27 15:54   ` Brent Goodrick
2009-01-28  2:06     ` Juanma Barranquero
2009-01-28  8:29       ` Kevin Rodgers
2009-02-02 16:07       ` Brent Goodrick
2009-01-26 16:31 ` Richard M Stallman
2009-01-27 15:56   ` Brent Goodrick
  -- strict thread matches above, loose matches on Subject: below --
2009-01-27  0:49 Stefan Monnier
2009-02-02 18:56 ` Juanma Barranquero
2009-02-03  9:59 ` Richard M Stallman
2009-02-03 21:07   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).