From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72616: 30.0.60; M-x apropos-library eglot fails Date: Wed, 14 Aug 2024 08:47:40 -0400 Message-ID: References: <86y14z8o7v.fsf@gnu.org> <86sev78fob.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17984"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 72616@debbugs.gnu.org, gerard.vermeulen@posteo.net, joaotavora@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 14 14:48:48 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1seDQm-0004Rt-35 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Aug 2024 14:48:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seDQV-0000HF-3Y; Wed, 14 Aug 2024 08:48:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seDQS-0000Gw-CX for bug-gnu-emacs@gnu.org; Wed, 14 Aug 2024 08:48:28 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seDQR-0004hU-Ad for bug-gnu-emacs@gnu.org; Wed, 14 Aug 2024 08:48:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=3R0w9yJI2tW08tuP4sg5aVvNFoKCvdPRRb0ksDE+Bz4=; b=fiexQsqf+MZZUtpBKMy8+s8b3s7ccAss6asP7T6987l42TknuWPlol8d+2B5k+izE/l63JdICavQa0TU2TpqgshIe/W5oFa0TWcndb7OCn2ePbCdfKabx1M/sSTCnmh5HDgFim0hrkUmRL/ZzxU/D2DoRQQqzE4enOD+2GoCbhfG9o/b+JWNWfGvkSitoFAn1Omf58w0B9YVVb/Iw+R7/vXrMrN+uhmfm1mQ6AS+MEC5aZKWjLHp1lVbLm8WTXpuA0RVVJGH0TsjVe/a+1Jog6rFQ9dT8Xjdihp7ob7i+tZAC7qqQCyjkTavyamc5lJ1Ja62z4uSzxPCojRu9WJCsw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1seDR0-0003DY-18 for bug-gnu-emacs@gnu.org; Wed, 14 Aug 2024 08:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Aug 2024 12:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72616 X-GNU-PR-Package: emacs Original-Received: via spool by 72616-submit@debbugs.gnu.org id=B72616.172363970812324 (code B ref 72616); Wed, 14 Aug 2024 12:49:01 +0000 Original-Received: (at 72616) by debbugs.gnu.org; 14 Aug 2024 12:48:28 +0000 Original-Received: from localhost ([127.0.0.1]:46450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seDQR-0003Ci-Ho for submit@debbugs.gnu.org; Wed, 14 Aug 2024 08:48:27 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seDQP-0003CU-Gu for 72616@debbugs.gnu.org; Wed, 14 Aug 2024 08:48:26 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 40C9910005D; Wed, 14 Aug 2024 08:47:43 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1723639661; bh=GB1UmpfX+Ev8bfF2zid0bSDHyAaRVZliB65nIu0cBCI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Shaclw5N8hus6Biv/T4OANPVJN2eMCt/R1akl+QKu8iiKnAubu0guuZ6WKXmCUnvG hDcgxAwnNsPDSNwN0SBhH41d7vEm6x3qO0QzMV/zuMyvEsOQdYs4v4GnUTJYm0dVlM 7IuUT9WJ8ReaEvsMFpTm1ui7jmFK7labatLL+jaXy+cBKVHj27ILolavE1GFchiz1P MiU3EeF1Dg9ZIcW676F2QC0ycn2nHuvZhwHz6MBkntL1cQ8OCto1PP+jpaOdKZ5wqY 5FxYrVbJNBPhdGsfQm4beqggiJWb2VpJfNt6pbu2dfegc2rszh6omb+Vtct+iv0Qna 7A371yooaPrbg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B741A100042; Wed, 14 Aug 2024 08:47:41 -0400 (EDT) Original-Received: from pastel (unknown [216.154.9.87]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 84BF112024D; Wed, 14 Aug 2024 08:47:41 -0400 (EDT) In-Reply-To: <86sev78fob.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 14 Aug 2024 15:14:28 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290139 Archived-At: >> 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