GNU bug report logs -
#34954
26.1.92; eshell gets loaded twice
Previous Next
Reported by: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Sat, 23 Mar 2019 15:07:01 UTC
Severity: minor
Tags: fixed, patch
Merged with 24491
Found in versions 25.1.1, 26.1.92
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 34954 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Sorry for the noise, I forgot to keep 34954 <at> debbugs.gnu.org
Hello Glenn.
> For the specific issue of the load-hook, see
https://debbugs.gnu.org/24491#8
Sorry I missed that bug report. Could both reports be merged?
> You ought to be able to avoid such problems by using
> (with-)eval-after-load instead of foo-load-hook, since the former runs
> after provide (effectively).
Your recommendation works, but only if the order is:
(require 'eshell)
(with-eval-after-load "eshell" (insert "Eshell was loaded.\n")
When the order is:
(with-eval-after-load "eshell" (insert "Eshell was loaded.\n")
(require 'eshell)
The string is inserted twice, because eshell is loaded twice.
Is the former order recommended over the latter? Mandatory? I can't
find that information on the manual.
Of course, if I eval (starting from emacs -Q):
(with-eval-after-load 'eshell (insert "Eshell was loaded.\n")
And then type `M-x eshell' I get the repeated string inserted, because
again, eshell is loaded twice.
> Frankly all foo-load-hooks are probably historical baggage that should
> be obsoleted. There's no need for them to exist given that a general
> solution does.
Anyway, my recipe was meant to provide evidence that eshell gets loaded
twice. That still happens, either eshell-load-hook or
with-eval-after-load is used in real code. It would be good to solve
that double loading. That way, either eshell-load-hook (until it is
obsoleted, if it eventually happens) or with-eval-after-load (any order
of execution) can be used.
Best Regards,
Mauro.
El mié., 27 mar. 2019 a las 9:31, Glenn Morris (<rgm <at> gnu.org>) escribió:
>
> For the specific issue of the load-hook, see
> https://debbugs.gnu.org/24491#8
>
[Message part 2 (text/html, inline)]
This bug report was last modified 6 years and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.