help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: Grouping related buffers


From: Drew Adams
Subject: RE: Grouping related buffers
Date: Mon, 10 Nov 2008 10:26:23 -0800

> I was wondering if there was a way to group related buffers
> in Emacs through the use of, say, multiple buffer workspaces.
> For example, it would be nice if when I display a list of
> existing buffers by typing C-x C-b it would be possible to
> group the buffers in the list, and when I called C-x b only
> the buffers in the current grouping would be available. (To
> get at the others it would be necessary to change the
> current buffer workspace.)

[Please use plain text, not HTML, for this mailing list.]

There are probably several ways to do what you want. Look on Emacs Wiki, and
perhaps take a look also at Ibuffer (dunno about that).

Here is another. In Icicles, you can define any number of named buffer
configurations. Each buffer config represents a named set of buffers, together
with a sort function and other parameters that control buffer-name completion.

* config name
* regexp that buffer names must match
* regexp that buffer names must not match
* predicate that buffer names must satisfy
* explicit list of additional buffers
* buffer-name sort function

For example, here is a buffer config named `Files and Scratch' that includes
only buffer `*scratch*' and buffers visiting files. By default, the buffer names
are sorted alphabetically. 

("Files and Scratch" ; config name
 nil                 ; must-match regexp
 nil                 ; must-not-match regexp
 (lambda (bufname)   ; predicate
   (buffer-file-name
    (get-buffer bufname)))
 ("*scratch*")       ; extra buffers
 string-lessp)       ; sort function

See:
http://www.emacswiki.org/emacs/Icicles_-_Support_for_Projects

http://www.emacswiki.org/emacs/Icicles_-_Customization_and_General_Tips#icicle-b
uffer-configs

Independently of any buffer configs, you can also save (persistently or not) any
set of buffer-name completion candidates to reuse for completion later. (You can
also save and then reuse file names or any other set of completion candidates.)

See:
http://www.emacswiki.org/emacs/Icicles_-_Candidate_Sets







reply via email to

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