GNU bug report logs - #60893
30.0.50; ad-deactive has broken interactive TAB completion

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Tue, 17 Jan 2023 20:23:01 UTC

Severity: normal

Found in version 30.0.50

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

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 60893 in the body.
You can then email your comments to 60893 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Tue, 17 Jan 2023 20:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dima Kogan <dima <at> secretsauce.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 17 Jan 2023 20:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; ad-deactive has broken interactive TAB completion
Date: Tue, 17 Jan 2023 12:21:50 -0800
Hi. I'm seeing this in the bleeding-edge build of emacs from git:

1. emacs -Q

2. M-x load-library advice

3. eval:   (defadvice open-line (before dummy-advice (N) activate) 5)

   The actual advice doesn't matter. As long as something is advised
   somewhere

4. M-x ad-deactivate TAB

It should try to complete to a list of existing advised functions.
Intead it throws an error:

  completion--some: Wrong type argument: listp, "open-line"

Thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Wed, 18 Jan 2023 05:11:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ruijie Yu <ruijie <at> netyu.xyz>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: bug-gnu-emacs <at> gnu.org, 60893 <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50; ad-deactive has broken interactive TAB
 completion
Date: Tue, 17 Jan 2023 23:03:10 -0600
Dima Kogan <dima <at> secretsauce.net> writes:

> Hi. I'm seeing this in the bleeding-edge build of emacs from git:
> [...]

Do you still have the commit hash for the build that produces this
issue?  "Bleeding-edge" doesn't convey enough information as commits are
made constantly, and maybe newer commits have already fixed your issue
unintentionally.

Tested two versions, neither showed this issue.

------------------------------------------------------------------------
In GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6)
 of 2023-01-13 built on fw.net.yu
Repository revision: 5a223c7f2ef4c31abbd46367b6ea83cd19d30aa7
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12201007
System Description: Arch Linux

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE
XIM XPM GTK3 ZLIB
------------------------------------------------------------------------
In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36, cairo version 1.17.6) of 2023-01-05 built on ruijie
Repository revision: 8a18369afdc3a873881e7b19b75e94ca96791c84
Repository branch: makepkg
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-modules --without-libotf --without-m17n-flt --without-gconf
 --with-native-compilation=yes --with-xinput2 --with-pgtk
 --without-xaw3d --with-sound=no --with-tree-sitter --without-gpm
 --without-compress-install
 '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP XIM GTK3 ZLIB
------------------------------------------------------------------------

Best,


RY




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Wed, 18 Jan 2023 05:11:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Wed, 18 Jan 2023 05:22:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: Ruijie Yu <ruijie <at> netyu.xyz>
Cc: bug-gnu-emacs <at> gnu.org, 60893 <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50; ad-deactive has broken interactive TAB
 completion
Date: Tue, 17 Jan 2023 21:12:50 -0800
You can't reproduce? How odd. I'm using an emacs-snapshot Debian package
from emacs.secretsauce.net:

  dima <at> shorty:~$ dpkg -l emacs-snapshot-el
  Desired=Unknown/Install/Remove/Purge/Hold
  | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  ||/ Name              Version                                     Architecture Description
  +++-=================-===========================================-============-=================================
  ii  emacs-snapshot-el 2:20230116+emacs-28.2-163642-g77659bd4634-1 all          GNU Emacs LISP (.el) files

So I'm here:

  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=77659bd

