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: Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t Date: Sun, 14 Oct 2007 10:42:24 +0200 Message-ID: <4711D670.6060508@gmx.at> References: <70FBB428-1B37-4C3B-A60D-E3A7139E384C@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1192353145 12631 80.91.229.12 (14 Oct 2007 09:12:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2007 09:12:25 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, dashteacup@insightbb.com To: David Reitter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 14 11:12:15 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IgzW6-0000jH-Tm for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2007 11:12:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgzW0-0004lL-2a for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2007 05:12:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IgzVw-0004kp-FU for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2007 05:12:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IgzVu-0004k0-7p for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2007 05:11:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgzVt-0004jj-TA for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2007 05:11:57 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IgzVt-0006MF-CZ for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2007 05:11:57 -0400 Original-Received: (qmail invoked by alias); 14 Oct 2007 09:11:55 -0000 Original-Received: from N709P015.adsl.highway.telekom.at (EHLO [62.47.32.143]) [62.47.32.143] by mail.gmx.net (mp055) with SMTP; 14 Oct 2007 11:11:55 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+juvs2Nn2jmvE3MS6rg+60KPY8oBUcOA6+SFkuAA jrTQNhiyyWYvVN User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <70FBB428-1B37-4C3B-A60D-E3A7139E384C@gmail.com> X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16745 Archived-At: > A little investigation traced this to the setting of `display-buffer- > reuse-frames', which, when t, causes "View-quit" to do the wrong thing > when restoring the previous window configuration. > In this case, the second window in the frame gets deleted, but the > first window switches to a different buffer. > > The following should reproduce it in a 22 branch CVS Emacs (with > unrelated patches - I tried Aquamacs with -Q) and also in a 23 one (I > tried Adrian Robert's Cocoa port): > > (progn > (setq display-buffer-reuse-frames t) > (describe-mode) > (other-window 1) > (View-quit) > ) Thanks for reporting. This is one of a couple of known problems with `View-quit'. I posted a tentative patch here http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00154.html and would be very glad if someone could try whether it helps to solve this and related problems. > Begin forwarded message: > >> From: Paul Curry >> Date: 10 October 2007 05:25:58 BDT >> To: aquamacs-bugs@aquamacs.org >> Subject: [Aquamacs-bugs] View-quit in *Help* restores wrong window >> >> Enter your bug report here. >> >> When I quit from a *Help* buffer (key q, command View-quit) in Aquamacs >> I do not get the correct (or at least expected) behavior. In other >> Emacsen, if you have two buffers open in a frame -- one of which is a >> *Help* buffer -- and you quit the help buffer, then the frame will fill >> out to only include the other visible buffer. In Aquamacs, however, >> View-quit fills the frame with a seemingly random unrelated buffer. >> Please try the patch cited above. If you have any problems applying it tell me immediately. It would be really important if someone helped me testing this. >> For testing purposes I tried the following sequence of commands in >> both Aquamacs and Carbon Emacs: >> Start Emacs >> describe-mode >> other-window >> View-quit >> --- >> In Carbon Emacs I return to the *scratch* buffer, as expected; in >> Aquamacs I change to the *Messages* buffer. This is reproducible >> every time. >> >> Curious, I checked out the source code for View-quit in both Emacsen >> -- they were the same. view-mode-exit (called from View-quit) was >> also the same. The only difference that I can notice is the value of >> view-return-to-alist. In Carbon Emacs it is: >> ((# # . t)) >> and in Aqumacs it's: >> ((# # . quit-window)) Note that `view-mode-exit' just executes something that has been put on `view-return-to-alist' (maybe a long time) before. The source of all problems is how the entry for `view-return-to-alist' is indirectly set up when creating the "help window" in the first place. I'm not sure what's causing the difference here. To find out you could try to edebug `print-help-return-message' on both systems and look how the value for `help-return-method' gets assigned. Maybe some option has different initial values on your systems.