[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: View-quit in *Help* restores wrong window when display-buffer-reuse-
From: |
martin rudalics |
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 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> 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?
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, (continued)
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, martin rudalics, 2007/10/18
- RE: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, Drew Adams, 2007/10/18
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, martin rudalics, 2007/10/19
- RE: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, Drew Adams, 2007/10/19
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, martin rudalics, 2007/10/20
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, Glenn Morris, 2007/10/18
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, martin rudalics, 2007/10/18
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, Glenn Morris, 2007/10/18
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, martin rudalics, 2007/10/19
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, Glenn Morris, 2007/10/19
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t,
martin rudalics <=
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, Glenn Morris, 2007/10/23
- Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, martin rudalics, 2007/10/24
Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t, David Reitter, 2007/10/22