* bug#23523: 25.0.93; Around advice miscontrued as alias, but not always
@ 2016-05-12 16:34 Kaushal Modi
2016-05-12 16:42 ` Glenn Morris
2021-09-03 11:49 ` bug#23523: bug#21299: describe-function on advised autoloads Lars Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: Kaushal Modi @ 2016-05-12 16:34 UTC (permalink / raw
To: 23523
[-- Attachment #1: Type: text/plain, Size: 5211 bytes --]
--text follows this line--
Here's a short elisp snippet to try in an emacs -Q session:
=====
(defun foo (orig-fun &rest args)
(apply orig-fun args))
(advice-add 'report-emacs-bug :around #'foo)
(advice-add 'pop-to-mark-command :around #'foo)
=====
After evaluating the above, if I do C-h f report-emacs-bug, I get:
=====
report-emacs-bug is an alias for ‘report-emacs-bug’ in ‘emacsbug.el’.
It is bound to <menu-bar> <help-menu> <send-emacs-bug-report>.
(report-emacs-bug TOPIC &optional UNUSED)
Report a bug in GNU Emacs.
Prompts for bug subject. Leaves you in a mail buffer.
=====
But for C-h f pop-to-mark-command, I get:
=====
pop-to-mark-command is an interactive compiled Lisp function in
‘simple.el’.
(pop-to-mark-command)
:around advice: ‘foo’
Jump to mark, and pop a new position for mark off the ring.
(Does not affect global mark ring).
=====
I picked pop-to-mark-command just randomly. I noticed the misinformation
for report-emacs-bug (irony!) only. Then at random advised
pop-to-mark-command too, but emacs does not misunderstand that advice as
alias.
And here comes the twist.. After above, in the same session, once I do M-x
report-emacs-bug and then if I do C-h f report-emacs-bug, I then get:
=====
report-emacs-bug is an interactive autoloaded compiled Lisp function
in ‘emacsbug.el’.
It is bound to <menu-bar> <help-menu> <send-emacs-bug-report>.
(report-emacs-bug TOPIC &optional UNUSED)
:around advice: ‘foo’
Report a bug in GNU Emacs.
Prompts for bug subject. Leaves you in a mail buffer.
=====
So what's the mystery? Emacs cannot tell if a function is advised until it
is evaluated and executed?
In GNU Emacs 25.0.93.5 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
of 2016-05-05 built on
Repository revision: 5e814e02f0b0b85fa486975eced09e4a7ed8ce5c
Windowing system distributor 'The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Workstation release 6.6
(Santiago)
Configured using:
'configure --with-modules
--prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-25
'CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
-I/usr/include/freetype2 -I/usr/include' 'CFLAGS=-ggdb3 -O0'
'CXXFLAGS=-ggdb3 -O0' 'LDFLAGS=-L/home/kmodi/usr_local/6/lib
-L/home/kmodi/usr_local/6/lib64 -ggdb3'
PKG_CONFIG_PATH=/home/kmodi/usr_local/6/lib/pkgconfig:/home/kmodi/usr_local/6/lib64/pkgconfig:/cad/adi/apps/gnu/linux/x86_64/6/lib/pkgconfig:/cad/adi/apps/gnu/linux/x86_64/6/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig:/lib64/pkgconfig'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11 MODULES
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
foo
nil [2 times]
Type C-x 1 to delete the help window.
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-extra
help-fns help-mode easymenu cl-loaddefs pcase cl-lib time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)
Memory information:
((conses 16 88305 8121)
(symbols 48 19775 0)
(miscs 40 47 172)
(strings 32 14598 4870)
(string-bytes 1 436699)
(vectors 16 12461)
(vector-slots 8 434860 5020)
(floats 8 168 71)
(intervals 56 264 4)
(buffers 976 12)
(heap 1024 38706 719))
--
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 7051 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#23523: 25.0.93; Around advice miscontrued as alias, but not always
2016-05-12 16:34 bug#23523: 25.0.93; Around advice miscontrued as alias, but not always Kaushal Modi
@ 2016-05-12 16:42 ` Glenn Morris
2016-05-12 16:47 ` Kaushal Modi
2021-09-03 11:49 ` bug#23523: bug#21299: describe-function on advised autoloads Lars Ingebrigtsen
1 sibling, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2016-05-12 16:42 UTC (permalink / raw
To: Kaushal Modi; +Cc: 23523
Is this a duplicate of https://debbugs.gnu.org/21299 ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#23523: 25.0.93; Around advice miscontrued as alias, but not always
2016-05-12 16:42 ` Glenn Morris
@ 2016-05-12 16:47 ` Kaushal Modi
0 siblings, 0 replies; 4+ messages in thread
From: Kaushal Modi @ 2016-05-12 16:47 UTC (permalink / raw
To: Glenn Morris; +Cc: 23523
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
Yes it is! Can you please send email to control?
I do not know if the order of bug # in the merge command matter.
Are
merge 21299 23523
and
merge 23523 21299
equivalent?
Or does the order matter?
On Thu, May 12, 2016 at 12:42 PM Glenn Morris <rgm@gnu.org> wrote:
>
> Is this a duplicate of https://debbugs.gnu.org/21299 ?
>
--
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 885 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#23523: bug#21299: describe-function on advised autoloads
2016-05-12 16:34 bug#23523: 25.0.93; Around advice miscontrued as alias, but not always Kaushal Modi
2016-05-12 16:42 ` Glenn Morris
@ 2021-09-03 11:49 ` Lars Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-03 11:49 UTC (permalink / raw
To: Kaushal Modi; +Cc: 23523, 21299
Kaushal Modi <kaushal.modi@gmail.com> writes:
> Here's a short elisp snippet to try in an emacs -Q session:
>
> =====
> (defun foo (orig-fun &rest args)
> (apply orig-fun args))
> (advice-add 'report-emacs-bug :around #'foo)
> (advice-add 'pop-to-mark-command :around #'foo)
> =====
>
> After evaluating the above, if I do C-h f report-emacs-bug, I get:
>
> =====
> report-emacs-bug is an alias for ‘report-emacs-bug’ in ‘emacsbug.el’.
>
> It is bound to <menu-bar> <help-menu> <send-emacs-bug-report>.
>
> (report-emacs-bug TOPIC &optional UNUSED)
>
> Report a bug in GNU Emacs.
> Prompts for bug subject. Leaves you in a mail buffer.
This is now fixed in Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-03 11:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-12 16:34 bug#23523: 25.0.93; Around advice miscontrued as alias, but not always Kaushal Modi
2016-05-12 16:42 ` Glenn Morris
2016-05-12 16:47 ` Kaushal Modi
2021-09-03 11:49 ` bug#23523: bug#21299: describe-function on advised autoloads Lars Ingebrigtsen
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.