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: Sat, 20 Oct 2007 11:45:58 +0200 Message-ID: <4719CE56.6020301@gmx.at> References: <70FBB428-1B37-4C3B-A60D-E3A7139E384C@gmail.com> <4711D670.6060508@gmx.at> <4717174B.2040103@gmx.at> <4717D837.6040706@gmx.at> <4718674A.1080505@gmx.at> 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 1192873604 28076 80.91.229.12 (20 Oct 2007 09:46:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Oct 2007 09:46:44 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, dashteacup@insightbb.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 20 11:46:45 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 1IjAuq-0006Ps-Tx for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Oct 2007 11:46:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjAuj-00026y-7R for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Oct 2007 05:46:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IjAuY-00022V-Kq for bug-gnu-emacs@gnu.org; Sat, 20 Oct 2007 05:46:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IjAuX-00021i-8J for bug-gnu-emacs@gnu.org; Sat, 20 Oct 2007 05:46:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjAuW-00021U-Pe for bug-gnu-emacs@gnu.org; Sat, 20 Oct 2007 05:46:24 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IjAuV-00048f-Nl for bug-gnu-emacs@gnu.org; Sat, 20 Oct 2007 05:46:24 -0400 Original-Received: (qmail invoked by alias); 20 Oct 2007 09:46:22 -0000 Original-Received: from N922P023.adsl.highway.telekom.at (EHLO [62.47.59.55]) [62.47.59.55] by mail.gmx.net (mp038) with SMTP; 20 Oct 2007 11:46:22 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+R72QfpeORq2zoJ0b706hDrGlq9j4GEvfzuU+XMN hxWqS7hQrcTPVR 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:16792 Archived-At: > emacs -Q -f make-frame > C-h f find-file > C-x 0 > q > > -> frame gets iconified (or deleted if view-remove-frame-by-deleting > is non-nil). Burying the help buffer and leaving the frame alone > (since it was created manually) would seem like the Right Thing here. Yes. I could create an additional `view-return-to-alist' element like 'delete-window-but-not-frame and not iconify/kill the frame in that case. Alternatively, I could, in `view-mode-exit' do ((not (eq old-buf-info t)) nil) ; Not case 2, do nothing. ((not (one-window-p t)) (delete-window)) ((not pop-up-frames) (bury-buffer)) ; <--- BURY BUFFER HERE ((not (eq frame (next-frame))) ;; Not the only frame, so can safely be removed. but this would obviously fail for users with `pop-up-frames' non-nil. Unfortunately, fiddling around with C-x 0 and C-x 1 will likely create other cases that cannot be handled easily. C-x 2 on a help window is another point of concern. Finally, I have little experience with cloned Help buffers. > The second problem can basically be summarized as quit only working > once. Eg: > > emacs -Q > C-h find-file > C-x 1 > C-x b *Help* > q > > -> "q" has no effect at all I cannot reproduce this, my Emacs has "q" display *scratch* instead. This is set up in help-mode's (defun help-mode () ... (setq view-exit-action (lambda (buffer) (with-current-buffer buffer ;; Use `with-current-buffer' to assert that `bury-buffer' ;; removes buffer from the selected window. Leave it to ;; `view-mode-exit' to delete the associated window(s). (bury-buffer)))) (run-mode-hooks 'help-mode-hook)) Can you investigate why this fails for you?