[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: |
Tue, 11 May 2010 19:45:52 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) |
> ... where `quit-restore-window' here replaces `quit-window' which has
> too obscure semantics for my taste. And obviously, exiting `view-mode'
> calls `quit-restore-window' here too.
Yes, `quit-window' is useless because it doesn't help to avoid the mess
that occurs after killing buffers. Please look at two examples:
1.
+---------+---------+
| | |
| dired 1 | dired 2 |
| | |
| | |
+---------+---------+
Now view a file in dired 1, select the second window, view another file
in dired 2, select the first window, quit view-mode with `q',
select the second window, quit view-mode with `q':
`v C-x o v C-x o q C-x o q'
The window configuration is exactly as was before - very good.
Now do the same without using `view-mode' - visit a file in dired 1 with
RET, select the second window, visit another file in dired 2, select the
first window, kill the buffer, select the second window, kill the buffer:
`RET C-x o RET C-x o C-x k C-x o C-x k'
The window configuration is broken with original buffers exchanged
their windows:
+---------+---------+
| | |
| dired 2 | dired 1 |
| | |
| | |
+---------+---------+
2. Another example - visit the same buffer in two windows, and put point
at different positions of the same buffer.
+---------+---------+
| | |
| dired 1 | dired 1 |
| | |
| | |
+---------+---------+
Now view a file in the first window, and quit: `v q'.
The window configuration is correctly restored
(without using `set-window-configuration') - good.
Now do the same without `view-mode': `RET C-x k'.
Instead of the original buffer, some random buffer is displayed
in this window.
It seems your implementation of `quit-restore-window' will fix this problem,
but I don't see how it will work without a window history as a list?
This list could be saved as a window parameter `window-history' where each
element is like you implemented for the `quit-restore' parameter.
Then every switch-to-buffer could add a `quit-restore' element to the
window history parameter, and every kill-buffer could remove it from the
history stack (and call its function at the same time).
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: Window configurations, (continued)
- 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, 2010/05/10
- Re: Window configurations, martin rudalics, 2010/05/11
- Re: Window configurations,
Juri Linkov <=
- 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
- Re: Window configurations, Stefan Monnier, 2010/05/31
- Re: Window configurations, Lennart Borgman, 2010/05/31