[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Window configurations
From: |
Juri Linkov |
Subject: |
Re: Window configurations |
Date: |
Mon, 10 May 2010 22:16:19 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) |
> What I really want is some sort of function `set-window-configuration'
> could call whenever it encounters a window with a dead buffer. As a
> fallback it then would try your (2) first and (4) if the window can't be
> deleted.
Thinking more about this, I believe now this function should be
like `view-mode-exit':
(view-mode-exit &optional RETURN-TO-ALIST EXIT-ACTION ALL-WIN)
Exit View mode in various ways, depending on optional arguments.
RETURN-TO-ALIST, EXIT-ACTION and ALL-WIN determine what to do
after exit. EXIT-ACTION is nil or a function that is called with
current buffer as argument.
RETURN-TO-ALIST is an alist that, for some of the windows
displaying the current buffer, maintains information on what to
do when exiting those windows. If ALL-WIN is non-nil or the
variable `view-exits-all-viewing-windows' is non-nil,
view-mode-exit attempts to restore all windows showing the
current buffer to their old state. Otherwise, only the selected
window is affected (provided it is on RETURN-TO-ALIST).
Elements of RETURN-TO-ALIST must have the format
(WINDOW OLD-WINDOW . OLD-BUF-INFO) where
WINDOW is a window displaying the current buffer and OLD-WINDOW
is either nil or a window to select after viewing. OLD-BUF-INFO
provides information on what to do with WINDOW and may be one of:
1) nil Do nothing.
2) t Delete WINDOW and, if it is the only window and
`view-remove-frame-by-deleting' is non-nil, its
frame.
3) (OLD-BUF START POINT) Display buffer OLD-BUF with displayed text
starting at START and point at POINT in WINDOW.
4) quit-window Do `quit-window' in WINDOW.
5) keep-frame Like case 2) but do not delete the frame.
If one of the WINDOW in RETURN-TO-ALIST is the selected window
and the corresponding OLD-WINDOW is a live window, then select
OLD-WINDOW.
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: Window configurations, (continued)
- Re: Window configurations, Juri Linkov, 2010/05/04
- Re: Window configurations, martin rudalics, 2010/05/05
- Re: Window configurations, Stefan Monnier, 2010/05/05
- Re: Window configurations, martin rudalics, 2010/05/06
- Re: Window configurations, Stefan Monnier, 2010/05/06
- Re: Window configurations, martin rudalics, 2010/05/06
- Re: Window configurations, Stefan Monnier, 2010/05/06
- Re: Window configurations, Juri Linkov, 2010/05/05
- Re: Window configurations, martin rudalics, 2010/05/06
- Re: Window configurations, Juri Linkov, 2010/05/06
- Re: Window configurations,
Juri Linkov <=
- Re: Window configurations, martin rudalics, 2010/05/11
- Re: Window configurations, Juri Linkov, 2010/05/11
- Re: Window configurations, martin rudalics, 2010/05/12
- Re: Window configurations, Juri Linkov, 2010/05/13
- Re: Window configurations, martin rudalics, 2010/05/14
- Re: Window configurations, Juri Linkov, 2010/05/16
- Re: Window configurations, martin rudalics, 2010/05/17
- Re: Window configurations, Juri Linkov, 2010/05/17
- Re: Window configurations, martin rudalics, 2010/05/18
- Re: Window configurations, martin rudalics, 2010/05/31