[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undo-kill-buffer
From: |
Stuart D. Herring |
Subject: |
Re: undo-kill-buffer |
Date: |
Tue, 24 Oct 2006 09:11:14 -0700 (PDT) |
User-agent: |
SquirrelMail/1.4.6-7.el3.7lanl |
> Hi, Does anyone know of an existing emacs function that will undo a
> kill-buffer command? So like, if the user issues C-x k and then suddenly
> decides it was a mistake, they could just M-x undo-kill-buffer to get it
> back.
>
> I have started coding this for myself. If it's genuinely new and I'm not
> duplicating effort, then I will polish it and contribute to the main
> codebase.
>
> Thanks,
> Aaron
The only case where killing a buffer cannot be undone with such commands
as `find-file' or `dired' is when the buffer contained unsaved changes or
was not associated with an external repository (file, directory, IRC
channel, etc.), like `*scratch*'. How do you propose to bring such
buffers (and their changes, if any) back without causing `kill-buffer' to
not, in fact, kill buffers?
If you are doing that (interfering with `kill-buffer'), what you really
want is probably a "Trash Can" for buffers. Then you want to have a
"mark-buffer-for-kill" command (which toggles the buffer's state, and
buries it if it's being marked), and then a "kill-marked-buffers" command
to actually destroy them. Of course, this is already available via the
buffer list (`list-buffers')...
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
- undo-kill-buffer, Aaron Maxwell, 2006/10/24
- Re: undo-kill-buffer,
Stuart D. Herring <=
- Re: undo-kill-buffer, Andreas Schwab, 2006/10/24
- Re: undo-kill-buffer, Miles Bader, 2006/10/24
- Re: undo-kill-buffer, Aaron Maxwell, 2006/10/24
- Re: undo-kill-buffer, Stefan Monnier, 2006/10/24
- Re: undo-kill-buffer, Aaron Maxwell, 2006/10/24
- Re: undo-kill-buffer, Stefan Monnier, 2006/10/24
- Re: undo-kill-buffer, Stuart D. Herring, 2006/10/25
- RE: undo-kill-buffer, Drew Adams, 2006/10/25
- Re: undo-kill-buffer, Miles Bader, 2006/10/25