unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* undo-kill-buffer
@ 2006-10-24 15:56 Aaron Maxwell
  2006-10-24 16:11 ` undo-kill-buffer Stuart D. Herring
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Aaron Maxwell @ 2006-10-24 15:56 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-24 15:56 undo-kill-buffer Aaron Maxwell
@ 2006-10-24 16:11 ` Stuart D. Herring
  2006-10-24 16:46   ` undo-kill-buffer Aaron Maxwell
  2006-10-24 16:36 ` undo-kill-buffer Andreas Schwab
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 21+ messages in thread
From: Stuart D. Herring @ 2006-10-24 16:11 UTC (permalink / raw)
  Cc: emacs-devel

> 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.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-24 15:56 undo-kill-buffer Aaron Maxwell
  2006-10-24 16:11 ` undo-kill-buffer Stuart D. Herring
@ 2006-10-24 16:36 ` Andreas Schwab
  2006-10-24 23:43 ` undo-kill-buffer Miles Bader
  2006-10-25  0:41 ` undo-kill-buffer Drew Adams
  3 siblings, 0 replies; 21+ messages in thread
From: Andreas Schwab @ 2006-10-24 16:36 UTC (permalink / raw)
  Cc: emacs-devel

Aaron Maxwell <amax@redsymbol.net> writes:

> Hi, Does anyone know of an existing emacs function that will undo a 
> kill-buffer command?

There is none.  Killing a buffer is not undoable.  All resources
associated with the buffer are freed and may be overwritten immediately by
newly allocated objects.

You can prevent a buffer from being killed by returning nil from a
function on kill-buffer-query-functions.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-24 16:11 ` undo-kill-buffer Stuart D. Herring
@ 2006-10-24 16:46   ` Aaron Maxwell
  0 siblings, 0 replies; 21+ messages in thread
From: Aaron Maxwell @ 2006-10-24 16:46 UTC (permalink / raw)


Hi Davis,

There are two levels to what I'm envisioning.

First is the simple case when the killed buffer corresponds to a file with no 
unsaved changes.  In that case, undo-kill-buffer would have the same effect 
as doing a find-file on that file again.  Mainly the advantage is 
convenience; M-x undo-kill-buffer will be approximately as fast as navigating 
the filesystem to locate the file.  Much more importantly, I do not have to 
think; I can re-get that file (buffer) without interrupting concentration.  
This becomes more important when working with many files in several 
directories at once.

Second is when killing a buffer that has not been associated with a file, or a 
buffer that has unsaved changes.  This would have to be handled differently 
from the above.  The buffer contents would have to be cached somehow.  I'd 
probably have this be (de)activateable via a variable setting; if 
deactivated, undo-kill-buffer would get the last saved version, xor fail.

Thanks,
Aaron

On Tuesday 24 October 2006 09:11, Stuart D. Herring wrote:
> > 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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-24 15:56 undo-kill-buffer Aaron Maxwell
  2006-10-24 16:11 ` undo-kill-buffer Stuart D. Herring
  2006-10-24 16:36 ` undo-kill-buffer Andreas Schwab
@ 2006-10-24 23:43 ` Miles Bader
  2006-10-24 23:51   ` undo-kill-buffer Aaron Maxwell
  2006-10-25  0:41 ` undo-kill-buffer Drew Adams
  3 siblings, 1 reply; 21+ messages in thread
From: Miles Bader @ 2006-10-24 23:43 UTC (permalink / raw)
  Cc: emacs-devel

Aaron Maxwell <amax@redsymbol.net> writes:
> 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.

Do you notice this happening often (that you mistakenly kill a buffer)?

I've certainly done such a thing before, but I think not very often, to
the point where I just lump it in with other random dumb things I do
occasionally.

[One problem with the idea of saving killed buffers is memory it would
consume -- saving to temp files seems too heavyweight for rarely needed
functionality.  I suppose one could limit the number of undoable
buffer-kills, and perhaps more importantly, only save the contents of
killed buffers under a certain size (my impression is that very large
buffers tend to be programmatic output and the like, and maybe less
valuable in some sense).]

-Miles
-- 
o The existentialist, not having a pillow, goes everywhere with the book by
  Sullivan, _I am going to spit on your graves_.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-24 23:43 ` undo-kill-buffer Miles Bader
