GNU bug report logs -
#10049
problems if buffer-local generated-autoload-file points to global autoload file
Previous Next
Reported by: David Engster <deng <at> randomsample.de>
Date: Mon, 14 Nov 2011 22:14:01 UTC
Severity: normal
Found in version 24.0.91
Fixed in version 24.0.92
Done: David Engster <deng <at> randomsample.de>
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 10049 in the body.
You can then email your comments to 10049 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10049
; Package
emacs
.
(Mon, 14 Nov 2011 22:14:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
David Engster <deng <at> randomsample.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 14 Nov 2011 22:14:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Recipe:
* Create file 'testautoload.el' in /home/whatever/test containing
--------------------
;;;###autoload
(defun testautoload-testfunc ())
;; Local variables:
;; generated-autoload-file: "foo.el"
;; End:
--------------------
* Now create autoload file using (all in one line)
emacs --batch -l autoload -f toggle-debug-on-error
--eval '(setq generated-autoload-file "/home/whatever/test/foo.el")'
-f batch-update-autoloads /home/whatever/test
You'll see:
...
Wrote /home/whatever/test/foo.el
Making generated-autoload-file local to *autoload-file* while let-bound!
Generating autoloads for testautoload.el...
Generating autoloads for testautoload.el...done
Saving file /home/void/test/foo.el...
Wrote /home/void/test/foo.el
(No changes need to be saved)
and the file foo.el will be generated (BTW, shouldn't the above
*autoload-file* better denote the actual file name?)
* Now simply call the above command again. You'll get:
Debugger entered--Lisp error: (wrong-type-argument listp "77d69bf537d61f438126776e130fef3d")
time-less-p("77d69bf537d61f438126776e130fef3d" (20161 36303))
update-directory-autoloads("/home/whatever/test")
apply(update-directory-autoloads "/home/whatever/test")
batch-update-autoloads()
[...]
This is due to the following autoload header in foo.el:
;;;### (autoloads (testautoload-testfunc) "testautoload" "testautoload.el"
;;;;;; "77d69bf537d61f438126776e130fef3d")
;;; Generated autoloads from testautoload.el
where the md5-looking hex-string is obviously not a time.
Changed bug title to 'problems if buffer-local generated-autoload-file points to global autoload file' from '24.0.91; Setting generated-autoload-file as local variable not working correctly'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 17 Nov 2011 05:25:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10049
; Package
emacs
.
(Thu, 17 Nov 2011 07:40:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 10049 <at> debbugs.gnu.org (full text, mbox):
The problem only occurs when the buffer-local value of
generated-autoload-file points to the same file as the global value.
This should be fixed, but in the meantime you can work around it by
simply not setting the buffer-local value (because setting it to the
global value is at best a no-op).
Reply sent
to
David Engster <deng <at> randomsample.de>
:
You have taken responsibility.
(Thu, 17 Nov 2011 08:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
David Engster <deng <at> randomsample.de>
:
bug acknowledged by developer.
(Thu, 17 Nov 2011 08:38:03 GMT)
Full text and
rfc822 format available.
Message #15 received at 10049-close <at> debbugs.gnu.org (full text, mbox):
Glenn Morris writes:
> The problem only occurs when the buffer-local value of
> generated-autoload-file points to the same file as the global value.
> This should be fixed, but in the meantime you can work around it by
> simply not setting the buffer-local value (because setting it to the
> global value is at best a no-op).
I can confirm it is fixed; thank you!
You're right of course that those variables are a no-op, but they come
from the CEDET Emacs-merge and I'd like to keep them to make merging
easier.
-David
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10049
; Package
emacs
.
(Thu, 17 Nov 2011 09:42:01 GMT)
Full text and
rfc822 format available.
Message #18 received at 10049 <at> debbugs.gnu.org (full text, mbox):
reopen 10049
thanks
> Glenn Morris writes:
> > The problem only occurs when the buffer-local value of
> > generated-autoload-file points to the same file as the global value.
> > This should be fixed, but in the meantime you can work around it by
> > simply not setting the buffer-local value (because setting it to the
> > global value is at best a no-op).
David Engster writes:
> I can confirm it is fixed; thank you!
I'm sorry, I first misread your statement in the sense that you fixed
the bug, and then performed the check on the wrong file... the bug is of
course still there.
-David
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 17 Nov 2011 09:42:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10049
; Package
emacs
.
(Thu, 17 Nov 2011 17:29:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 10049 <at> debbugs.gnu.org (full text, mbox):
David Engster wrote:
> I'm sorry, I first misread your statement in the sense that you fixed
> the bug, and then performed the check on the wrong file... the bug is of
> course still there.
Yes, I was going to say that. :)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10049
; Package
emacs
.
(Thu, 17 Nov 2011 21:36:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 10049 <at> debbugs.gnu.org (full text, mbox):
I think it is fixed now.
Reply sent
to
David Engster <deng <at> randomsample.de>
:
You have taken responsibility.
(Fri, 18 Nov 2011 21:00:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
David Engster <deng <at> randomsample.de>
:
bug acknowledged by developer.
(Fri, 18 Nov 2011 21:00:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 10049-close <at> debbugs.gnu.org (full text, mbox):
Glenn Morris writes:
> I think it is fixed now.
...and confirmed (again!) ;-)
Thanks!
David
bug Marked as fixed in versions 24.0.92.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 18 Nov 2011 21:03:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10049
; Package
emacs
.
(Sun, 20 Nov 2011 02:20:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 10049 <at> debbugs.gnu.org (full text, mbox):
>> I think it is fixed now.
> ...and confirmed (again!) ;-)
Could you check if the (additional) patch below works as well?
Stefan
=== modified file 'lisp/emacs-lisp/autoload.el'
--- lisp/emacs-lisp/autoload.el 2011-11-17 21:34:16 +0000
+++ lisp/emacs-lisp/autoload.el 2011-11-20 02:17:11 +0000
@@ -512,15 +512,7 @@
(when output-start
(let ((secondary-autoloads-file-buf
- (if (local-variable-p 'generated-autoload-file)
- (current-buffer))))
- ;; Ignore a buffer-local setting if it points to the
- ;; global value. Otherwise we end up writing a mix of md5s
- ;; and time-stamps to the global file. (Bug#10049)
- (and secondary-autoloads-file-buf
- outfile
- (not otherbuf)
- (setq secondary-autoloads-file-buf nil))
+ (if otherbuf (current-buffer))))
(with-current-buffer (marker-buffer output-start)
(save-excursion
;; Insert the section-header line which lists the file name
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10049
; Package
emacs
.
(Sun, 20 Nov 2011 19:02:01 GMT)
Full text and
rfc822 format available.
Message #39 received at 10049 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier writes:
>>> I think it is fixed now.
>> ...and confirmed (again!) ;-)
>
> Could you check if the (additional) patch below works as well?
Yes, it works as well.
I have related question, though: I also tried to work around this thing
by setting `enable-local-variables' to nil:
emacs --batch -l autoload -f toggle-debug-on-error
--eval '(setq generated-autoload-file "/home/whatever/test/foo.el")'
--eval '(setq enable-local-variables nil)'
-f batch-update-autoloads /home/whatever/test
However, this does not seem to work; the file-local variable is still
the one to which the autoloads are written to. Is this to be expected?
-David
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10049
; Package
emacs
.
(Mon, 21 Nov 2011 14:32:01 GMT)
Full text and
rfc822 format available.
Message #42 received at 10049 <at> debbugs.gnu.org (full text, mbox):
>>>> I think it is fixed now.
>>> ...and confirmed (again!) ;-)
>> Could you check if the (additional) patch below works as well?
> Yes, it works as well.
Thanks, installed.
> I have related question, though: I also tried to work around this thing
> by setting `enable-local-variables' to nil:
> emacs --batch -l autoload -f toggle-debug-on-error
> --eval '(setq generated-autoload-file "/home/whatever/test/foo.el")'
> --eval '(setq enable-local-variables nil)'
> -f batch-update-autoloads /home/whatever/test
> However, this does not seem to work; the file-local variable is still
> the one to which the autoloads are written to. Is this to be expected?
Yes: autoload.el let-binds enable-local-variables to :safe.
Maybe it should keep it at nil if the default is nil? If you think it
would be better, please make a new bug-report for it.
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 20 Dec 2011 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 189 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.