Built yesterday. The backtrace looks like this:

  Debugger entered--Lisp error: (wrong-type-argument listp "open-line")
    #f(compiled-function (function) #<bytecode -0x477dabbd668b065>)("open-line")
    completion-basic-try-completion("" ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>) 0)
    #f(compiled-function (style) #<bytecode 0xe13106688cb6919>)(basic)
    completion--some(#f(compiled-function (style) #<bytecode 0xe13106688cb6919>) (basic partial-completion emacs22))
    completion--nth-completion(1 "" ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>) 0 (metadata))
    completion-try-completion("" ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>) 0 (metadata))
    completion--do-completion(43 43)
    completion--in-region-1(43 43)
    #f(compiled-function (start end collection predicate) #<bytecode 0x6e440600d522b49>)(43 43 ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>))
    apply(#f(compiled-function (start end collection predicate) #<bytecode 0x6e440600d522b49>) (43 43 ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>)))
    #f(compiled-function (funs global args) #<bytecode -0xf51d361c9e65a2>)(nil nil (43 43 ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>)))
    completion--in-region(43 43 ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>))
    completion-in-region(43 43 ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>))
    minibuffer-complete()
    funcall-interactively(minibuffer-complete)
    command-execute(minibuffer-complete)
    completing-read-default("Deactivate advice of (default open-line): " ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>) t nil nil nil nil)
    completing-read("Deactivate advice of (default open-line): " ("open-line") #f(compiled-function (function) #<bytecode -0x477dabbd668b065>) t)
    ad-read-advised-function("Deactivate advice of" ad-is-active)
    byte-code("\300\301\302\"C\207" [ad-read-advised-function "Deactivate advice of" ad-is-active] 3)
    command-execute(ad-deactivate record)
    execute-extended-command(nil "ad-deactivate" "ad-deac")
    funcall-interactively(execute-extended-command nil "ad-deactivate" "ad-deac")
    command-execute(execute-extended-command)

I haven't tried to fix it myself. Will do that eventually if nobody
beats me to it.

Thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Wed, 18 Jan 2023 05:22:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Wed, 18 Jan 2023 06:33:02 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ruijie Yu <ruijie <at> netyu.xyz>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: bug-gnu-emacs <at> gnu.org, 60893 <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50; ad-deactive has broken interactive TAB
 completion
Date: Wed, 18 Jan 2023 00:22:17 -0600
Dima Kogan <dima <at> secretsauce.net> writes:

> You can't reproduce? How odd. I'm using an emacs-snapshot Debian package
> from emacs.secretsauce.net:
>
>   dima <at> shorty:~$ dpkg -l emacs-snapshot-el
>   Desired=Unknown/Install/Remove/Purge/Hold
>   | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
>   |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
>   ||/ Name              Version                                     Architecture Description
>   +++-=================-===========================================-============-=================================
>   ii  emacs-snapshot-el 2:20230116+emacs-28.2-163642-g77659bd4634-1 all          GNU Emacs LISP (.el) files
>
> So I'm here:
>
>   https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=77659bd
>
> Built yesterday. The backtrace looks like this:
> [...]
>
> I haven't tried to fix it myself. Will do that eventually if nobody
> beats me to it.
>
> Thanks!

I misunderstood the steps and the description of the anticipated issue
you listed.

The last step you said:

    M-x ad-deactivate TAB

I believe it should be instead:

    M-x ad-deactivate RET TAB

That is, you expect that the completion framework lists "open-line", but
instead it shows an error.

In this case, I can reproduce this issue in both my 29 and my 28.1
build, and I have attached the build information for these two builds in
my previous reply.

Best,


RY




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Wed, 18 Jan 2023 06:33:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Wed, 18 Jan 2023 11:36:02 GMT) Full text and rfc822 format available.

Message #26 received at 60893 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 60893 <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50; ad-deactive has broken interactive TAB
 completion
Date: Wed, 18 Jan 2023 12:34:51 +0100
[Message part 1 (text/plain, inline)]
Dima Kogan <dima <at> secretsauce.net> writes:

> 4. M-x ad-deactivate TAB
>
> It should try to complete to a list of existing advised functions.
> Intead it throws an error:
>
>   completion--some: Wrong type argument: listp, "open-line"

Looks like a regression introduced by

77c3c464a16 * lisp/emacs-lisp/advice.el (ad-advised-functions): Make it a plain list
Stefan Monnier <monnier <at> iro.umontreal.ca> 2018-09-17

Does this fix your problem?

[0001-WIP-Fix-60893.patch (text/x-diff, inline)]
From 5e0980aac23cfa9e5417f07b8853405ad10ee228 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Wed, 18 Jan 2023 12:32:05 +0100
Subject: [PATCH] WIP: Fix #60893

