emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window configurations


From: Juri Linkov
Subject: Re: Window configurations
Date: Wed, 05 May 2010 21:05:09 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> But when (1) a `save-window-excursion' restores the saved
> configuration and (2) it has to restore a former eldoc-window that was
> deleted within the body of `save-window-excursion', I get the first
> buffer from `buffer-list' shown in that window which is
> downright silly.

I agree that displaying a random buffer (that happens to be the first
in `buffer-list') is silly.  This problem becomes more evident when
switching window configuration using tabs.

Let's summarize options we have to display when the buffer saved in
a window configuration is gone:

0. Display the first buffer from `buffer-list'.  Yes, this is silly.

1. Add a bookmark record (that may include `buffer-file-name' and other
   additional data from packages via `bookmark-make-record-function')
   to the window parameters in the window-configuration structure.
   After restoring the window configuration, try to regenerate it.

   I think this is a bad idea, because when the user deletes the buffer,
   and after switching to another window configuration this buffer
   automagically comes back, it would be annoying.

2. Delete the buffer's window after restoring the saved window configuration.

   Do you see any problem with doing this in `set-window-configuration'
   instead of `window-configuration-change-hook'?

3. Delete the buffer's window in the saved window configuration
   before restoring it.

   This looks good if it won't break other windows in the same
   window configuration.

4. Display some warning message in a temporary buffer in the
   restored window.

   This is good too.  It keeps the original window configuration unchanged,
   and provides information about the deleted buffers.


-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]