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: Fri, 19 Oct 2007 00:01:22 +0200 Message-ID: <4717D7B2.5030608@gmx.at> References: 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 1192745019 2758 80.91.229.12 (18 Oct 2007 22:03:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Oct 2007 22:03:39 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, dashteacup@insightbb.com To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 19 00:03:40 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 1IidSp-0001ja-BD for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2007 00:03:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IidSi-0003ri-0a for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Oct 2007 18:03:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IidSc-0003r8-3U for bug-gnu-emacs@gnu.org; Thu, 18 Oct 2007 18:03:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IidSb-0003qu-K6 for bug-gnu-emacs@gnu.org; Thu, 18 Oct 2007 18:03:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IidSb-0003qr-F8 for bug-gnu-emacs@gnu.org; Thu, 18 Oct 2007 18:03:21 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IidSa-0000x0-OP for bug-gnu-emacs@gnu.org; Thu, 18 Oct 2007 18:03:21 -0400 Original-Received: (qmail invoked by alias); 18 Oct 2007 22:03:19 -0000 Original-Received: from N811P022.adsl.highway.telekom.at (EHLO [62.47.45.86]) [62.47.45.86] by mail.gmx.net (mp036) with SMTP; 19 Oct 2007 00:03:19 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+nZN1icp+neMuvC/vUGC4exw9tNmheT/219WeD9k n+rB//H6iSxDxg User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:16780 Archived-At: > FWIW and IIUC, I am not in any of those 4 user groups, with any of the > expectations you assign to those groups - and I believe that I filed one of > the bugs you have been working on. > > I use non-nil `pop-up-frames', and both `pop-up-windows' and > `split-height-threshold' have the default values (t and 500). OK. The second group gets `pop-up-frames' non-nil, the values of `pop-up-windows' and `split-height-threshold' are of no concern. > I have a > dedicated *Help* frame. What is the semantics of a "dedicated frame"? > Because of `pop-up-frames', `display-buffer' uses another frame, but I do > sometimes switch to a different buffer in the same window. And I do > sometimes split a window, so my frames are not always `one-window-p'. If you "dedicate" a frame to the Help buffer why do you want to switch to a different buffer in that frame? Why do you want to split that frame's window? > If a new window or frame was popped up to display a view-mode buffer, then I > expect quitting to delete the window and, if one-window-p, delete the frame > too. I already explained that by default Help buffers are not dedicated thus `quit-window' won't necessarily delete the associated frame. If people want that we can change the behavior of view-mode but that would affect all clients of view-mode. Alternatively we could make help-windows dedicated (if that helps). Currently `view-remove-frame-by-deleting' has to be set to get the effect you want. We could make that non-nil by default. > FWIW, my own code takes care of the latter part, so it is enough for me if > the view-mode code simply does `quit-window'. > > If a new window or frame was not popped up to display the view-mode buffer, > that is, if I manually switched to it in an existing window, then I want > quitting that buffer/mode to restore the previous buffer that was in that > window. > Summary: > if pop-up, then quit => delete the window/frame > if not pop-up, then quit => restore previous buffer for window Suppose you (1) pop up a view-mode window, (2) display a non view-mode buffer in that window, (3) display a view-mode buffer in that window, and (4) quit view-mode. Whatever `view-mode-exit' does now, you'll complain. >>- Exiting view-mode should ideally (1) kill a window that >> has been popped up for view-mode purposes and (2) show >> the earlier contents of the window when it has been >> usurpated by view-mode. > > > That would be good. In my case, #1 is what I expect for the *Help* buffer. I > have no problem with #2, assuming that it applies to buffers that were not > popped up in another window. I wrote "ideally" and I had your usage pattern in mind. But keep in mind that killing a window doesn't necessarily imply killing its frame. > I haven't followed the current thread closely. If you have a Lisp-only patch > I can try, I will do that. It's still the patch I sent you earlier.