From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#19012: 25.0.50; `help-window-select' Date: Sat, 15 Nov 2014 12:24:17 +0100 Message-ID: <546737E1.6010406@gmx.at> References: <5461C901.6060707@gmx.at> <3f833473-f246-4d57-95cd-2ac654d326c9@default> <5462561B.2030306@gmx.at> <561951d1-fee4-44ea-bc22-d354b007601d@default> <54646172.7020801@gmx.at> <5464DC39.4020703@gmx.at> <5464FCD5.6070201@gmx.at> <66cb622a-236c-4e8d-a7ba-cb1de310bb05@default> <5465E967.1050304@gmx.at> <41926108-7556-4b72-ae2c-60933b4ff187@default> <5466300D.2030708@gmx.at> <75786231-f3a3-420f-a0d8-4960e09c720e@default> <54663E6F.6010702@gmx.at> <5453eef4-1955-4b79-819a-43786f56a8cc@default> <5466457F.8000400@gmx.at> <54664AF4.9000606@gmx.at> <97868572-923b-4f0a-bd16-b4d475ddb002@default> <5466532C.2040003@gmx.at> <2b53c981-eaef-47f3-850a-6367b4cd5dc1@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1416050734 17851 80.91.229.3 (15 Nov 2014 11:25:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2014 11:25:34 +0000 (UTC) To: Drew Adams , 19012@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 15 12:25:26 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 1XpbTp-0006a5-Al for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Nov 2014 12:25:25 +0100 Original-Received: from localhost ([::1]:39869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpbTo-0001YH-Fw for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Nov 2014 06:25:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpbTd-0001Y5-0U for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 06:25:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpbTU-000753-Np for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 06:25:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpbTU-00073k-Kr for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 06:25:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XpbTT-0007i4-Qh for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 06:25:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Nov 2014 11:25:03 +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.141605067429578 (code B ref 19012); Sat, 15 Nov 2014 11:25:03 +0000 Original-Received: (at 19012) by debbugs.gnu.org; 15 Nov 2014 11:24:34 +0000 Original-Received: from localhost ([127.0.0.1]:33295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XpbSz-0007gz-Ni for submit@debbugs.gnu.org; Sat, 15 Nov 2014 06:24:34 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:52733) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XpbSw-0007go-89 for 19012@debbugs.gnu.org; Sat, 15 Nov 2014 06:24:31 -0500 Original-Received: from [178.190.161.208] ([178.190.161.208]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LbMmA-1YHlCa1J5m-00kz8B; Sat, 15 Nov 2014 12:24:26 +0100 In-Reply-To: <2b53c981-eaef-47f3-850a-6367b4cd5dc1@default> X-Provags-ID: V03:K0:TL+nwdsbjoWrEtMoUA78LTTAnpb8XZY80bOtfZ5NufKrxqTGDV4 9zZ/b5VCFT53NKnS4bQJbUVsbz35tm2p+zr9XQuPYqqY9EnIxE7zxoSL8taRn0Q7H6uNNH0 ymq3KnRKQv8YyVFzv0Agoszysy0AO0Z0TK9DvAa/m7Bo0vGq6KJiNJrEU4VZt7wLJXQfAlV DzNEhBq5J0CYwIDMW9GCg== X-UI-Out-Filterresults: notjunk:1; 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:96055 > 1. The `temp-buffer-*-hook's are not only about showing *Help*. > That workaround thus affects more than it should. `temp-buffer-window-setup-hook' is run with *Help* current. So you won't have any problems discriminating this special case. > 2. Users of `w32*' should not need to do that explicitly > themselves. Perhaps Emacs can do the equivalent, itself (but > limited to *Help*, not affecting all temp buffer display). I cannot possibly use a feature like `w32-grab-focus-on-raise' whose semantics I neither understand nor can reenact in my environment in the frame/window code of Emacs. But we could change `help-window-setup' as follows: (defun help-window-setup (window &optional value) "Set up help window WINDOW for `with-help-window'. WINDOW is the window used for displaying the help buffer. Return VALUE." (let* ((help-buffer (when (window-live-p window) (window-buffer window))) (help-setup (when (window-live-p window) (car (window-parameter window 'quit-restore))))) (when help-buffer ;; Handle `help-window-point-marker'. (when (eq (marker-buffer help-window-point-marker) help-buffer) (set-window-point window help-window-point-marker) ;; Reset `help-window-point-marker'. (set-marker help-window-point-marker nil)) (cond ((or (eq window (selected-window)) (and (or (eq help-window-select t) (eq help-setup 'frame) (and (eq help-window-select 'other) (eq (window-frame window) (selected-frame)) (> (length (window-list nil 'no-mini)) 2))) (select-window window))) (when help-window-select (select-frame-set-input-focus (window-frame window))) ;; The help window is or gets selected ... (help-window-display-message (cond ((eq help-setup 'window) ;; ... and is new, ... "Type \"q\" to delete help window") ((eq help-setup 'frame) "Type \"q\" to quit the help frame") ((eq help-setup 'other) ;; ... or displayed some other buffer before. "Type \"q\" to restore previous buffer")) window t)) ((and (eq (window-frame window) (selected-frame)) (= (length (window-list nil 'no-mini)) 2)) ;; There are two windows on the help window's frame and the ;; other one is the selected one. (help-window-display-message (cond ((eq help-setup 'window) "Type \\[delete-other-windows] to delete the help window") ((eq help-setup 'other) "Type \"q\" in help window to restore its previous buffer")) window 'other)) (t ;; The help window is not selected ... (help-window-display-message (cond ((eq help-setup 'window) ;; ... and is new, ... "Type \"q\" in help window to delete it") ((eq help-setup 'other) ;; ... or displayed some other buffer before. "Type \"q\" in help window to restore previous buffer")) window)))) ;; Return VALUE. value)) martin