GNU bug report logs - #74727
[PATCH] ; * lisp/apropos.el (apropos-library): Fix typo.

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Sat, 7 Dec 2024 13:32:02 UTC

Severity: normal

Tags: patch

Fixed in version 31.1

Done: Dmitry Gutov <dmitry <at> gutov.dev>

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 74727 in the body.
You can then email your comments to 74727 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 dmitry <at> gutov.dev, bug-gnu-emacs <at> gnu.org:
bug#74727; Package emacs. (Sat, 07 Dec 2024 13:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eshel Yaron <me <at> eshelyaron.com>:
New bug report received and forwarded. Copy sent to dmitry <at> gutov.dev, bug-gnu-emacs <at> gnu.org. (Sat, 07 Dec 2024 13:32:02 GMT) Full text and rfc822 format available.

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

From: Eshel Yaron <me <at> eshelyaron.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] ; * lisp/apropos.el (apropos-library): Fix typo.
Date: Sat, 07 Dec 2024 14:31:53 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

This patch fixes the issue described below, which IIUC originates in a
mere typo in commit 671862f6b3089c3a503c1b6936a821ad54429359

1. emacs -Q
2. M-x apropos-library elisp-mode RET
3. The *Apropos* buffer incorrectly lists methods that elisp-mode.el
   defines as if they were _features_ provided by the library.
   Accordingly, clicking on one of those references yields an error such
   as "Unknown library `xref-backend-definitions'"


[0001-lisp-apropos.el-apropos-library-Fix-typo.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74727; Package emacs. (Sun, 08 Dec 2024 01:55:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eshel Yaron <me <at> eshelyaron.com>, 74727 <at> debbugs.gnu.org
Subject: Re: bug#74727: [PATCH] ; * lisp/apropos.el (apropos-library): Fix
 typo.
Date: Sun, 8 Dec 2024 03:54:19 +0200
Hi Eshel,

On 07/12/2024 15:31, Eshel Yaron wrote:
> This patch fixes the issue described below, which IIUC originates in a
> mere typo in commit 671862f6b3089c3a503c1b6936a821ad54429359
> 
> 1. emacs -Q
> 2. M-x apropos-library elisp-mode RET
> 3. The*Apropos* buffer incorrectly lists methods that elisp-mode.el
>     defines as if they were_features_ provided by the library.
>     Accordingly, clicking on one of those references yields an error such
>     as "Unknown library `xref-backend-definitions'"

Thanks! That's a good suggestion.

If you've started testing this area, though, do you know of a case when 
dropping this case - like:

diff --git a/lisp/apropos.el b/lisp/apropos.el
index 0655fecd0e8..9af8a7269ae 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -733,7 +733,7 @@ apropos-library
         ('t nil)                     ; Skip "was an autoload" entries.
         ;; FIXME: Print information about each individual method: both
         ;; its docstring and specializers (bug#21422).
-        ('cl-defmethod (push (cadr x) provides))
+        ;; ('cl-defmethod (push (cadr x) provides))
         ;; FIXME: Add extension point (bug#72616).
 	(_ (let ((sym (or (cdr-safe x) x)))
 	     (and sym (symbolp sym)


...does not work just as well?

From what I see now, any 'cl-defmethod' entry in load-history is 
accompanied by a 'defun' entry anyway. And the original report 
(https://debbugs.gnu.org/21422) was about an error being raised, but I 
can't reproduce it now after commenting this line out.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74727; Package emacs. (Sun, 08 Dec 2024 16:38:02 GMT) Full text and rfc822 format available.

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

From: Eshel Yaron <me <at> eshelyaron.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 74727 <at> debbugs.gnu.org
Subject: Re: bug#74727: [PATCH] ; * lisp/apropos.el (apropos-library): Fix
 typo.
Date: Sun, 08 Dec 2024 17:37:14 +0100
Dmitry Gutov <dmitry <at> gutov.dev> writes:

> Hi Eshel,
>
> On 07/12/2024 15:31, Eshel Yaron wrote:
>> This patch fixes the issue described below, which IIUC originates in a
>> mere typo in commit 671862f6b3089c3a503c1b6936a821ad54429359
>> 
>> 1. emacs -Q
>> 2. M-x apropos-library elisp-mode RET
>> 3. The*Apropos* buffer incorrectly lists methods that elisp-mode.el
>>     defines as if they were_features_ provided by the library.
>>     Accordingly, clicking on one of those references yields an error such
>>     as "Unknown library `xref-backend-definitions'"
>
> Thanks! That's a good suggestion.
>
> If you've started testing this area, though, do you know of a case when 
> dropping this case - like:
>
> diff --git a/lisp/apropos.el b/lisp/apropos.el
> index 0655fecd0e8..9af8a7269ae 100644
> --- a/lisp/apropos.el
> +++ b/lisp/apropos.el
> @@ -733,7 +733,7 @@ apropos-library
>           ('t nil)                     ; Skip "was an autoload" entries.
>           ;; FIXME: Print information about each individual method: both
>           ;; its docstring and specializers (bug#21422).
> -        ('cl-defmethod (push (cadr x) provides))
> +        ;; ('cl-defmethod (push (cadr x) provides))
>           ;; FIXME: Add extension point (bug#72616).
>   	(_ (let ((sym (or (cdr-safe x) x)))
>   	     (and sym (symbolp sym)
>
> ...does not work just as well?

Yes, that seems to work too, and it doesn't produce duplicate entries
for these definitions, so that's even better :)

>  From what I see now, any 'cl-defmethod' entry in load-history is 
> accompanied by a 'defun' entry anyway. And the original report 
> (https://debbugs.gnu.org/21422) was about an error being raised, but I 
> can't reproduce it now after commenting this line out.

Same here.


Eshel




Reply sent to Dmitry Gutov <dmitry <at> gutov.dev>:
You have taken responsibility. (Tue, 10 Dec 2024 01:42:02 GMT) Full text and rfc822 format available.

Notification sent to Eshel Yaron <me <at> eshelyaron.com>:
bug acknowledged by developer. (Tue, 10 Dec 2024 01:42:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 74727-done <at> debbugs.gnu.org
Subject: Re: bug#74727: [PATCH] ; * lisp/apropos.el (apropos-library): Fix
 typo.
Date: Tue, 10 Dec 2024 03:41:43 +0200
Version: 31.1

On 08/12/2024 18:37, Eshel Yaron wrote:
> Yes, that seems to work too, and it doesn't produce duplicate entries
> for these definitions, so that's even better 🙂
> 
>>   From what I see now, any 'cl-defmethod' entry in load-history is
>> accompanied by a 'defun' entry anyway. And the original report
>> (https://debbugs.gnu.org/21422) was about an error being raised, but I
>> can't reproduce it now after commenting this line out.
> Same here.

Thanks for verifying! Pushed to master and closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 07 Jan 2025 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 165 days ago.

Previous Next


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