From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#19012: 25.0.50; `help-window-select' Date: Mon, 10 Nov 2014 10:23:13 -0800 (PST) Message-ID: <8e78202d-5ac0-4df5-8195-9849dd7509b7@default> References: <5460F5B3.6040402@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1415643873 27572 80.91.229.3 (10 Nov 2014 18:24:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Nov 2014 18:24:33 +0000 (UTC) To: martin rudalics , 19012@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 10 19:24:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XntdW-0006Jp-VD for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Nov 2014 19:24:23 +0100 Original-Received: from localhost ([::1]:44581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XntdW-0008Dr-Ix for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Nov 2014 13:24:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XntdL-0008Dd-I5 for bug-gnu-emacs@gnu.org; Mon, 10 Nov 2014 13:24:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XntdC-0001Ra-PX for bug-gnu-emacs@gnu.org; Mon, 10 Nov 2014 13:24:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XntdC-0001RW-MQ for bug-gnu-emacs@gnu.org; Mon, 10 Nov 2014 13:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XntdC-0008Rg-Cu for bug-gnu-emacs@gnu.org; Mon, 10 Nov 2014 13:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Nov 2014 18:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19012 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19012-submit@debbugs.gnu.org id=B19012.141564380132383 (code B ref 19012); Mon, 10 Nov 2014 18:24:02 +0000 Original-Received: (at 19012) by debbugs.gnu.org; 10 Nov 2014 18:23:21 +0000 Original-Received: from localhost ([127.0.0.1]:56260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XntcW-0008QD-S0 for submit@debbugs.gnu.org; Mon, 10 Nov 2014 13:23:21 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:24245) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XntcT-0008Q1-Mn for 19012@debbugs.gnu.org; Mon, 10 Nov 2014 13:23:18 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAAINFT2009421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Nov 2014 18:23:16 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAAINEKr023671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 10 Nov 2014 18:23:15 GMT Original-Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAAINDsA015003; Mon, 10 Nov 2014 18:23:14 GMT In-Reply-To: <5460F5B3.6040402@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95823 > > The description of `other' in the Customize buffer (and the doc > > string) is incorrect. Or else the behavior is bugged. > > > > If *Help* is shown in its own frame (e.g. from *Help* being a > > special-display buffer), and if the option value is `other' (the > > default), then the *Help* window (and frame) are *not* selected, > > in contradiction to what the doc says. > > > > On MS Windows, at least, if the *Help* frame in this context does > > not yet exist then yes, that frame (and thus the *Help* window is > > selected - the frame gets the input focus. But that is because > > Windows always gives a newly created frame the focus. And if the > > frame exists already then no, the *Help* window and its frame are > > not selected. Focus stays with the frame where you invoked the > > help command. >=20 > It does get selected here on Windows XP. What happens when you set > `help-window-select' to t? The help window is still not selected. > Did you create the *Help* window with `with-help-window'? > If so, please tell me the value of the 'quit-restore window > parameter of the *Help* window. No, I guess not (see below), but I'm not sure. And I did not read the note in the doc saying, "This option has effect if and only if the help window was created by `with-help-window'" (That sentence is missing a period, BTW.) Mea culpa. So I guess maybe what I said in the bug report about the behavior not matching the doc is wrong (i.e., is irrelevant). The part about the doc not being too clear might still help you, however. If not, I guess you can close the bug. I am on Windows 7 (but on XP the behavior was the same). This is the relevant code: (add-to-list 'special-display-buffer-names (list "*Help*" '1on1-display-*Help*-frame (list (cons 'background-color 1on1-help-frame-background) (cons 'mouse-color 1on1-help-frame-mouse+cursor-color) (cons 'cursor-color 1on1-help-frame-mouse+cursor-color) '(height . 40)))) (defun 1on1-display-*Help*-frame (buf &optional args) "Display *Help* buffer in its own frame. `special-display-function' is used to do the actual displaying. BUF and ARGS are the arguments to `special-display-function'." (let ((old-ptr-shape (and (boundp 'x-pointer-shape) x-pointer-shape)) return-window) (when (boundp 'x-pointer-xterm) (setq x-pointer-shape x-pointer-xterm)= ) (setq return-window (select-window (funcall special-display-function buf args))) (raise-frame) (setq x-pointer-shape old-ptr-shape) return-window)) Does that mean that `with-help-window' is not involved? Maybe so, but it's not obvious to me. How is a user supposed to know whether this option applies, i.e., whether "the help window was created by `with-help-window'? And why shouldn't such an option apply in general for the help window? Why must it depend on how the window is created? > > Note too that the description is anyway inadequate, because it > > seems to make the assumption that there *is* another window on > > the help window's frame: "unless the selected window is the only > > other window on the help window's frame" is not clear for the > > case where there is no such other window. >=20 > When there is "no such other window" the selected window "is not the > only other window on the help window's frame". What am I missing? Maybe so, but it's not very clear, IMO. The vacuous case should be mentioned explicitly, I think, and not depend for its understanding on finessing the logic. Just say, for value `other', that "if the help window is alone in its frame then it is selected". With the scenario I described (*Help* is alone in its frame, in a dedicated window, and the *Help* frame exists prior to calling the help command) and with a value of `other' or `t', the *Help* window is *not* selected. With your interpretation, the "unless" condition is false, so the *Help* window should be selected (except that perhaps `with-help-window' is not involved - dunno about that).