all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* can I batch select buffers in buffer menu mode?
@ 2005-07-18 17:07 usman
  2005-07-18 17:19 ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: usman @ 2005-07-18 17:07 UTC (permalink / raw)


I often have many buffers open at the same time; when
I want to clean stuff up I hit 'C-x b', manually mark
ones I don't want around anymore, then hit 'x' to
delete them.

Is there a way I can specify a pattern and mark all
matching buffers for deletion? For instance, it'd be
great if I could say "M-x mark-matching ~/src/2.2/*.cpp"
to mark all buffers visiting files in that dir for
removal.

Thanks for any pointers, examples, etc.
-usman

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

* RE: can I batch select buffers in buffer menu mode?
  2005-07-18 17:07 can I batch select buffers in buffer menu mode? usman
@ 2005-07-18 17:19 ` Drew Adams
  2005-07-18 17:55   ` Lennart Borgman
       [not found]   ` <mailman.909.1121709536.20277.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Drew Adams @ 2005-07-18 17:19 UTC (permalink / raw)


    Is there a way I can specify a pattern and mark all
    matching buffers for deletion? For instance, it'd be
    great if I could say "M-x mark-matching ~/src/2.2/*.cpp"
    to mark all buffers visiting files in that dir for
    removal.

For files (in Dired):
  dired-mark-files-regexp, which is bound to `% m' and to `% *'

For buffers (in *Buffer List*):
  I don't think there is a command to mark buffers via regexp, but you could
write one!

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

* Re: can I batch select buffers in buffer menu mode?
  2005-07-18 17:19 ` Drew Adams
@ 2005-07-18 17:55   ` Lennart Borgman
  2005-07-21  4:31     ` Drew Adams
       [not found]   ` <mailman.909.1121709536.20277.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Lennart Borgman @ 2005-07-18 17:55 UTC (permalink / raw)
  Cc: help-gnu-emacs

Drew Adams wrote:

>    Is there a way I can specify a pattern and mark all
>    matching buffers for deletion? For instance, it'd be
>    great if I could say "M-x mark-matching ~/src/2.2/*.cpp"
>    to mark all buffers visiting files in that dir for
>    removal.
>
>For buffers (in *Buffer List*):
>  I don't think there is a command to mark buffers via regexp, but you could
>write one!
>
Does not ibuffer has support for this? The help text says:

    % n - mark buffers by their name, using a regexp
 

-- Lennart

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

* Re: can I batch select buffers in buffer menu mode?
       [not found]   ` <mailman.909.1121709536.20277.help-gnu-emacs@gnu.org>
@ 2005-07-21  4:15     ` Dan Elliott
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Elliott @ 2005-07-21  4:15 UTC (permalink / raw)


Lennart Borgman wrote:
> Drew Adams wrote:
> 
>>    Is there a way I can specify a pattern and mark all
>>    matching buffers for deletion? For instance, it'd be
>>    great if I could say "M-x mark-matching ~/src/2.2/*.cpp"
>>    to mark all buffers visiting files in that dir for
>>    removal.
>>
>> For buffers (in *Buffer List*):
>>  I don't think there is a command to mark buffers via regexp, but you 
>> could
>> write one!
>>
> Does not ibuffer has support for this? The help text says:
> 
>    % n - mark buffers by their name, using a regexp

Is ibuffer a package apart from the buffer abilities that are a part of 
EMACS?

Thank you.

- dan

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

* RE: can I batch select buffers in buffer menu mode?
  2005-07-18 17:55   ` Lennart Borgman
@ 2005-07-21  4:31     ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2005-07-21  4:31 UTC (permalink / raw)


    >    Is there a way I can specify a pattern and mark all
    >    matching buffers for deletion? For instance, it'd be
    >    great if I could say "M-x mark-matching ~/src/2.2/*.cpp"
    >    to mark all buffers visiting files in that dir for
    >    removal.

    >For buffers (in *Buffer List*):
    >I don't think there is a command to mark buffers via regexp,
    >but you could write one!

    Does not ibuffer has support for this? The help text says:

        % n - mark buffers by their name, using a regexp

The original question was about marking buffers in *Buffer List* for
deletion. I'd say that should be pretty easy to code, by looking at 1) the
code in buff-menu.el and 2) the code for the similar Dired function,
`dired-mark-files-regexp' (in dired.el). Do something similar to
`dired-mark-files-regexp', and integrate it within `Buffer-menu-mode'. HTH,
Drew

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

* Re: can I batch select buffers in buffer menu mode?
       [not found] <mailman.1152.1121921604.20277.help-gnu-emacs@gnu.org>
@ 2005-07-21 17:11 ` Thien-Thi Nguyen
  0 siblings, 0 replies; 6+ messages in thread
From: Thien-Thi Nguyen @ 2005-07-21 17:11 UTC (permalink / raw)


"Drew Adams" <drew.adams@oracle.com> writes:

> The original question was about marking buffers in *Buffer List*
> for deletion. I'd say that should be pretty easy to code

there is also:

  (global-set-key "\C-xC-b" 'electric-buffer-list)

w/ which "d" marks for deletion, etc.  available since emacs 18...

thi

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

end of thread, other threads:[~2005-07-21 17:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-18 17:07 can I batch select buffers in buffer menu mode? usman
2005-07-18 17:19 ` Drew Adams
2005-07-18 17:55   ` Lennart Borgman
2005-07-21  4:31     ` Drew Adams
     [not found]   ` <mailman.909.1121709536.20277.help-gnu-emacs@gnu.org>
2005-07-21  4:15     ` Dan Elliott
     [not found] <mailman.1152.1121921604.20277.help-gnu-emacs@gnu.org>
2005-07-21 17:11 ` Thien-Thi Nguyen

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.