@ 2006-10-24 23:51   ` Aaron Maxwell
  2006-10-25  0:14     ` undo-kill-buffer Stefan Monnier
  2006-10-25  0:24     ` undo-kill-buffer Miles Bader
  0 siblings, 2 replies; 21+ messages in thread
From: Aaron Maxwell @ 2006-10-24 23:51 UTC (permalink / raw)


On Tuesday 24 October 2006 16:43, Miles Bader wrote:
> Aaron Maxwell <amax@redsymbol.net> writes:
> > 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
> Do you notice this happening often (that you mistakenly kill a buffer)?

Yeah, all the time :)

> I've certainly done such a thing before, but I think not very often, to
> the point where I just lump it in with other random dumb things I do
> occasionally.

> [One problem with the idea of saving killed buffers is memory it would
> consume -- saving to temp files seems too heavyweight for rarely needed
> functionality.  

True.

> I suppose one could limit the number of undoable 
> buffer-kills, and perhaps more importantly, only save the contents of
> killed buffers under a certain size (my impression is that very large
> buffers tend to be programmatic output and the like, and maybe less
> valuable in some sense).]

Those are both excellent ideas.

>
> -Miles

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-24 23:51   ` undo-kill-buffer Aaron Maxwell
@ 2006-10-25  0:14     ` Stefan Monnier
  2006-10-25  0:22       ` undo-kill-buffer Aaron Maxwell
  2006-10-25  0:36       ` undo-kill-buffer Miles Bader
  2006-10-25  0:24     ` undo-kill-buffer Miles Bader
  1 sibling, 2 replies; 21+ messages in thread
From: Stefan Monnier @ 2006-10-25  0:14 UTC (permalink / raw)
  Cc: emacs-devel

>> > 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
>> Do you notice this happening often (that you mistakenly kill a buffer)?

> Yeah, all the time :)

Maybe it's due to a UI misfeature.  Could you explain in which context
this happens?  Are you just using C-x k or some other way to kill the buffers?
C-x k It's a command I almost never use.


        Stefan

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-25  0:14     ` undo-kill-buffer Stefan Monnier
@ 2006-10-25  0:22       ` 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  0:36       ` undo-kill-buffer Miles Bader
  1 sibling, 2 replies; 21+ messages in thread
From: Aaron Maxwell @ 2006-10-25  0:22 UTC (permalink / raw)


On Tuesday 24 October 2006 17:14, Stefan Monnier wrote:
> >> > 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
> >>
> >> Do you notice this happening often (that you mistakenly kill a buffer)?
> >
> > Yeah, all the time :)
>
> Maybe it's due to a UI misfeature.  Could you explain in which context
> this happens?  Are you just using C-x k or some other way to kill the
> buffers? C-x k It's a command I almost never use.

Yes, i use C-x k .  Mostly it happens when I am doing some development that 
happens to involve a large number of files.  Often then I will try to kill 
buffers I'm no longer working with, just to help keep organized or other 
reasons.  Sometimes I'll kill a buffer (file) in this way and a moment later 
realize that there is another change I need to make.


>
>
>         Stefan
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-24 23:51   ` undo-kill-buffer Aaron Maxwell
  2006-10-25  0:14     ` undo-kill-buffer Stefan Monnier
@ 2006-10-25  0:24     ` Miles Bader
  2006-10-25  1:11       ` undo-kill-buffer Aaron Maxwell
  1 sibling, 1 reply; 21+ messages in thread
From: Miles Bader @ 2006-10-25  0:24 UTC (permalink / raw)
  Cc: emacs-devel

BTW, one idea for implementing this is to simply change `kill-buffer' to
instead _rename_ the buffer to a name starting with a space (Emacs
normally does not display such buffers in completion).  E.g. if you kill
the buffer "Oink", it would get renamed to " !!!killed-buffer-0074:Oink"
or something.

[Besides being fairly simple, this has the huge advantage of
automatically handling all the various random buffer state (of which
there is a lot).]

-Miles
-- 
.Numeric stability is probably not all that important when you're guessing.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-25  0:22       ` undo-kill-buffer Aaron Maxwell
@ 2006-10-25  0:32         ` Stefan Monnier
  2006-10-25 14:37         ` undo-kill-buffer Stuart D. Herring
  1 sibling, 0 replies; 21+ messages in thread
From: Stefan Monnier @ 2006-10-25  0:32 UTC (permalink / raw)
  Cc: emacs-devel

> Yes, i use C-x k .  Mostly it happens when I am doing some development that
> happens to involve a large number of files.  Often then I will try to kill
> buffers I'm no longer working with, just to help keep organized or other
> reasons.

I (almost) never bother to kill buffers I'm no longer working with.

> Sometimes I'll kill a buffer (file) in this way and a moment later
> realize that there is another change I need to make.

Does recentf-mode help?


        Stefan

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-25  0:14     ` undo-kill-buffer Stefan Monnier
  2006-10-25  0:22       ` undo-kill-buffer Aaron Maxwell
