unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
@ 2023-01-17 20:21 Dima Kogan
  2023-01-18  5:03 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-01-18 11:34 ` Michael Heerdegen
  0 siblings, 2 replies; 12+ messages in thread
From: Dima Kogan @ 2023-01-17 20:21 UTC (permalink / raw)
  To: 60893

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!





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-17 20:21 bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion Dima Kogan
@ 2023-01-18  5:03 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-01-18  5:12   ` Dima Kogan
  2023-01-18 11:34 ` Michael Heerdegen
  1 sibling, 1 reply; 12+ messages in thread
From: Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-01-18  5:03 UTC (permalink / raw)
  To: Dima Kogan; +Cc: 60893


Dima Kogan <dima@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-18  5:03 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-01-18  5:12   ` Dima Kogan
  2023-01-18  6:22     ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 12+ messages in thread
From: Dima Kogan @ 2023-01-18  5:12 UTC (permalink / raw)
  To: Ruijie Yu; +Cc: 60893

You can't reproduce? How odd. I'm using an emacs-snapshot Debian package
from emacs.secretsauce.net:

  dima@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!





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-18  5:12   ` Dima Kogan
@ 2023-01-18  6:22     ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 12+ messages in thread
From: Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-01-18  6:22 UTC (permalink / raw)
  To: Dima Kogan; +Cc: 60893


Dima Kogan <dima@secretsauce.net> writes:

> You can't reproduce? How odd. I'm using an emacs-snapshot Debian package
> from emacs.secretsauce.net:
>
>   dima@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-17 20:21 bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion Dima Kogan
  2023-01-18  5:03 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-01-18 11:34 ` Michael Heerdegen
  2023-01-19  5:35   ` Dima Kogan
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Heerdegen @ 2023-01-18 11:34 UTC (permalink / raw)
  To: Dima Kogan; +Cc: 60893

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

Dima Kogan <dima@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@iro.umontreal.ca> 2018-09-17

Does this fix your problem?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-WIP-Fix-60893.patch --]
[-- Type: text/x-diff, Size: 803 bytes --]

From 5e0980aac23cfa9e5417f07b8853405ad10ee228 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@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


[-- Attachment #3: Type: text/plain, Size: 20 bytes --]



Thanks,

Michael.

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-18 11:34 ` Michael Heerdegen
@ 2023-01-19  5:35   ` Dima Kogan
  2023-01-19 18:57     ` Michael Heerdegen
  0 siblings, 1 reply; 12+ messages in thread
From: Dima Kogan @ 2023-01-19  5:35 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 60893

Michael Heerdegen <michael_heerdegen@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@iro.umontreal.ca> 2018-09-17
>
> Does this fix your problem?
> <PATCH>

Looks good. Seems to fix that issue. Thanks.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-19  5:35   ` Dima Kogan
@ 2023-01-19 18:57     ` Michael Heerdegen
  2023-01-19 21:21       ` Howard Melman
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Heerdegen @ 2023-01-19 18:57 UTC (permalink / raw)
  To: Dima Kogan; +Cc: 60893-done

Dima Kogan <dima@secretsauce.net> writes:

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

Installed to master.  Thanks for reporting.

Michael.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-19 18:57     ` Michael Heerdegen
@ 2023-01-19 21:21       ` Howard Melman
  2023-01-19 23:37         ` Michael Heerdegen
  0 siblings, 1 reply; 12+ messages in thread
From: Howard Melman @ 2023-01-19 21:21 UTC (permalink / raw)
  To: 60893


Michael Heerdegen <michael_heerdegen@web.de> writes:

> Dima Kogan <dima@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






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-19 21:21       ` Howard Melman
@ 2023-01-19 23:37         ` Michael Heerdegen
  2023-01-20  6:50           ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Heerdegen @ 2023-01-19 23:37 UTC (permalink / raw)
  To: Howard Melman; +Cc: 60893

Howard Melman <hmelman@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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-19 23:37         ` Michael Heerdegen
@ 2023-01-20  6:50           ` Eli Zaretskii
  2023-01-20 13:27             ` Michael Heerdegen
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2023-01-20  6:50 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: hmelman, 60893

> Cc: 60893@debbugs.gnu.org
> From: Michael Heerdegen <michael_heerdegen@web.de>
> Date: Fri, 20 Jan 2023 00:37:24 +0100
> 
> Howard Melman <hmelman@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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-20  6:50           ` Eli Zaretskii
@ 2023-01-20 13:27             ` Michael Heerdegen
  2023-01-20 13:48               ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Heerdegen @ 2023-01-20 13:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: hmelman, 60893

Eli Zaretskii <eliz@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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion
  2023-01-20 13:27             ` Michael Heerdegen
@ 2023-01-20 13:48               ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2023-01-20 13:48 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: hmelman, 60893

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: hmelman@gmail.com,  60893@debbugs.gnu.org
> Date: Fri, 20 Jan 2023 14:27:44 +0100
> 
> Eli Zaretskii <eliz@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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-01-20 13:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 20:21 bug#60893: 30.0.50; ad-deactive has broken interactive TAB completion Dima Kogan
2023-01-18  5:03 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-18  5:12   ` Dima Kogan
2023-01-18  6:22     ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-18 11:34 ` Michael Heerdegen
2023-01-19  5:35   ` Dima Kogan
2023-01-19 18:57     ` Michael Heerdegen
2023-01-19 21:21       ` Howard Melman
2023-01-19 23:37         ` Michael Heerdegen
2023-01-20  6:50           ` Eli Zaretskii
2023-01-20 13:27             ` Michael Heerdegen
2023-01-20 13:48               ` Eli Zaretskii

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).