[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : view-remove-frame-by-deleting ignored?
From: |
Thorsten Bonow |
Subject: |
Re: [External] : view-remove-frame-by-deleting ignored? |
Date: |
Sun, 09 Oct 2022 21:14:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
>>>>> Drew Adams <drew.adams@oracle.com> writes:
>> > Try customizing option `frame-auto-hide-function' > to `delete-frame'
>> instead of the default value > of `iconify-frame'. > ... > It's
>> `quit-restore-window' that uses the option, > and so ends up deleting the
>> frame. And that's > called by `quit-window', which is called by >
>> `View-quit'.
>>
>> Where?
>>
>> I don't seem to be able to find any place where this variable is referenced
>> in the Emacs sources. Toggling the option also doesn't seem to have any
>> effect. Or am I too tired (could be)?
> Hadn't try to find exactly where it's done (but see below). I see this,
> e.g., in Emacs 28.1 (and earlier):
> emacs -Q
> M-x debug-on-entry quit-restore-window M-x view-file-other-frame foo.el
> Step through and you'll see something like this:
> Debugger entered--entering a function: * iconify-frame(#<frame *Backtrace*
> 000001e4b300f470>) * window--delete(#<window 70 on foo.el> nil nil) * #<subr
> quit-restore-window>(nil bury) * apply(#<subr quit-restore-window> (nil
> bury)) * quit-restore-window(nil bury) quit-window() view-mode-exit(nil
> kill-buffer-if-not-modified) View-quit() funcall-interactively(View-quit)
> command-execute(View-quit)
> Get rid of the frame and buffer for foo.el, to start over.
> Use `M-x customize-option frame-auto-hide-function' to set the option to
> `delete-frame' (instead of the default, `iconify-frame').
> M-x view-file-other-frame foo.el
> Step through and you'll see something like this:
> Debugger entered--entering a function: * delete-frame(#<frame *Backtrace*
> 000001e4b3017840>) * window--delete(#<window 7 on foo.el> nil nil) * #<subr
> quit-restore-window>(nil bury) * apply(#<subr quit-restore-window> (nil
> bury)) * quit-restore-window(nil bury) quit-window() view-mode-exit(nil
> kill-buffer-if-not-modified) View-quit() funcall-interactively(View-quit)
> command-execute(View-quit)
> In more detail, it comes from this return value from `window-deletable':
> Debugger entered--returning value: frame window-deletable-p(#<window 124 on
> foo.el>) * #<subr window--delete>(#<window 124 on foo.el> nil nil) *
> apply(#<subr window--delete> (#<window 124 on foo.el> nil nil)) *
> window--delete(#<window 124 on foo.el> nil nil) quit-restore-window(nil bury)
> quit-window() view-mode-exit(nil kill-buffer-if-not-modified) View-quit()
> funcall-interactively(View-quit) command-execute(View-quit)
> And that's from this code in `window-deletable-p':
> (cond ((frame-root-window-p window) ;; WINDOW's frame can be deleted only if
> there are other frames ;; on the same terminal, and it does not contain the
> active ;; minibuffer. (unless (or (eq frame (next-frame frame 0)) ;; We can
> delete our frame only if no other frame ;; currently uses our minibuffer
> window. (catch 'other (dolist (other (frame-list)) (when (and (not (eq other
> frame)) (eq (window-frame (minibuffer-window other)) frame)) (throw 'other
> t)))) (let ((minibuf (active-minibuffer-window))) (and minibuf (eq frame
> (window-frame minibuf)) (not (eq (default-toplevel-value
> 'minibuffer-follows-selected-frame) t))))) 'frame))
Thx, modifying `frame-auto-hide-function' works for me.
I think `view-remove-frame-by-deleting' was forgotten to remove in commit
357f93d245344725f9d7c5b96eadc400107923b6 when `view-mode-exit' was simplified
among other things.
Toto
--
Sent from my GNU Emacs running on GNU/Linux
- view-remove-frame-by-deleting ignored?, Thorsten Bonow, 2022/10/08
- RE: [External] : view-remove-frame-by-deleting ignored?, Drew Adams, 2022/10/08
- RE: [External] : view-remove-frame-by-deleting ignored?, Drew Adams, 2022/10/08
- Re: [External] : view-remove-frame-by-deleting ignored?, Michael Heerdegen, 2022/10/08
- RE: [External] : view-remove-frame-by-deleting ignored?, Drew Adams, 2022/10/08
- Re: [External] : view-remove-frame-by-deleting ignored?,
Thorsten Bonow <=
- RE: [External] : view-remove-frame-by-deleting ignored?, Drew Adams, 2022/10/09
- Re: [External] : view-remove-frame-by-deleting ignored?, Thorsten Bonow, 2022/10/09
- RE: [External] : view-remove-frame-by-deleting ignored?, Drew Adams, 2022/10/09
- Re: [External] : view-remove-frame-by-deleting ignored?, Emanuel Berg, 2022/10/11
- RE: [External] : view-remove-frame-by-deleting ignored?, Drew Adams, 2022/10/11
- Re: [External] : view-remove-frame-by-deleting ignored?, Po Lu, 2022/10/11
- RE: [External] : view-remove-frame-by-deleting ignored?, Drew Adams, 2022/10/11
- Re: [External] : view-remove-frame-by-deleting ignored?, Eli Zaretskii, 2022/10/12
- RE: [External] : view-remove-frame-by-deleting ignored?, Drew Adams, 2022/10/12
- Re: [External] : view-remove-frame-by-deleting ignored?, Eli Zaretskii, 2022/10/12