@ 2006-10-25  0:36       ` Miles Bader
  1 sibling, 0 replies; 21+ messages in thread
From: Miles Bader @ 2006-10-25  0:36 UTC (permalink / raw)
  Cc: Aaron Maxwell, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Maybe it's due to a UI misfeature.  Could you explain in which context
> this happens?  Are you just using C-x k or some other way to kill the buffers?
> C-x k It's a command I almost never use.

I use C-x k a lot because I really hate having lots of buffers clutter
up the namespace -- it makes C-x C-b less useful, makes buffer-name
completion more awkward, causes newly visited file buffers to end up
with annoying suffixes (I use uniquify, so the suffixes are rational,
but I still don't like them), etc.

For whatever reason, I tend to use C-x k rather than the buffer-list "d"
command, perhaps because it's nice to have one last look at the contents
before killing.  I don't think the specific command really makes all
that much difference though; it's easy enough to accidentally kill a
buffer using buffer-list "d" too, for instance (e.g. mark a bunch of
buffers for killing and end up marking one too many without realizing
it).

[I don't tend to lose stuff though, because if there's even a slight
chance I'll find info valuable later, I put it in /tmp/,blah or something
rather than making a scratch buffer.]

-Miles
-- 
`The suburb is an obsolete and contradictory form of human settlement'

^ permalink raw reply	[flat|nested] 21+ messages in thread

* RE: undo-kill-buffer
  2006-10-24 15:56 undo-kill-buffer Aaron Maxwell
                   ` (2 preceding siblings ...)
  2006-10-24 23:43 ` undo-kill-buffer Miles Bader
@ 2006-10-25  0:41 ` Drew Adams
  3 siblings, 0 replies; 21+ messages in thread
From: Drew Adams @ 2006-10-25  0:41 UTC (permalink / raw)


    Yes, i use C-x k .  Mostly it happens when I am doing some
    development that happens to involve a large number of files.
    Often then I will try to kill buffers I'm no longer working with,
    just to help keep organized or other reasons.  Sometimes I'll
    kill a buffer (file) in this way and a moment later
    realize that there is another change I need to make.

I don't have an answer for your question, but you might want to consider
using C-x 0 more and C-x k less, at least for buffers that you are unsure
you might want to revisit.

Having lots of buffers around (but not displayed) is not necessarily
bothersome or a performance hit. It can be a bit bothersome if you don't
have a good way of filtering them so that you see only the ones you're
interested in as candidates to visit. I tend to have lots of buffers around,
but I use a good tool to filter them as completion candidates to visit.
There are several such buffer-management or buffer-switching tools
available - check Emacs Wiki:
http://www.emacswiki.org/cgi-bin/wiki/CategoryBufferSwitching.

If you are talking about files, then I'm not sure I understand. You can
always revisit a file, creating a new buffer for it. If the file is not in
the current directory, you can get to it quickly using the minibuffer
history (cycling or matching) or the recent files list.

If you are talking about files that you modify without saving, then see
above, about buffers.

I suspect that if you are envisaging being able to undo buffer deletion
among a potentially large number of previously visited files, the management
problem of specifying the buffer whose killing you want to undo might be
bigger than the management problem you tried to solve in the first place by
cleaning out (killing) unneeded buffers.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-25  0:24     ` undo-kill-buffer Miles Bader
@ 2006-10-25  1:11       ` Aaron Maxwell
  0 siblings, 0 replies; 21+ messages in thread
From: Aaron Maxwell @ 2006-10-25  1:11 UTC (permalink / raw)


Good idea, thanks, I wasn't aware of all that.  

On Tuesday 24 October 2006 17:24, Miles Bader wrote:
> BTW, one idea for implementing this is to simply change `kill-buffer' to
> instead _rename_ the buffer to a name starting with a space (Emacs
> normally does not display such buffers in completion).  E.g. if you kill
> the buffer "Oink", it would get renamed to " !!!killed-buffer-0074:Oink"
> or something.
>
> [Besides being fairly simple, this has the huge advantage of
> automatically handling all the various random buffer state (of which
> there is a lot).]
>
> -Miles

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  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         ` Stuart D. Herring
  2006-10-25 16:05           ` undo-kill-buffer Drew Adams
  2006-10-25 22:43           ` undo-kill-buffer Miles Bader
  1 sibling, 2 replies; 21+ messages in thread
From: Stuart D. Herring @ 2006-10-25 14:37 UTC (permalink / raw)
  Cc: emacs-devel

> Yes, i use C-x k .  Mostly it happens when I am doing some development
> that
> happens to involve a large number of files.  Often then I will try to kill
> buffers I'm no longer working with, just to help keep organized or other
> reasons.  Sometimes I'll kill a buffer (file) in this way and a moment
> later
> realize that there is another change I need to make.

I use this when I'm "done with a project":

(defun kill-buffers-by-regexp (REG &optional AUTO)
  "Offer to kill each buffer whose name matches REG.
If AUTO is non-nil, kill all such buffers, prompting only if a buffer needs
saving."
  (interactive "MRegexp: \nP")
  (let (to-kill
        (checker (buffer-list)))
    (while checker
      (when (string-match REG (buffer-name (car checker)))
        (if AUTO (kill-buffer (car checker)))
        (push (car checker) to-kill))
      (setq checker (cdr checker)))
    (if to-kill
        (unless AUTO (kill-some-buffers to-kill))
      (error "No matches"))))

It would obviously be trivial to modify it to match on the filename
(including directories, perhaps) rather than the buffer name.

If you really want to be able to see the buffers, another trivial
modification would be to switch to each buffer before killing it (at least
in the AUTO case).  The important thing is to avoid the repetitive C-x k
RET C-x k RET C-x k RET ... that eventually gets you focusing so much on
the keys and so little on the files that you can kill something you'd
rather not.

Otherwise, when I want to be rid of a buffer for now but don't know that I
won't need it again, I use `bury-buffer', which I bind to C-x C-0.  (That
key doesn't exist on terminals, if it matters.)  I find the dabbrev
commands to be particularly useful when I have many relevant files in
buffers, even if I'm not expecting to modify them.

