unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74727: [PATCH] ; * lisp/apropos.el (apropos-library): Fix typo.
@ 2024-12-07 13:31 Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-12-08  1:54 ` Dmitry Gutov
  0 siblings, 1 reply; 4+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-12-07 13:31 UTC (permalink / raw)
  To: 74727; +Cc: Dmitry Gutov

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

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'"



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-apropos.el-apropos-library-Fix-typo.patch --]
[-- Type: text/patch, Size: 885 bytes --]

From 40af45daf1ff41ddb1ba624a99a249b36f724bd0 Mon Sep 17 00:00:00 2001
From: Eshel Yaron <me@eshelyaron.com>
Date: Sat, 7 Dec 2024 14:13:12 +0100
Subject: [PATCH] ; * lisp/apropos.el (apropos-library): Fix typo.

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

diff --git a/lisp/apropos.el b/lisp/apropos.el
index 0655fecd0e8..eb2c36f673e 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) symbols))
         ;; FIXME: Add extension point (bug#72616).
 	(_ (let ((sym (or (cdr-safe x) x)))
 	     (and sym (symbolp sym)
-- 
2.46.2


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

* bug#74727: [PATCH] ; * lisp/apropos.el (apropos-library): Fix typo.
  2024-12-07 13:31 bug#74727: [PATCH] ; * lisp/apropos.el (apropos-library): Fix typo Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-12-08  1:54 ` Dmitry Gutov
  2024-12-08 16:37   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2024-12-08  1:54 UTC (permalink / raw)
  To: Eshel Yaron, 74727

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.





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

* bug#74727: [PATCH] ; * lisp/apropos.el (apropos-library): Fix typo.
  2024-12-08  1:54 ` Dmitry Gutov
@ 2024-12-08 16:37   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-12-10  1:41     ` Dmitry Gutov
  0 siblings, 1 reply; 4+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-12-08 16:37 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 74727

Dmitry Gutov <dmitry@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





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

* bug#74727: [PATCH] ; * lisp/apropos.el (apropos-library): Fix typo.
  2024-12-08 16:37   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-12-10  1:41     ` Dmitry Gutov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2024-12-10  1:41 UTC (permalink / raw)
  To: Eshel Yaron; +Cc: 74727-done

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.





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

end of thread, other threads:[~2024-12-10  1:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-07 13:31 bug#74727: [PATCH] ; * lisp/apropos.el (apropos-library): Fix typo Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-08  1:54 ` Dmitry Gutov
2024-12-08 16:37   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-10  1:41     ` Dmitry Gutov

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