all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 39823@debbugs.gnu.org
Subject: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27
Date: Fri, 13 Mar 2020 22:03:36 -0400	[thread overview]
Message-ID: <87sgib3d6v.fsf@gmail.com> (raw)
In-Reply-To: <87o8t16q5e.fsf@gmail.com> (Noam Postavsky's message of "Thu, 12 Mar 2020 20:43:09 -0400")

Hello!

Noam Postavsky <npostavs@gmail.com> writes:

> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> After passing from Emacs 26 to Emacs 27, the following snippet of code
>> doesn't behave the same:
>>
>> emacs --quick --batch --eval "(progn
>>  ;(require 'autoload)
>>  (let ((backup-inhibited t)
>>        (generated-autoload-file \"/tmp/toto\"))
>>    (update-directory-autoloads \"/tmp\")))"
>>
>>
>> Works on Emacs 26.3, but fails on Emacs 27.0.50, with the error message:
>>
>> Wrong type argument: stringp, nil
>
> The difference is that --eval now evaluates with lexical-binding
> enabled, so the let-binding of generated-autoload-file is lexical unless
> autoload.el, with its (defvar generated-autoload-file nil ...), has been
> loaded.  Another way to demonstrate this:
>
>     emacs -Q --batch -l bug-39823-autoload-regression.el
>
> fails with the same error, with bug-39823-autoload-regression.el as the
> attached file in both Emacs 26 and 27.  Remove the lexical-binding
> setting, and it succeeds in both.

Thank you for opening my eyes on this; I was scratching my head a bit.

> See also https://lists.gnu.org/r/emacs-devel/2020-03/msg00173.html for
> (much) more discussion on this.

Eh, indeed, that was a bit much :-).  I have nothing against lexcal
scoping (all to the contrary), and always found it strange that I had to
dynamically bound values variable calling `update-directory-autoloads'.
Perhaps a simple fix would be to allow passing the values it needs as
arguments (while maintaining backward compatibility, i.e., make those
arguments optional?).

Maxim





  parent reply	other threads:[~2020-03-14  2:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 15:11 bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 Maxim Cournoyer
2020-03-13  0:43 ` Noam Postavsky
2020-03-13  8:30   ` Eli Zaretskii
2020-03-14  2:06     ` Maxim Cournoyer
2020-03-13 23:01   ` Michael Heerdegen
2020-03-14  2:03   ` Maxim Cournoyer [this message]
2020-03-17 11:48     ` Noam Postavsky
2020-03-14  3:34   ` Richard Stallman
2020-03-17  2:16     ` Maxim Cournoyer
2020-03-19  1:46       ` Richard Stallman
2020-04-08  3:55         ` Maxim Cournoyer
2020-04-08  6:31           ` Eli Zaretskii
2020-04-08 16:41             ` Maxim Cournoyer
2020-04-08 19:09               ` Eli Zaretskii
2020-04-19  3:13                 ` Maxim Cournoyer
2020-04-19 12:19                   ` Noam Postavsky
2020-06-22  4:10                     ` Maxim Cournoyer
2020-06-22 15:07                       ` Noam Postavsky
2020-06-23 20:42                         ` Maxim Cournoyer
2020-09-30 15:23                       ` Lars Ingebrigtsen
2020-10-01 17:20                         ` Lars Ingebrigtsen
2020-10-01 17:54                           ` Eli Zaretskii
2020-10-01 18:06                             ` Lars Ingebrigtsen
2020-10-02  2:36                               ` Lars Ingebrigtsen
2020-10-02 17:54                                 ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgib3d6v.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=39823@debbugs.gnu.org \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.