Hope this helps,
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.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* RE: undo-kill-buffer
  2006-10-25 14:37         ` undo-kill-buffer Stuart D. Herring
@ 2006-10-25 16:05           ` Drew Adams
  2006-10-25 22:43           ` undo-kill-buffer Miles Bader
  1 sibling, 0 replies; 21+ messages in thread
From: Drew Adams @ 2006-10-25 16:05 UTC (permalink / raw)


    I use this when I'm "done with a project":
    (defun kill-buffers-by-regexp (REG &optional AUTO)
      "Offer to kill each buffer whose name matches REG.
    If AUTO is non-nil, kill all such buffers, prompting only if a
    buffer needs saving." ...)

Along similar lines, with Icicles you can do that easily:

1. Type a regexp to the `C-x k' prompt for a buffer name.
2. Hit `S-TAB' to show all buffers that match, in *Completions*.
3. Pick matching buffers to kill - several ways:

   a. `C-!' to kill all matching buffers.
   b. `C-mouse-2' in *Completions* to kill buffers by clicking
      - kill any number of them.
   c. Cycle among the matching buffers with `next' and `prior',
      and use `C-RET' to kill selected candidates during
      cycling - kill any number of them.
   d. Use `C-next' and `C-prior' to kill selected buffer
      and cycle to the next - kill any number of them.

IOW, `C-x k' is a multi-command: you can kill multiple matching buffers in
the same invocation of `C-x k'. You can change the regexp on the fly to
continue killing buffers with names that match a different pattern.
*Completions* is updated as you type in the minibuffer, so it tracks your
input with the names that match.

The exact same thing applies to files and directories, using command
`icicle-delete-file' instead of `C-x k' (`icicle-kill-buffer').

And the same thing applies to windows showing a buffer, using `C-x 0'
(`icicle-delete-window'). With no prefix arg, it just deletes the current
window. With `C-u', it prompts for a buffer name, to delete all windows
showing the buffer. You treat the buffer name using completion, just like
`C-x k', so you can delete all windows showing any selection of buffers, or
all buffers, that match a regexp.

It is easy to define multi-commands like these, BTW. Here is the definition
of `icicle-delete-file':

(icicle-define-file-command
 icicle-delete-file              ; Command name
 "Delete a file or directory."   ; Doc string
 icicle-delete-file-or-directory ; Function to perform action
 "Delete file or directory: "    ; `read-file-name' args
 default-directory nil t)

(defun icicle-delete-file-or-directory (file)
  "Delete file (or directory) FILE."
  (if (eq t (car (file-attributes file)))
      (delete-directory file)
    (delete-file file)))

