From unknown Sat Jun 21 05:15:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36588: Unable to revert M-x apropos help buffer Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2019 03:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36588 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 36588@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156281593819427 (code B ref -1); Thu, 11 Jul 2019 03:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Jul 2019 03:32:18 +0000 Received: from localhost ([127.0.0.1]:36884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlPog-00053H-8x for submit@debbugs.gnu.org; Wed, 10 Jul 2019 23:32:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:59877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlPoe-000539-DV for submit@debbugs.gnu.org; Wed, 10 Jul 2019 23:32:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44465) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlPoc-0001iP-Da for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2019 23:32:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlPob-0007Ae-BJ for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2019 23:32:14 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:37339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlPob-00077W-54 for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2019 23:32:13 -0400 Received: by mail-wr1-f49.google.com with SMTP id n9so4561444wrr.4 for ; Wed, 10 Jul 2019 20:32:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=1uiafGdME9W6e2ObWNL0sQdb62TXwlyvw26FTxnJ7To=; b=JA56Dnc08xZ5abQ1d0KMLvRDMIifddjlptEHziXwkTVIxfmUXJR7kmAaSHXpCNI0EJ YrDqQfLdEjiCdXkFh5tYQWRTbkbDPKMUd946F0yPi0xa7KLCpDnitNP1FOXCdtM9nNnF Hu3nK3C0PEx18i4CN3pQST7YFseagKI5OoJmAk0uw0fjS012ciKVLtU10F6YV4kmMQF5 10pSaKZ/uxbHdVfpO3Wm6a6bmvSCARX928d2tFYhJ+aUpwFk0VIFbq2jb4XqvcMmLMmb nArYYoSFKwfrRu/f1U6Y6x8iUWUNYcBd/cjSrcWmWtnv30Bx3ghXsenH1yk7D3KOLunD 5g+w== X-Gm-Message-State: APjAAAXjSkKZELMUdS9O9Es/HssD2xctSfaD2YfUEhR/cR1GgNpiC1Na AMnCKtT/NEnwkETNLnNaHO46XlRrGNFkfKMnph9EpFP6 X-Google-Smtp-Source: APXvYqzUKBsc+DUMimGZmz9suaA5SqODa0LYuzsrcorfgwLGnzVuZFibsQblEXf2FTWQaLE0uvAt14KiZvhjw3Mjcd8= X-Received: by 2002:adf:e541:: with SMTP id z1mr1208928wrm.48.1562815930986; Wed, 10 Jul 2019 20:32:10 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Thu, 11 Jul 2019 05:31:59 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.221.49 X-Spam-Score: -0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) I get an error trying to revert the apropos help buffer on Emacs 27 (current master). I could also reproduce this on 26.1. Steps to reproduce: 0. emacs -Q 1. M-x apropos RET foo RET 2. C-x o 3. g yes RET 4. Error: apply: Symbol=E2=80=99s function definition is void: nil Backtrace: Debugger entered--Lisp error: (void-function nil) nil() apply(nil nil) help-mode-revert-buffer(t nil) revert-buffer(t) funcall-interactively(revert-buffer t) #(revert-buffer nil nil) apply(# revert-buffer (nil nil)) call-interactively@ido-cr+-record-current-command(# revert-buffer nil nil) apply(call-interactively@ido-cr+-record-current-command # (revert-buffer nil nil)) call-interactively(revert-buffer nil nil) command-execute(revert-buffer) GNU Emacs 27.0.50 (build 5, x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G22010)) of 2019-07-11 Thanks, Stefan Kangas From unknown Sat Jun 21 05:15:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36588: Unable to revert M-x apropos help buffer Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2019 14:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36588 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: 36588@debbugs.gnu.org Received: via spool by 36588-submit@debbugs.gnu.org id=B36588.156285684728076 (code B ref 36588); Thu, 11 Jul 2019 14:55:02 +0000 Received: (at 36588) by debbugs.gnu.org; 11 Jul 2019 14:54:07 +0000 Received: from localhost ([127.0.0.1]:38368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlaSV-0007Ik-9h for submit@debbugs.gnu.org; Thu, 11 Jul 2019 10:54:07 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlaST-0007IA-0Q for 36588@debbugs.gnu.org; Thu, 11 Jul 2019 10:54:05 -0400 Received: by mail-wr1-f65.google.com with SMTP id z1so6605828wru.13 for <36588@debbugs.gnu.org>; Thu, 11 Jul 2019 07:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ThmJjBssfJ8Bg08h9Hg5v/qhvf2slyQbf/9GF8qaE0M=; b=G3jSldDcHJWZE1jk3Nw4Fm1HYo9qBU2DzE39Qbio3WtIVnZjN7Qj32SHT+jatVd2lK Rqzl9gFyurPE6Vh/8DAhFsV5/aQUY/OF6XyIhQYscZoi64ISLnhhhJhQ9LKr8fjgJshf 1+jG/fmqdoqgbguCByEmevpXhQDE9wmBgQ8fzz9m6ZFLb9crvFed+cyLQEGqB/K7P18T f6+2Q5bz/JM+XSSDS9WcGM6GneQO57PkSv+xHw0Rv0I6p/Lvd5rF8iGb4LNHVElbg+sl 2GQnllBTMYK/E+hql5WvQ/RdxB70hrGcegDzpRvHbqSoriIn11S36D4fngyRPOQ4PA3E wdRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ThmJjBssfJ8Bg08h9Hg5v/qhvf2slyQbf/9GF8qaE0M=; b=B6KH5nVSXmDz1Nv/0EppCMPAY+grQcLo7TyX77oLQfnfqeor3va0nBh6jkeVf2+ER7 wzydmo/K0dQ149kdI14WmXtSe0QP4kTNSwN6RogsVSCIa9a6oQzttgMTMNvBdemCupYq dlt0qNx3OYN+Y3Dai4ql1dMFOwKYQWkVjAibOK9YuMF1yRJC5rz5itJwBwOVsYFF416y TpsqM3cdPH4v5qj8pa+IkR4M8t6zYgG+qtSrQssZl4MCyAMXrJOSLV5iOHfoCec6RkeJ xza0sKJmJ2ME2ZUBADyhjPCjgRmbI2BfqwhowthT1OqVds8bKvNZUXv8PBzgQRxxIxkf DAlA== X-Gm-Message-State: APjAAAVa44FKgyLuf3nTsAa3gDW51v/9J81XM1nh1nLOMHop0EIvmmQC 5nNEkvGtMe8s96gz4QT/OC8KdAPyNY4= X-Google-Smtp-Source: APXvYqzHkgUrtRO4BHKW0U1qyeA2+90zek2Bq5Ba2i+/YLd1fjR4Tw37iVOHNbBzIwgKT2poJYx/WA== X-Received: by 2002:a5d:5692:: with SMTP id f18mr5697791wrv.104.1562856838652; Thu, 11 Jul 2019 07:53:58 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id j189sm6283001wmb.48.2019.07.11.07.53.57 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 07:53:57 -0700 (PDT) From: "Basil L. Contovounesios" References: Date: Thu, 11 Jul 2019 15:53:56 +0100 In-Reply-To: (Stefan Kangas's message of "Thu, 11 Jul 2019 05:31:59 +0200") Message-ID: <87h87sk4fv.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 36588 minor tags 36588 + patch quit Stefan Kangas writes: > I get an error trying to revert the apropos help buffer on Emacs 27 > (current master). I could also reproduce this on 26.1. > > Steps to reproduce: > 0. emacs -Q > 1. M-x apropos RET foo RET > 2. C [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: tcd.ie] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.65 listed in list.dnswl.org] 1.3 PDS_NO_HELO_DNS High profile HELO but no A record X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable severity 36588 minor tags 36588 + patch quit Stefan Kangas writes: > I get an error trying to revert the apropos help buffer on Emacs 27 > (current master). I could also reproduce this on 26.1. > > Steps to reproduce: > 0. emacs -Q > 1. M-x apropos RET foo RET > 2. C-x o > 3. g yes RET > 4. Error: > apply: Symbol=E2=80=99s function definition is void: nil > > Backtrace: > Debugger entered--Lisp error: (void-function nil) > nil() > apply(nil nil) > help-mode-revert-buffer(t nil) > revert-buffer(t) > funcall-interactively(revert-buffer t) > #(revert-buffer nil nil) > apply(# revert-buffer (nil nil)) > call-interactively@ido-cr+-record-current-command(# call-interactively> revert-buffer nil nil) > apply(call-interactively@ido-cr+-record-current-command # call-interactively> (revert-buffer nil nil)) > call-interactively(revert-buffer nil nil) > command-execute(revert-buffer) This is because Apropos buffers are set up in apropos-print using with-output-to-temp-buffer, which by default calls help-mode, which sets revert-buffer-function permanently-locally to help-mode-revert-buffer. [Aside: Why is revert-buffer-function permanent-local?] help-mode-revert-buffer expects the command which generated the Help buffer to have previously called help-setup-xref. This should be possible to do in Apropos, but it would be quite ugly as help-setup-xref needs to be called with the Help buffer current, so Apropos commands would need to set their own version of help-xref-stack-item before apropos-print performs the help-setup-xref dance. Besides, Apropos buffers are not (currently) really Help buffers. Instead, I propose emulating a simpler version of help-setup-xref specific to Apropos: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Support-reverting-Apropos-buffers-bug-36588.patch >From 890d2d6c1447f207892be734ab7412b4b471ddb7 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Thu, 11 Jul 2019 15:11:35 +0100 Subject: [PATCH] Support reverting Apropos buffers (bug#36588) * lisp/apropos.el (apropos--current): New variable akin to help-xref-stack-item storing information for revert-buffer. (apropos--revert-buffer): New function. (apropos-mode): Use it as revert-buffer-function. (apropos-command, apropos, apropos-library, apropos-value) (apropos-local-value, apropos-documentation): Set apropos--current in low-level commands, i.e., those which do not call other commands. --- lisp/apropos.el | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lisp/apropos.el b/lisp/apropos.el index 1b86f5bcde..79e5a1518f 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -212,6 +212,12 @@ apropos-synonyms Each element is a list of words where the first word is the standard Emacs term, and the rest of the words are alternative terms.") +(defvar apropos--current nil + "List of current Apropos function followed by its arguments. +Used by `apropos--revert-buffer' to regenerate the current +Apropos buffer. Each Apropos command should ensure it is set +before `apropos-mode' makes it buffer-local.") + ;;; Button types used by apropos @@ -472,10 +478,18 @@ apropos-true-hit-doc "Return t if DOC is really matched by the current keywords." (apropos-true-hit doc apropos-all-words)) +(defun apropos--revert-buffer (_ignore-auto noconfirm) + "Regenerate current Apropos buffer using `apropos--current'. +Intended as a value for `revert-buffer-function'." + (when (or noconfirm (yes-or-no-p "Revert apropos buffer? ")) + (apply #'funcall apropos--current))) + (define-derived-mode apropos-mode special-mode "Apropos" "Major mode for following hyperlinks in output of apropos commands. -\\{apropos-mode-map}") +\\{apropos-mode-map}" + (make-local-variable 'apropos--current) + (setq-local revert-buffer-function #'apropos--revert-buffer)) (defvar apropos-multi-type t "If non-nil, this apropos query concerns multiple types. @@ -550,6 +564,7 @@ apropos-command (if (or current-prefix-arg apropos-do-all) "command or function" "command")) current-prefix-arg)) + (setq apropos--current (list #'apropos-command pattern do-all var-predicate)) (apropos-parse-pattern pattern) (let ((message (let ((standard-output (get-buffer-create "*Apropos*"))) @@ -628,6 +643,7 @@ apropos Returns list of symbols and documentation found." (interactive (list (apropos-read-pattern "symbol") current-prefix-arg)) + (setq apropos--current (list #'apropos pattern do-all)) (apropos-parse-pattern pattern) (apropos-symbols-internal (apropos-internal apropos-regexp @@ -670,6 +686,7 @@ apropos-library libs)) libs))) (list (completing-read "Describe library: " libs nil t)))) + (setq apropos--current (list #'apropos-library file)) (let ((symbols nil) ;; (autoloads nil) (provides nil) @@ -776,6 +793,7 @@ apropos-value Returns list of symbols and values found." (interactive (list (apropos-read-pattern "value") current-prefix-arg)) + (setq apropos--current (list #'apropos-value pattern do-all)) (apropos-parse-pattern pattern) (or do-all (setq do-all apropos-do-all)) (setq apropos-accumulator ()) @@ -815,6 +833,7 @@ apropos-local-value Optional arg BUFFER (default: current buffer) is the buffer to check." (interactive (list (apropos-read-pattern "value of buffer-local variable"))) (unless buffer (setq buffer (current-buffer))) + (setq apropos--current (list #'apropos-local-value pattern buffer)) (apropos-parse-pattern pattern) (setq apropos-accumulator ()) (let ((var nil)) @@ -856,6 +875,7 @@ apropos-documentation ;; output, but I cannot see that that is true. (interactive (list (apropos-read-pattern "documentation") current-prefix-arg)) + (setq apropos--current (list #'apropos-documentation pattern do-all)) (apropos-parse-pattern pattern) (or do-all (setq do-all apropos-do-all)) (setq apropos-accumulator () apropos-files-scanned ()) -- 2.20.1 --=-=-= Content-Type: text/plain I don't consider this duplication because, unless Apropos were completely refactored, setting something like apropos--current would be necessary either way. This has the added perk of not coupling Apropos with Help any more than it currently needs to be. WDYT? Thanks, -- Basil --=-=-=-- From unknown Sat Jun 21 05:15:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36588: Unable to revert M-x apropos help buffer Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jul 2019 05:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36588 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: "Basil L. Contovounesios" Cc: 36588@debbugs.gnu.org Received: via spool by 36588-submit@debbugs.gnu.org id=B36588.15629078321961 (code B ref 36588); Fri, 12 Jul 2019 05:04:02 +0000 Received: (at 36588) by debbugs.gnu.org; 12 Jul 2019 05:03:52 +0000 Received: from localhost ([127.0.0.1]:39134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlnip-0000VX-QA for submit@debbugs.gnu.org; Fri, 12 Jul 2019 01:03:52 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:35160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlnin-0000VK-99 for 36588@debbugs.gnu.org; Fri, 12 Jul 2019 01:03:49 -0400 Received: by mail-wr1-f49.google.com with SMTP id y4so8511407wrm.2 for <36588@debbugs.gnu.org>; Thu, 11 Jul 2019 22:03:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qp8MlD+YviRGPo6l6vKOdvAy9doQgyZ0kFIENl/j+wg=; b=KKt205GZv2WlkFUfHz7QN9duiOqFzOhvRUZsCNhAuyQLae5PnpdPU9bGe2mO+mdghX XMuPjuHZaOvb9CqmWB+iNfegaePynhZAjtmQYAjBubrHnNR6w0v+yKBUsCFchIKySTEY PwkwLn9dXGssc2STSleKXl76Znv3airOJoCJauhMGSMhWVJS0KR8jHjfkV1HYrEN5F/2 aGuGmWdSujkLMjuiBuGOH5Z+I6AcEHtQhXvPtAttLhRkVPyfQeWrJrFKxy37QOvpH+7T WaAS4xXQJ5CvTpl8vxzXxs81lMjVzkf/bVyPp2S67x0kZ+HCanxhsGua7PQLVXM2qcDw dxHQ== X-Gm-Message-State: APjAAAWafI8lCdYS4FH+2neVczZ1MdE8zE8ADr/wiKF/47RYPyj/mhGU bm6fmDC4jJAIPlaY38wGN3QIukYrDgRxjZewo10= X-Google-Smtp-Source: APXvYqzyx7Ggw5ZXKCUDvx9ZOFxm0GWkXdz1aVAQ7e8nSsVkYyBmOYVjGlYAlPC/5/gvWjSQ7bn8EK97uD1K9IZ7FG8= X-Received: by 2002:adf:eb49:: with SMTP id u9mr2902488wrn.215.1562907823323; Thu, 11 Jul 2019 22:03:43 -0700 (PDT) MIME-Version: 1.0 References: <87h87sk4fv.fsf@tcd.ie> In-Reply-To: <87h87sk4fv.fsf@tcd.ie> From: Stefan Kangas Date: Fri, 12 Jul 2019 07:03:31 +0200 Message-ID: Content-Type: multipart/mixed; boundary="000000000000a05b10058d74d544" X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Basil L. Contovounesios writes: > This is because Apropos buffers are set up in apropos-print using > with-output-to-temp-buffer, which by default calls help-mode, which sets > revert-buffer-function permanently-locally to help-mode [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.49 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: tcd.ie] 1.3 PDS_NO_HELO_DNS High profile HELO but no A record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.8 (/) --000000000000a05b10058d74d544 Content-Type: text/plain; charset="UTF-8" Basil L. Contovounesios writes: > This is because Apropos buffers are set up in apropos-print using > with-output-to-temp-buffer, which by default calls help-mode, which sets > revert-buffer-function permanently-locally to help-mode-revert-buffer. > > [Aside: Why is revert-buffer-function permanent-local?] > > help-mode-revert-buffer expects the command which generated the Help > buffer to have previously called help-setup-xref. This should be > possible to do in Apropos, but it would be quite ugly as help-setup-xref > needs to be called with the Help buffer current, so Apropos commands > would need to set their own version of help-xref-stack-item before > apropos-print performs the help-setup-xref dance. Besides, Apropos > buffers are not (currently) really Help buffers. > > Instead, I propose emulating a simpler version of help-setup-xref > specific to Apropos: > > > I don't consider this duplication because, unless Apropos were > completely refactored, setting something like apropos--current would be > necessary either way. This has the added perk of not coupling Apropos > with Help any more than it currently needs to be. > > WDYT? Not familiar with this code, so I can't speak to your solution. I can confirm it fixes the problem though. Thanks for looking at it so promptly. I've attached a small patch with a test for this. Thanks, Stefan Kangas --000000000000a05b10058d74d544 Content-Type: application/octet-stream; name="0001-test-lisp-apropos-tests.el-New-file.patch" Content-Disposition: attachment; filename="0001-test-lisp-apropos-tests.el-New-file.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jxzmygl50 RnJvbSA1NjJkMjYyMjA0OGJlOGFjNTUwOWQ4Y2NkNGI5ZmQxODI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c3RzKQorOzs7IGFwcm9wb3MtdGVz dHMuZWwgZW5kcyBoZXJlCi0tIAoyLjIxLjAKCg== --000000000000a05b10058d74d544-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 18:46:11 2019 Received: (at control) by debbugs.gnu.org; 4 Aug 2019 22:46:11 +0000 Received: from localhost ([127.0.0.1]:34340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huPGV-0001x4-0s for submit@debbugs.gnu.org; Sun, 04 Aug 2019 18:46:11 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huPGS-0001wj-HD for control@debbugs.gnu.org; Sun, 04 Aug 2019 18:46:09 -0400 Received: by mail-wm1-f65.google.com with SMTP id v19so71244404wmj.5 for ; Sun, 04 Aug 2019 15:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+MVdVw9X6aGAU/NZv0OsgzddA9rXgW/edq2jCSArXvU=; b=vog5zqJ6dPFsrfCta4j+tepFhWGhMk3xraC2e5zlwoeC9auZvKDjNn2FXkwLHc/W88 kTz+e48TxecutOMWljIfFyccX7oIkIQQJGUGLDHSwj3Z+jG/PjutVFHZ7Pb8w5TfmhFt CcDeTE3nctRJMYaGeG32fAol/eZvcRQ9svHFq8kpKMiHVqEqIs7LHfrUDVeCKWIcdBah Bs1XfoUEsIROGsTVgNVh78kwNDtFI/Fn/cMle6KQZM9/D4LnhP3mhYJ2adha8phUNBwi M6ecBzUoHh+o5b+zrFmdGnoLvTwTSsOjr8DSlfAa/u8pI5SHaGfEJ04S9iOEstCo//wA etkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=+MVdVw9X6aGAU/NZv0OsgzddA9rXgW/edq2jCSArXvU=; b=cBPmYJBtJPNW8bHA/sSWJLkSR+kk4qpHDdXdvEoX5w9frtVq1tYDeuIDAASbJ3iQqI pAcYH9oUtsaFSwuUTpSIn2Ap/utWINHwC6u8ODmSYkhakvbbUX/b/dHsQ+FApvDxL02L XZYrij15+C2d5410riXAmZ+gskt1c5Hcs8BF7bcA93enRiHT8Gze1YTU2jg1She4QM0s DuhQlR6xB7PZodloLwgKIQ74nZpZtksKa1dOHhZrTcce1yRUGsqrWuqSjMfVhuLoP3ik Cq9aFIGn/O+1oX75liHiszvBQhxOr+feoZkgI1pPP0325XZWkeIEO/DVkhNdlK4u+ioC F6bA== X-Gm-Message-State: APjAAAUiSSG5MffCiOD1B9M+eKMuWqJtpc4XWkR9Vg3pOrS31w+kpgwx tJWX276Hs9VOp3ydSV9hr/cvE3z/3aLMyg== X-Google-Smtp-Source: APXvYqxyceodqTw+dyEm+I7eiBUW8gpQHa8//UT/z+jzdMl1Aa7IjMOrh4W1X1lZSjIxsgjqB1kGoQ== X-Received: by 2002:a7b:c954:: with SMTP id i20mr15211201wml.169.1564958762446; Sun, 04 Aug 2019 15:46:02 -0700 (PDT) Received: from localhost (adsl-107.91.140.91.tellas.gr. [91.140.91.107]) by smtp.gmail.com with ESMTPSA id t140sm11637305wmt.0.2019.08.04.15.46.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 04 Aug 2019 15:46:01 -0700 (PDT) From: "Basil L. Contovounesios" To: Stefan Kangas Subject: Re: bug#36588: Unable to revert M-x apropos help buffer References: <87h87sk4fv.fsf@tcd.ie> Date: Mon, 05 Aug 2019 01:45:53 +0300 In-Reply-To: (Stefan Kangas's message of "Fri, 12 Jul 2019 07:03:31 +0200") Message-ID: <87mugopn1a.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 36588-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 36588 fixed close 36588 27.1 quit Stefan Kangas writes: > Not familiar with this code, so I can't speak to your solution. I can confirm > it fixes the problem though. Thanks for looking at it so promptly. Thanks, I've now pushed the patch to master[1] and am therefore closing this report. [1]: Support reverting Apropos buffers (bug#36588) 4cd41ba8de 2019-08-05 01:19:51 +0300 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4cd41ba8def704ce3bd2f3806176815fd696fa57 > I've attached a small patch with a test for this. Thanks, but I'm not sure it's applicable here; see below. > From 562d2622048be8ac5509d8ccd4b9fd18244fc3a4 Mon Sep 17 00:00:00 2001 > From: Stefan Kangas > Date: Fri, 12 Jul 2019 06:57:29 +0200 > Subject: [PATCH] * test/lisp/apropos-tests.el: New file. [...] > +(ert-deftest apropos-tests-revert-buffer () > + (with-temp-buffer > + (apropos "foo") > + (revert-buffer nil t) > + (should (looking-at "Type RET on a type label")))) [Nit: Use looking-at-p unless subsequently using the match data.] I don't currently see a clean way to test this behaviour non-interactively, as the apropos command takes over the hard-coded *Apropos* buffer and can pop up new windows and frames (which also renders the call to with-temp-buffer a no-op, AFAICT). This is far too intrusive for the ERT case. Alternatives include refactoring apropos.el to make it more testable, and adding manual tests under test/manual/, but either of these deserves its own bug report. Thanks, -- Basil