GNU bug report logs - #72616
30.0.60; M-x apropos-library eglot fails

Previous Next

Package: emacs;

Reported by: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>

Date: Wed, 14 Aug 2024 08:06:02 UTC

Severity: normal

Found in version 30.0.60

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72616 <at> debbugs.gnu.org, gerard.vermeulen <at> posteo.net, joaotavora <at> gmail.com
Subject: Re: bug#72616: 30.0.60; M-x apropos-library eglot fails
Date: Wed, 14 Aug 2024 08:47:40 -0400
>> This doesn't look right: the meaning of `define-symbol-props` in
>> `load-history` should be defined in a more modular way, near
>> `define-symbol-prop` rather than by hardcoding something in
>> `apropos.el`.
>
> Is it better to leave us where we are now: that apropos-library
> signals an error instead of displaying the information about the
> library?

In the mean time we could just sanitize the data we use heuristically,
as in the patch below.

> Patches are welcome, but maybe we should start with someone explaining
> what are those define-symbol-props elements in load-history.  They are
> currently completely undocumented AFAICT, and so anyone but the
> person(s) who added that to Emacs will have hard time coming up with
> changes such as you describe.  (Apologies if this is already
> documented and I just missed it.)

Indeed, we currently don't have a good way to document the new kinds of
elements that can occur in `load-history` and the new ones we do have
(e.g. `cl-defmethod`, `define-type`, ...) are currently undocumented.


        Stefan


diff --git a/lisp/apropos.el b/lisp/apropos.el
index 6c6cd0b593d..0655fecd0e8 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -734,7 +734,10 @@ apropos-library
         ;; FIXME: Print information about each individual method: both
         ;; its docstring and specializers (bug#21422).
         ('cl-defmethod (push (cadr x) provides))
-	(_ (push (or (cdr-safe x) x) symbols))))
+        ;; FIXME: Add extension point (bug#72616).
+	(_ (let ((sym (or (cdr-safe x) x)))
+	     (and sym (symbolp sym)
+	          (push sym symbols))))))
     (let ((apropos-pattern "") ;Dummy binding for apropos-symbols-internal.
           (text
            (concat





This bug report was last modified 305 days ago.

Previous Next


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