From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#41836: 26.3; Could we stop `help-buffer' from ever signalling errors? Date: Sun, 14 Jun 2020 01:29:01 +1200 Message-ID: <871rmj9js2.fsf@orcon.net.nz> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="76705"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.9; emacs 26.3 To: 41836@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 13 15:30:12 2020 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 1jk6Ee-000Jss-IL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jun 2020 15:30:12 +0200 Original-Received: from localhost ([::1]:52970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jk6Ed-0002FP-KB for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jun 2020 09:30:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jk6EV-0002DB-0x for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2020 09:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jk6EU-0008Hj-NO for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2020 09:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jk6EU-0000z1-JB for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2020 09:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jun 2020 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41836 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15920549603704 (code B ref -1); Sat, 13 Jun 2020 13:30:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jun 2020 13:29:20 +0000 Original-Received: from localhost ([127.0.0.1]:41077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jk6Do-0000xg-Im for submit@debbugs.gnu.org; Sat, 13 Jun 2020 09:29:20 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jk6Dl-0000xX-Ur for submit@debbugs.gnu.org; Sat, 13 Jun 2020 09:29:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jk6Dl-00029x-Ou for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2020 09:29:17 -0400 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:41427) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jk6Dk-0008DS-1P for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2020 09:29:17 -0400 Original-Received: from [101.53.216.184] (port=53304 helo=shodan) by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1jk6Dc-0007uH-FV for bug-gnu-emacs@gnu.org; Sun, 14 Jun 2020 01:29:08 +1200 X-GeoIP: NZ Received-SPF: pass client-ip=60.234.4.34; envelope-from=psainty@orcon.net.nz; helo=smtp-1.orcon.net.nz X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/13 09:29:09 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:181922 Archived-At: At present (current master branch included), `help-buffer' returns the following: (buffer-name (if (not help-xref-following) (get-buffer-create "*Help*") (unless (derived-mode-p 'help-mode) (error "Current buffer is not in Help mode")) (current-buffer))) Is there any reason not to change it to this? (buffer-name (if (and help-xref-following (derived-mode-p 'help-mode)) (current-buffer) (get-buffer-create "*Help*"))) That way, even in unexpected situations, we can still show the user some help. My motivation is from wondering whether it was simple to display all of the function and variable symbols displayed by `so-long-commentary' as help buttons. I found that calling `help-make-xrefs' does exactly that, but then trying to use any of the buttons causes the "Current buffer is not in Help mode" error. With the suggested change I get the desirable behaviour of those help buttons popping up a help window with the relevant help. It seems to work beautifully for my use-case, and would surely be equally useful in other similar situations. Is there any good reason to maintain that error? -Phil