GNU bug report logs -
#43089
[feature/native-comp] with-eval-after-load has no effect
Previous Next
Reported by: sebastien.miquel <at> posteo.eu
Date: Fri, 28 Aug 2020 15:48:02 UTC
Severity: normal
Done: Andrea Corallo <akrl <at> sdf.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 43089 in the body.
You can then email your comments to 43089 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#43089
; Package
emacs
.
(Fri, 28 Aug 2020 15:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
sebastien.miquel <at> posteo.eu
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 28 Aug 2020 15:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
With the latest native-comp branch, =with-eval-after-load= doesn't seem
to work anymore. I think it's been broken for a while.
Something like =(with-eval-after-load "dired" (bindkey "M-u" (message
"test")))= in init.el doesn't set the binding.
I use it to redefine a few org functions in my config ; this gets
ignored aswell.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43089
; Package
emacs
.
(Sat, 29 Aug 2020 14:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 43089 <at> debbugs.gnu.org (full text, mbox):
Hi Sébastien,
the following is doing the job for me
87b9c3e718 Have .elc files in `load-history' when loading native code (bug#43089)
Could you have a run on the latest branch a see if it solves for you?
Thanks!
Andrea
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43089
; Package
emacs
.
(Sat, 29 Aug 2020 14:48:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 43089 <at> debbugs.gnu.org (full text, mbox):
Appears to be working,
Thank you very much.
> Hi Sébastien,
>
> the following is doing the job for me
>
> 87b9c3e718 Have .elc files in `load-history' when loading native code (bug#43089)
>
> Could you have a run on the latest branch a see if it solves for you?
>
> Thanks!
>
> Andrea
Reply sent
to
Andrea Corallo <akrl <at> sdf.org>
:
You have taken responsibility.
(Sat, 29 Aug 2020 18:10:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
sebastien.miquel <at> posteo.eu
:
bug acknowledged by developer.
(Sat, 29 Aug 2020 18:10:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 43089-done <at> debbugs.gnu.org (full text, mbox):
Sébastien Miquel <sebastien.miquel <at> posteo.eu> writes:
> Appears to be working,
>
> Thank you very much.
Very good! closing
Thank you for reporting
Andrea
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43089
; Package
emacs
.
(Tue, 01 Sep 2020 04:29:02 GMT)
Full text and
rfc822 format available.
Message #19 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
I believe the fix for bug#43089 (commit 87b9c3e) has caused some
issues with eval-after-load. For me at least smartparens'
"(eval-after-load 'ruby-mode ...)" no longer fires if ruby-mode is
loaded from a *.eln file. Trashing the cached "ruby-mode-*.eln" file
before starting emacs, makes eval-after-load work again until next
restart when the *.eln is in place again.
I've nailed down the issue to commit 87b9c3e, as it does not occur
with a build from the commit right before it (38b0ead).
For reference, I'm on macOS 10.15.6 / GCC 10.2.0, and I build Emacs
with a custom script: https://github.com/jimeh/build-emacs-for-macos
To easily reproduce the issue I've stripped down my config to a hacky
bare minimum config that reproduces the issue, available here:
https://gist.github.com/jimeh/a7f2fe730f15baec9f8157fe46d1119b
When first launching Emacs with the above config, opening a *.rb file
loads smartparens-ruby through a "(eval-after-load 'ruby-mode ...)" in
smartparens-config.el. Once everything has natively compiled and you
restart emacs, the eval-after-load does not fire when opening a ruby
file, and smartparens-ruby is not loaded when ruby-mode is loaded. And
as I said at the top, deleting the cached ruby-mode-*.eln file
resolves the issue and lets the eval-after-load hook run again, at
least until you restart emacs with the *.eln in place.
It also seems to matter if with-eval-after-load/eval-after-load is
called from within a natively compiled file or not. Cause adding the
snippet below to init.el which is not natively compiled, does fire the
eval-after-load message but not with-eval-after-load. While within the
natively compiled smartparens-config.el it does not fire
eval-after-load.
(with-eval-after-load 'ruby-mode
(message "msg via with-eval-after-load ruby-mode"))
(eval-after-load 'ruby-mode
(message "msg via eval-after-load ruby-mode"))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43089
; Package
emacs
.
(Tue, 01 Sep 2020 12:52:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 43089 <at> debbugs.gnu.org (full text, mbox):
Hi Jim,
I can't reproduce this bug using the provided setup.
Each time I open test.rb I see Smartparens in my minor modes.
I also tried manually placing a with-eval-after-load in a native
compiled file but is effective for me.
I'm on 78e8f99154, maybe would you try this? (is the latest state)
Andrea
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43089
; Package
emacs
.
(Tue, 01 Sep 2020 13:36:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 43089 <at> debbugs.gnu.org (full text, mbox):
Hi Andrea,
I just created a build from 78e8f99 and I'm still seeing the issue.
Sorry I wasn't more specific about the exact behavior of smartparens
in this situation. Smartparens itself does load and work, but its Ruby
specific features are not loaded from "smartparens-ruby.el", which can
easily be tested by typing "if" of "def" followed by a space, which
should insert a "end" statement on the line below if the Ruby specific
features are loaded.
Also the C-j and RET keybindings against ruby-mode-map setup via
use-package are not bound to "newline-and-indent". So "C-h k C-j"
shows C-j bound to "electric-newline-and-maybe-indent", and RET bound
to "newline".
And both of these issues can be resolved by deleting the cached
ruby-mode-*.eln file before starting Emacs.
I'm hoping you can reproduce it with the details above, otherwise it's
probably an issue that's specific to macOS.
On Tue, Sep 1, 2020 at 1:51 PM Andrea Corallo <akrl <at> sdf.org> wrote:
>
> Hi Jim,
>
> I can't reproduce this bug using the provided setup.
>
> Each time I open test.rb I see Smartparens in my minor modes.
>
> I also tried manually placing a with-eval-after-load in a native
> compiled file but is effective for me.
>
> I'm on 78e8f99154, maybe would you try this? (is the latest state)
>
> Andrea
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43089
; Package
emacs
.
(Tue, 01 Sep 2020 16:26:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 43089 <at> debbugs.gnu.org (full text, mbox):
Hi Jim,
I managed to reproduce, the bug was only appearing after make install.
3023eb5692 * Fix `load-filename' for installed instance (bug#43089)
is fixing for me. Would you give it a try?
Thanks
Andrea
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43089
; Package
emacs
.
(Tue, 01 Sep 2020 18:00:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 43089 <at> debbugs.gnu.org (full text, mbox):
That fixed it, I just built and tested commit 3023eb5, and everything
works as expected again :D
Thanks :)
On Tue, Sep 1, 2020 at 5:25 PM Andrea Corallo <akrl <at> sdf.org> wrote:
>
> Hi Jim,
>
> I managed to reproduce, the bug was only appearing after make install.
>
> 3023eb5692 * Fix `load-filename' for installed instance (bug#43089)
>
> is fixing for me. Would you give it a try?
>
> Thanks
>
> Andrea
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43089
; Package
emacs
.
(Tue, 01 Sep 2020 18:13:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 43089-done <at> debbugs.gnu.org (full text, mbox):
Jim Myhrberg <contact <at> jimeh.me> writes:
> That fixed it, I just built and tested commit 3023eb5, and everything
> works as expected again :D
>
> Thanks :)
Great, thank you for the report!
closing
Andrea
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 30 Sep 2020 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.