http://www.emacswiki.org/cgi-bin/wiki/Icicles

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  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           ` Miles Bader
  2006-10-25 23:02             ` undo-kill-buffer Edward O'Connor
  2006-10-25 23:17             ` undo-kill-buffer David Kastrup
  1 sibling, 2 replies; 21+ messages in thread
From: Miles Bader @ 2006-10-25 22:43 UTC (permalink / raw)
  Cc: Aaron Maxwell, emacs-devel

"Stuart D. Herring" <herring@lanl.gov> writes:
> I use this when I'm "done with a project":
>
> (defun kill-buffers-by-regexp (REG &optional AUTO)

What I'd _really_ like is something similar to the dired `% D' command,
in buffer-menu-mode (the mode you get from `C-x C-b').  A version that
matches by buffer filenames instead would also be nice.

Hmm I ought to do that one of these days.

-Miles
-- 
Would you like fries with that?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-25 22:43           ` undo-kill-buffer Miles Bader
@ 2006-10-25 23:02             ` Edward O'Connor
  2006-10-25 23:50               ` undo-kill-buffer Miles Bader
  2006-10-25 23:17             ` undo-kill-buffer David Kastrup
  1 sibling, 1 reply; 21+ messages in thread
From: Edward O'Connor @ 2006-10-25 23:02 UTC (permalink / raw)


> What I'd _really_ like is something similar to the dired `% D'
> command, in buffer-menu-mode (the mode you get from `C-x C-b'). A
> version that matches by buffer filenames instead would also be nice.

Have you tried ibuffer?

% n runs the command ibuffer-mark-by-name-regexp
% m runs the command ibuffer-mark-by-mode-regexp
...
D runs the command ibuffer-do-delete


Ted

-- 
Edward O'Connor
hober0@gmail.com

Ense petit placidam sub libertate quietem.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  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:17             ` David Kastrup
  2006-10-25 23:46               ` undo-kill-buffer Miles Bader
  1 sibling, 1 reply; 21+ messages in thread
From: David Kastrup @ 2006-10-25 23:17 UTC (permalink / raw)
  Cc: Aaron Maxwell, emacs-devel

Miles Bader <miles@gnu.org> writes:

> "Stuart D. Herring" <herring@lanl.gov> writes:
>> I use this when I'm "done with a project":
>>
>> (defun kill-buffers-by-regexp (REG &optional AUTO)
>
> What I'd _really_ like is something similar to the dired `% D' command,
> in buffer-menu-mode (the mode you get from `C-x C-b').  A version that
> matches by buffer filenames instead would also be nice.
>
> Hmm I ought to do that one of these days.

Watch my lips: "-./--- -././.-- ..-././.-/-/..-/.-././...".

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-25 23:17             ` undo-kill-buffer David Kastrup
@ 2006-10-25 23:46               ` Miles Bader
  0 siblings, 0 replies; 21+ messages in thread
From: Miles Bader @ 2006-10-25 23:46 UTC (permalink / raw)
  Cc: Aaron Maxwell, emacs-devel

David Kastrup <dak@gnu.org> writes:
>> Hmm I ought to do that one of these days.
>
> Watch my lips: "-./--- -././.-- ..-././.-/-/..-/.-././...".

I wasn't proposing to add such a feature to the pending release.

[Indeed, this entire discussion pretty obviously has nothing to do with
the pending release.]

-Miles
-- 
I'd rather be consing.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-25 23:02             ` undo-kill-buffer Edward O'Connor
@ 2006-10-25 23:50               ` Miles Bader
  2006-10-26  8:53                 ` undo-kill-buffer Richard Stallman
  0 siblings, 1 reply; 21+ messages in thread
From: Miles Bader @ 2006-10-25 23:50 UTC (permalink / raw)
  Cc: emacs-devel

Edward O'Connor <hober0@gmail.com> writes:
> Have you tried ibuffer?

Hmm, I tried it a long time ago, but it seemed unusably flaky at that
point.  I'll try again now.

[BTW, since ibuffer's basic operation largely appears to be an extension
of the normal buffer-list, it seems kind of silly to have both.  Why not
port any missing features from the traditional list-buffers command to
ibuffer (e.g., the use of the "header-line" for displaying column
titles), and then use ibuffer by default?  Are there fundamental
inconsistencies?]

-Miles
-- 
Love is a snowmobile racing across the tundra.  Suddenly it flips over,
pinning you underneath.  At night the ice weasels come.  --Nietzsche

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: undo-kill-buffer
  2006-10-25 23:50               ` undo-kill-buffer Miles Bader
@ 2006-10-26  8:53                 ` Richard Stallman
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Stallman @ 2006-10-26  8:53 UTC (permalink / raw)
  Cc: hober0, emacs-devel

    Hmm, I tried it a long time ago, but it seemed unusably flaky at that
    point.  I'll try again now.

If it still seems flaky, would you please report the bugs you encounter?

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2006-10-26  8:53 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-24 15:56 undo-kill-buffer Aaron Maxwell
2006-10-24 16:11 ` undo-kill-buffer Stuart D. Herring
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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).