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#13146: [PATCH] help-for-help interferes with buffer order, and displays help in too many windows Date: Wed, 12 Dec 2012 10:42:21 +0100 Message-ID: <50C8517D.6060905@gmx.at> References: <1355252259.99571.YahooMailClassic@web141103.mail.bf1.yahoo.com> 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 1355305411 32262 80.91.229.3 (12 Dec 2012 09:43:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Dec 2012 09:43:31 +0000 (UTC) Cc: 13146@debbugs.gnu.org To: Kelly Dean Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 12 10:43:44 2012 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 1Tiiqu-0007Hc-5V for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Dec 2012 10:43:44 +0100 Original-Received: from localhost ([::1]:46774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tiiqh-0003sR-GH for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Dec 2012 04:43:31 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiiqZ-0003ou-Dn for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2012 04:43:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiiqT-0000ir-Ig for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2012 04:43:23 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiiqT-0000im-Ff for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2012 04:43:17 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TiirC-0003jf-Cd for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2012 04:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Dec 2012 09:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13146 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13146-submit@debbugs.gnu.org id=B13146.135530539814300 (code B ref 13146); Wed, 12 Dec 2012 09:44:02 +0000 Original-Received: (at 13146) by debbugs.gnu.org; 12 Dec 2012 09:43:18 +0000 Original-Received: from localhost ([127.0.0.1]:38161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TiiqT-0003ia-IR for submit@debbugs.gnu.org; Wed, 12 Dec 2012 04:43:18 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:57700) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TiiqM-0003iO-GE for 13146@debbugs.gnu.org; Wed, 12 Dec 2012 04:43:14 -0500 Original-Received: (qmail invoked by alias); 12 Dec 2012 09:42:23 -0000 Original-Received: from 62-47-36-179.adsl.highway.telekom.at (EHLO [62.47.36.179]) [62.47.36.179] by mail.gmx.net (mp028) with SMTP; 12 Dec 2012 10:42:23 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+Cp51VqgqCK2q9Aeb57rWEfdB3l5167p0OJcDqxk eM4dzZbJdSuxmZ In-Reply-To: <1355252259.99571.YahooMailClassic@web141103.mail.bf1.yahoo.com> X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:68378 Archived-At: > M-x split-window RET C-x b foo RET C-x b bar RET C-h C-h C-g C-x b > It defaults to *Help*, but it should default to foo; transiently displaying help-for-help shouldn't modify the buffer order. You're right. It shouldn't. > Now do C-g C-h f mark RET C-x o C-h C-h > It shows the help-for-help page in both windows, but it should show it in only one. This look quite silly, indeed. - (switch-to-buffer-other-window "*Help*") + (if (not (equal (buffer-name) "*Help*")) (switch-to-buffer-other-window "*Help*" t)) Using t as NORECORD argument is correct IMO. Checking whether *Help* is current is not quite correct (the current buffer is not necessarily displayed in the selected window) but good enough for interactive use. I think a simple `pop-to-buffer' would suffice here. But I'm not sure whether `help-for-help' should use *Help* in the first place. A user might want to consult `help-for-help' and continue/resume watching the current help information. Does anyone see a downside to renaming the buffer used by `help-for-help' to *help-for-help* (with a leading space)? martin