---
 lisp/emacs-lisp/advice.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 080a6d84498..56f0ae2212c 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -1850,7 +1850,7 @@ ad-read-advised-function
 	   ad-advised-functions
 	   (if predicate
                (lambda (function)
-                 (funcall predicate (intern (car function)))))
+                 (funcall predicate (intern function))))
 	   t)))
     (if (equal function "")
 	(if (ad-is-advised default)
--
2.30.2

[Message part 3 (text/plain, inline)]

Thanks,

Michael.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Thu, 19 Jan 2023 05:38:01 GMT) Full text and rfc822 format available.

Message #29 received at 60893 <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 60893 <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50; ad-deactive has broken interactive TAB
 completion
Date: Wed, 18 Jan 2023 21:35:58 -0800
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Looks like a regression introduced by
>
> 77c3c464a16 * lisp/emacs-lisp/advice.el (ad-advised-functions): Make it a plain list
> Stefan Monnier <monnier <at> iro.umontreal.ca> 2018-09-17
>
> Does this fix your problem?
> <PATCH>

Looks good. Seems to fix that issue. Thanks.




Reply sent to Michael Heerdegen <michael_heerdegen <at> web.de>:
You have taken responsibility. (Thu, 19 Jan 2023 18:59:02 GMT) Full text and rfc822 format available.

Notification sent to Dima Kogan <dima <at> secretsauce.net>:
bug acknowledged by developer. (Thu, 19 Jan 2023 18:59:02 GMT) Full text and rfc822 format available.

Message #34 received at 60893-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 60893-done <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50; ad-deactive has broken interactive TAB
 completion
Date: Thu, 19 Jan 2023 19:57:57 +0100
Dima Kogan <dima <at> secretsauce.net> writes:

> > Does this fix your problem?
> > <PATCH>
>
> Looks good. Seems to fix that issue. Thanks.

Installed to master.  Thanks for reporting.

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Thu, 19 Jan 2023 21:22:01 GMT) Full text and rfc822 format available.

Message #37 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Howard Melman <hmelman <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#60893: 30.0.50;
 ad-deactive has broken interactive TAB completion
Date: Thu, 19 Jan 2023 16:21:08 -0500
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Dima Kogan <dima <at> secretsauce.net> writes:
>
>> > Does this fix your problem?
>> > <PATCH>
>>
>> Looks good. Seems to fix that issue. Thanks.
>
> Installed to master.  Thanks for reporting.

I can reproduce the problem in Emacs 28.2 and the patch
fixes it.  Should this be in Emacs 29?

-- 

Howard





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Thu, 19 Jan 2023 23:38:02 GMT) Full text and rfc822 format available.

Message #40 received at 60893 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Howard Melman <hmelman <at> gmail.com>
Cc: 60893 <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50; ad-deactive has broken interactive TAB
 completion
Date: Fri, 20 Jan 2023 00:37:24 +0100
Howard Melman <hmelman <at> gmail.com> writes:

> I can reproduce the problem in Emacs 28.2 and the patch
> fixes it.  Should this be in Emacs 29?

Eh - didn't think about it.  This is a trivial fix of a clear oversight
- I guess it would be ok? - Can I just commit the same commit to
emacs-29 as well?

Thx - Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Fri, 20 Jan 2023 06:51:01 GMT) Full text and rfc822 format available.

Message #43 received at 60893 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: hmelman <at> gmail.com, 60893 <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50;
 ad-deactive has broken interactive TAB completion
Date: Fri, 20 Jan 2023 08:50:34 +0200
> Cc: 60893 <at> debbugs.gnu.org
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Date: Fri, 20 Jan 2023 00:37:24 +0100
> 
> Howard Melman <hmelman <at> gmail.com> writes:
> 
> > I can reproduce the problem in Emacs 28.2 and the patch
> > fixes it.  Should this be in Emacs 29?
> 
> Eh - didn't think about it.  This is a trivial fix of a clear oversight
> - I guess it would be ok? - Can I just commit the same commit to
> emacs-29 as well?

I already cherry-picked that commit to the emacs-29 branch yesterday.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Fri, 20 Jan 2023 13:28:02 GMT) Full text and rfc822 format available.

Message #46 received at 60893 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: hmelman <at> gmail.com, 60893 <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50; ad-deactive has broken interactive TAB
 completion
Date: Fri, 20 Jan 2023 14:27:44 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> I already cherry-picked that commit to the emacs-29 branch yesterday.

Thanks 🙏.

I see you edited the commit message and removed an empty line.  We
prefer to not have an empty line between the second paragraph with
explanations and the individual files section, is this correct?

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60893; Package emacs. (Fri, 20 Jan 2023 13:49:02 GMT) Full text and rfc822 format available.

Message #49 received at 60893 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: hmelman <at> gmail.com, 60893 <at> debbugs.gnu.org
Subject: Re: bug#60893: 30.0.50; ad-deactive has broken interactive TAB
 completion
Date: Fri, 20 Jan 2023 15:48:53 +0200
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: hmelman <at> gmail.com,  60893 <at> debbugs.gnu.org
> Date: Fri, 20 Jan 2023 14:27:44 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > I already cherry-picked that commit to the emacs-29 branch yesterday.
> 
> Thanks 🙏.
> 
> I see you edited the commit message and removed an empty line.  We
> prefer to not have an empty line between the second paragraph with
> explanations and the individual files section, is this correct?

Yes.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Feb 2023 12:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.