From: "Stuart D. Herring" <herring@lanl.gov>
Cc: emacs-devel@gnu.org
Subject: Re: undo-kill-buffer
Date: Tue, 24 Oct 2006 09:11:14 -0700 (PDT) [thread overview]
Message-ID: <58920.128.165.123.18.1161706274.squirrel@webmail.lanl.gov> (raw)
In-Reply-To: <200610240856.57965.amax@redsymbol.net>
> 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.
next prev parent reply other threads:[~2006-10-24 16:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 15:56 undo-kill-buffer Aaron Maxwell
2006-10-24 16:11 ` Stuart D. Herring [this message]
2006-10-24 16:46 ` undo-kill-buffer Aaron Maxwell
2006-10-24 16:36 ` undo-kill-buffer Andreas Schwab
2006-10-24 23:43 ` undo-kill-buffer Miles Bader
2006-10-24 23:51 ` undo-kill-buffer Aaron Maxwell
2006-10-25 0:14 ` undo-kill-buffer Stefan Monnier
2006-10-25 0:22 ` undo-kill-buffer Aaron Maxwell
2006-10-25 0:32 ` undo-kill-buffer Stefan Monnier
2006-10-25 14:37 ` undo-kill-buffer Stuart D. Herring
2006-10-25 16:05 ` undo-kill-buffer Drew Adams
2006-10-25 22:43 ` undo-kill-buffer Miles Bader
2006-10-25 23:02 ` undo-kill-buffer Edward O'Connor
2006-10-25 23:50 ` undo-kill-buffer Miles Bader
2006-10-26 8:53 ` undo-kill-buffer Richard Stallman
2006-10-25 23:17 ` undo-kill-buffer David Kastrup
2006-10-25 23:46 ` undo-kill-buffer Miles Bader
2006-10-25 0:36 ` undo-kill-buffer Miles Bader
2006-10-25 0:24 ` undo-kill-buffer Miles Bader
2006-10-25 1:11 ` undo-kill-buffer Aaron Maxwell
2006-10-25 0:41 ` undo-kill-buffer Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58920.128.165.123.18.1161706274.squirrel@webmail.lanl.gov \
--to=herring@lanl.gov \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.