From: Andrea Crotti <andrea.crotti.0@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Soo many buffers
Date: Fri, 06 Aug 2010 13:07:21 +0200 [thread overview]
Message-ID: <m1fwysxamu.fsf@93-169.eduroam.rwth-aachen.de> (raw)
In-Reply-To: 87tyn9xc9j.fsf@thinkpad.tsdh.de
Tassilo Horn <tassilo@member.fsf.org> writes:
>
> At least with `ibuffer' (an advanced alternative to the normal
> `list-buffers') you can group buffers, so that you get something looking
> like Gnus group buffers with topics. I also put org-related buffers in
> one group. Here's my definition:
>
> (setq ibuffer-saved-filter-groups
> '(("default"
> ("Chat" (or
> (mode . garak-mode)
> (name . "^\\*Garak\\*$")
> (mode . rcirc-mode)))
> ("Organization" (or
> (mode . diary-mode)
> (mode . org-mode)
> (mode . org-agenda-mode)))
> ("Gnus & News" (or
> (mode . message-mode)
> (mode . bbdb-mode)
> (mode . mail-mode)
> (mode . gnus-group-mode)
> (mode . gnus-summary-mode)
> (mode . gnus-article-mode)
> (name . "^\\(\\.bbdb\\|dot-bbdb\\)$")
> (name . "^\\.newsrc-dribble$")
> (mode . newsticker-mode)))
> ("Files" (filename . ".*"))
> ("File Management" (or
> (mode . dired-mode)
> (mode . shell-mode)))
> ("Documentation" (or
> (mode . Info-mode)
> (mode . apropos-mode)
> (mode . woman-mode)
> (mode . help-mode)
> (mode . Man-mode))))))
>
> If you want to get git of org-mode buffers for all buffer completion
> (C-x b), you could rename all such buffers, so that they start with a
> space. Those are ignored by completion (unless you type a space
> literally).
>
> Here's a (only very briefly tested) snippet:
>
> (defun th-hide-org-buffers (arg)
> "Hide org-mode buffers from completion by prepending a space at the buffer name.
> When called with prefix arg (`C-u'), then remove this space again."
> (interactive "P")
> (dolist (b (buffer-list))
> (set-buffer b)
> (when (eq major-mode 'org-mode)
> (rename-buffer
> (if arg
> (replace-regexp-in-string "^[[:space:]]+" "" (buffer-name))
> (concat " " (buffer-name)))))))
>
> HTH,
> Tassilo
Thanks a lot they're both really useful it's what I was looking for.
But ido-mode (with flex matching) is too smart and it still finds them!
In theory I found
--8<---------------cut here---------------start------------->8---
(add-to-list 'ido-ignore-buffers "\\.org$")
--8<---------------cut here---------------end--------------->8---
this variable but that regexp doens't work as expected, I still never
get regexp to work at first attempt in emacs...
next prev parent reply other threads:[~2010-08-06 11:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-05 11:32 Soo many buffers Andrea Crotti
2010-08-05 15:55 ` suvayu ali
2010-08-07 18:03 ` Dan Davison
2010-08-09 16:47 ` Andrea Crotti
2010-08-09 16:54 ` Richard Riley
2010-08-10 8:34 ` Andrea Crotti
2010-08-13 8:50 ` Andrea Crotti
2010-08-19 15:04 ` Chris Newton
2010-08-05 16:19 ` Tassilo Horn
2010-08-06 11:07 ` Andrea Crotti [this message]
2010-08-06 11:14 ` Gary
2010-08-06 13:58 ` Andrea Crotti
2010-08-06 15:12 ` Glauber Alex Dias Prado
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=m1fwysxamu.fsf@93-169.eduroam.rwth-aachen.de \
--to=andrea.crotti.0@gmail.com \
--cc=help-gnu-emacs@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.
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).