From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Customize how xrefs are followed in help-mode? Date: Mon, 20 May 2019 17:31:54 -0700 Message-ID: <87lfz01wcl.fsf@ericabrahamsen.net> References: <87v9yadx7h.fsf@ericabrahamsen.net> <87imu6s3vb.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="175280"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 21 02:32:15 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSshR-000jSk-Nc for ged-emacs-devel@m.gmane.org; Tue, 21 May 2019 02:32:13 +0200 Original-Received: from localhost ([127.0.0.1]:44190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSshQ-0002TI-Fk for ged-emacs-devel@m.gmane.org; Mon, 20 May 2019 20:32:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSshH-0002Sv-WF for emacs-devel@gnu.org; Mon, 20 May 2019 20:32:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSshH-0001u3-4v for emacs-devel@gnu.org; Mon, 20 May 2019 20:32:03 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:41042 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hSshH-0001th-1m for emacs-devel@gnu.org; Mon, 20 May 2019 20:32:03 -0400 Original-Received: from localhost (75-172-117-141.tukw.qwest.net [75.172.117.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id C652EFA345; Tue, 21 May 2019 00:31:59 +0000 (UTC) In-Reply-To: <87imu6s3vb.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 19 May 2019 22:50:24 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 52.70.2.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236830 Archived-At: On 05/19/19 22:50 PM, Juri Linkov wrote: >> From a user's standpoint, I guess what I'd prefer is to be able to give >> a prefix arg to RET when following the button, but I don't see any way >> of passing that arg down, plus there's no good equivalent for the mouse >> click. > > To depend on a prefix arg is a good idea. > > (defun display-buffer-from-help-p (_buffer-name _action) > (when current-prefix-arg > (with-current-buffer (window-buffer) > (eq major-mode 'help-mode)))) > > (setq display-buffer-alist '((display-buffer-from-help-p > display-buffer-same-window))) That's a nice solution, too, thanks!