unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'BDB'" <noemail@yahoo.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Hide extraneous buffers?
Date: Fri, 18 May 2012 13:39:09 -0700	[thread overview]
Message-ID: <250BD2AA88984452800ABB238336DE2A@us.oracle.com> (raw)
In-Reply-To: <slrnjrd3ne.37m.noemail@us.news.astraweb.com>

> Is there any way to hide the *scratch*, Messages, Completions 
> etc buffers? I kill them but they always come back, and it's
> a pain to have to cycle through 6 buffers when I only really
> have 3 meaningful ones open.

They are _supposed_ to "always come back". ;-)

You need to define clearly (for yourself) what you mean by the "meaningful"
ones.  Then you can build a filter that does what you want.

If buffer names `*...*' are not meaninful for you in general, then you can
exclude them all using a regexp.  In Icicles you can just set option
`icicle-buffer-no-match-regexp' to "\\`\\*[^*]+\\*\\'" to do that.

If you want to exclude only certain buffers, explicitly, then you can define a
predicate that tests membership in your blacklist.  In Icicles you can set set
option `icicle-buffer-predicate' to that predicate to filter them out.

If you want to include buffers of some kind but you want them to be at the end
of the list of choices, then you can define a sort function that does that.  In
Icicles you can do that by setting option `icicle-buffer-sort' to that function.

There are several such Icicles user options that control buffer-name completion.

You can also define one or more "buffer configurations", each of which is a set
of such option settings that defines a set of buffers to use (choose from). 

For example, I have one buffer config that includes all buffer names but sorts
those with names matching `*...*' last.  It looks like this:

("All, *...* Buffers Last"     ; Config name
 nil                           ; Match regexp (none)
 nil                           ; Don't-match regexp (none)
 nil                           ; Predicate (none)
 nil                           ; List of extra buffers to
                               ;  always include (none)
 icicle-buffer-sort-*...*-last ; Sort function
)

Sort function `icicle-buffer-*...*-last' is predefined, but you can roll your
own sort function - it's just a predicate that compares two buffer names
(strings).

You can have as many buffer configs as you like.  You can choose a different one
at any time using `M-x icicle-buffer-config'.  You can use command
`icicle-add-buffer-config' to define a config.

You don't need to use buffer configs, but they give you a quick way to pick a
whole set of option settings.

http://www.emacswiki.org/emacs/Icicles_-_Customization_and_General_Tips#toc95

http://www.emacswiki.org/emacs/Icicles_-_Global_Filters

http://www.emacswiki.org/emacs/Icicles_-_Support_for_Projects#toc6




  parent reply	other threads:[~2012-05-18 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 18:03 Hide extraneous buffers? BDB
2012-05-18 18:38 ` Mark Skilbeck
2012-05-18 20:39 ` Drew Adams [this message]
2012-05-19  0:18 ` Xah Lee
  -- strict thread matches above, loose matches on Subject: below --
2012-05-18 18:40 Mark Skilbeck
     [not found] <mailman.1361.1337366454.855.help-gnu-emacs@gnu.org>
2012-05-18 20:36 ` BDB
2012-05-18 22:54   ` Aaron Meurer

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=250BD2AA88984452800ABB238336DE2A@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=noemail@yahoo.com \
    /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.
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).