* advice.el and bytecomp: Did something change recently?
@ 2020-04-17 16:50 T.V Raman
2020-04-17 17:12 ` Stefan Monnier
0 siblings, 1 reply; 7+ messages in thread
From: T.V Raman @ 2020-04-17 16:50 UTC (permalink / raw)
To: emacs-devel
Context:
1. This is with emacs compiled from git @HEAD.
2. Emacspeak uses advice heavily (advice.el, not nadvice).
3. Until recently, advising functions that were loaded later still
worked,
4. EG: Module emacspeak-advice.el advices vc-next-action and gets
loaded before vc.el.
5. Later, when vc.el gets loaded as a result of calling
vc-next-action, the advice would take effect automatically.
Now:
Since the last few days, (noticed it first yesterday I think) the
above is no longer true.
I need to explicitly load vc.el and then emacspeak-advice.el for the
advice on vc-next-action to take effect.
--
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: advice.el and bytecomp: Did something change recently?
2020-04-17 16:50 advice.el and bytecomp: Did something change recently? T.V Raman
@ 2020-04-17 17:12 ` Stefan Monnier
2020-04-17 17:22 ` T.V Raman
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2020-04-17 17:12 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
> Since the last few days, (noticed it first yesterday I think) the
> above is no longer true.
> I need to explicitly load vc.el and then emacspeak-advice.el for the
> advice on vc-next-action to take effect.
That would be a bug (both for `defadvice` and for `advice-add`, and
currently this is handled by nadvice.el in both cases).
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: advice.el and bytecomp: Did something change recently?
2020-04-17 17:12 ` Stefan Monnier
@ 2020-04-17 17:22 ` T.V Raman
2020-04-17 19:32 ` Stefan Monnier
0 siblings, 1 reply; 7+ messages in thread
From: T.V Raman @ 2020-04-17 17:22 UTC (permalink / raw)
To: monnier; +Cc: raman, emacs-devel
Thanks for the quick response Stefan!
Is there any additional information that I can provide --- warning:
The emacspeak usage is likely a more complex case than what may be
needed to debug this.
Stefan Monnier writes:
> > Since the last few days, (noticed it first yesterday I think) the
> > above is no longer true.
> > I need to explicitly load vc.el and then emacspeak-advice.el for the
> > advice on vc-next-action to take effect.
>
> That would be a bug (both for `defadvice` and for `advice-add`, and
> currently this is handled by nadvice.el in both cases).
>
>
> Stefan
--
Id: kg:/m/0285kf1
--
Id: kg:/m/0285kf1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: advice.el and bytecomp: Did something change recently?
2020-04-17 17:22 ` T.V Raman
@ 2020-04-17 19:32 ` Stefan Monnier
2020-04-17 19:45 ` T.V Raman
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Stefan Monnier @ 2020-04-17 19:32 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
> Is there any additional information that I can provide
A reproduceable test case?
When I try
M-: (defadvice sm-foo (before test activate) (message "before-advice")) RET
M-: (defun sm-foo () (message "body")) RET
M-: (sm-foo) RET
the advice works just fine.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: advice.el and bytecomp: Did something change recently?
2020-04-17 19:32 ` Stefan Monnier
@ 2020-04-17 19:45 ` T.V Raman
2020-04-17 19:46 ` T.V Raman
2020-04-18 2:03 ` T.V Raman
2 siblings, 0 replies; 7+ messages in thread
From: T.V Raman @ 2020-04-17 19:45 UTC (permalink / raw)
To: monnier; +Cc: raman, emacs-devel
this is what I meant by "it's hard to debug with the complexity of
Emacspeak".
I've failed to produce a minimal repro case --- what I do observe:
1. Some advice defs are not taking effect i.e. I dont get the
expected auditory feedback.
2. Evaluating the advice definition makes it work, even though the
file containing the advice was already loaded when it was failing.
Stefan Monnier writes:
> > Is there any additional information that I can provide
>
> A reproduceable test case?
> When I try
>
> M-: (defadvice sm-foo (before test activate) (message "before-advice")) RET
> M-: (defun sm-foo () (message "body")) RET
> M-: (sm-foo) RET
>
> the advice works just fine.
>
>
> Stefan
--
Id: kg:/m/0285kf1
--
Id: kg:/m/0285kf1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: advice.el and bytecomp: Did something change recently?
2020-04-17 19:32 ` Stefan Monnier
2020-04-17 19:45 ` T.V Raman
@ 2020-04-17 19:46 ` T.V Raman
2020-04-18 2:03 ` T.V Raman
2 siblings, 0 replies; 7+ messages in thread
From: T.V Raman @ 2020-04-17 19:46 UTC (permalink / raw)
To: monnier; +Cc: raman, emacs-devel
p.s. perhaps byte compilation has something to do with it --- all of
emacspeak's modules are bytecompiled.
Stefan Monnier writes:
> > Is there any additional information that I can provide
>
> A reproduceable test case?
> When I try
>
> M-: (defadvice sm-foo (before test activate) (message "before-advice")) RET
> M-: (defun sm-foo () (message "body")) RET
> M-: (sm-foo) RET
>
> the advice works just fine.
>
>
> Stefan
--
Id: kg:/m/0285kf1
--
Id: kg:/m/0285kf1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: advice.el and bytecomp: Did something change recently?
2020-04-17 19:32 ` Stefan Monnier
2020-04-17 19:45 ` T.V Raman
2020-04-17 19:46 ` T.V Raman
@ 2020-04-18 2:03 ` T.V Raman
2 siblings, 0 replies; 7+ messages in thread
From: T.V Raman @ 2020-04-18 2:03 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Hi Stefan,
After recompiling *everything* within reach: i.e.
1. make dist clean in emacs
2. git pull -a
3 Complete clean build
4. Then compiled all the emacspeak files using the freshly built emacs
The problem went away.
I still have no idea what the issue was,
--
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-18 2:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 16:50 advice.el and bytecomp: Did something change recently? T.V Raman
2020-04-17 17:12 ` Stefan Monnier
2020-04-17 17:22 ` T.V Raman
2020-04-17 19:32 ` Stefan Monnier
2020-04-17 19:45 ` T.V Raman
2020-04-17 19:46 ` T.V Raman
2020-04-18 2:03 ` T.V Raman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).