* bug#43089: [feature/native-comp] with-eval-after-load has no effect
@ 2020-08-28 15:47 Sébastien Miquel
2020-08-29 14:23 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-31 22:12 ` bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089 Jim Myhrberg
0 siblings, 2 replies; 10+ messages in thread
From: Sébastien Miquel @ 2020-08-28 15:47 UTC (permalink / raw)
To: 43089
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#43089: [feature/native-comp] with-eval-after-load has no effect
2020-08-28 15:47 bug#43089: [feature/native-comp] with-eval-after-load has no effect Sébastien Miquel
@ 2020-08-29 14:23 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-29 14:47 ` Sébastien Miquel
2020-08-31 22:12 ` bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089 Jim Myhrberg
1 sibling, 1 reply; 10+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-08-29 14:23 UTC (permalink / raw)
To: Sébastien Miquel; +Cc: 43089
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#43089: [feature/native-comp] with-eval-after-load has no effect
2020-08-29 14:23 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-08-29 14:47 ` Sébastien Miquel
2020-08-29 18:09 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 10+ messages in thread
From: Sébastien Miquel @ 2020-08-29 14:47 UTC (permalink / raw)
To: Andrea Corallo; +Cc: 43089
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#43089: [feature/native-comp] with-eval-after-load has no effect
2020-08-29 14:47 ` Sébastien Miquel
@ 2020-08-29 18:09 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 10+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-08-29 18:09 UTC (permalink / raw)
To: Sébastien Miquel; +Cc: 43089-done, T.V Raman
Sébastien Miquel <sebastien.miquel@posteo.eu> writes:
> Appears to be working,
>
> Thank you very much.
Very good! closing
Thank you for reporting
Andrea
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089
2020-08-28 15:47 bug#43089: [feature/native-comp] with-eval-after-load has no effect Sébastien Miquel
2020-08-29 14:23 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-08-31 22:12 ` Jim Myhrberg
2020-09-01 12:51 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 10+ messages in thread
From: Jim Myhrberg @ 2020-08-31 22:12 UTC (permalink / raw)
To: 43089
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"))
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089
2020-08-31 22:12 ` bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089 Jim Myhrberg
@ 2020-09-01 12:51 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-01 13:35 ` Jim Myhrberg
0 siblings, 1 reply; 10+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-09-01 12:51 UTC (permalink / raw)
To: Jim Myhrberg; +Cc: 43089
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089
2020-09-01 12:51 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-09-01 13:35 ` Jim Myhrberg
2020-09-01 16:25 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 10+ messages in thread
From: Jim Myhrberg @ 2020-09-01 13:35 UTC (permalink / raw)
To: Andrea Corallo; +Cc: 43089
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@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089
2020-09-01 13:35 ` Jim Myhrberg
@ 2020-09-01 16:25 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-01 17:59 ` Jim Myhrberg
0 siblings, 1 reply; 10+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-09-01 16:25 UTC (permalink / raw)
To: Jim Myhrberg; +Cc: 43089
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089
2020-09-01 16:25 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-09-01 17:59 ` Jim Myhrberg
2020-09-01 18:12 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 10+ messages in thread
From: Jim Myhrberg @ 2020-09-01 17:59 UTC (permalink / raw)
To: Andrea Corallo; +Cc: 43089
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@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089
2020-09-01 17:59 ` Jim Myhrberg
@ 2020-09-01 18:12 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 10+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-09-01 18:12 UTC (permalink / raw)
To: Jim Myhrberg; +Cc: 43089-done
Jim Myhrberg <contact@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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-09-01 18:12 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-28 15:47 bug#43089: [feature/native-comp] with-eval-after-load has no effect Sébastien Miquel
2020-08-29 14:23 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-29 14:47 ` Sébastien Miquel
2020-08-29 18:09 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-31 22:12 ` bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089 Jim Myhrberg
2020-09-01 12:51 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-01 13:35 ` Jim Myhrberg
2020-09-01 16:25 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-01 17:59 ` Jim Myhrberg
2020-09-01 18:12 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
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.