From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Soo many buffers Date: Thu, 05 Aug 2010 18:19:52 +0200 Message-ID: <87tyn9xc9j.fsf@thinkpad.tsdh.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281028749 9570 80.91.229.12 (5 Aug 2010 17:19:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 Aug 2010 17:19:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 05 19:19:06 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh45x-0006bE-H8 for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Aug 2010 19:19:05 +0200 Original-Received: from localhost ([127.0.0.1]:46362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oh45w-0002c9-GW for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Aug 2010 13:19:04 -0400 Original-Received: from [140.186.70.92] (port=36546 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oh3OM-0005ee-IW for help-gnu-emacs@gnu.org; Thu, 05 Aug 2010 12:34:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oh3Ax-0001Wl-2H for help-gnu-emacs@gnu.org; Thu, 05 Aug 2010 12:20:16 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:36521) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh3Aw-0001WD-ON for help-gnu-emacs@gnu.org; Thu, 05 Aug 2010 12:20:11 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oh3At-0004yc-8Z for help-gnu-emacs@gnu.org; Thu, 05 Aug 2010 18:20:07 +0200 Original-Received: from 178.1.141.18 ([178.1.141.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Aug 2010 18:20:07 +0200 Original-Received: from tassilo by 178.1.141.18 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Aug 2010 18:20:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 77 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 178.1.141.18 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Plixuyhz8NOn6HHaE0Dt89rTLWY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74458 Archived-At: Andrea Crotti writes: Hi Andrea, > The only concern now is about the org-agenda-files (around 200 maybe). WTF?!? How do you structure your projects, i.e. how do you decide to create a new agenda file? I only have 4... > I would like to have them everywhere, so I should add to the > "no-clear" list. But in this way I lose the advantage of desktop mode > and I'm still full of buffers. > > One thing that would be nice I think would be one command to toggle > the visibility of the org buffers on and off. 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: --8<---------------cut here---------------start------------->8--- (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)))))) --8<---------------cut here---------------end--------------->8--- 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: --8<---------------cut here---------------start------------->8--- (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))))))) --8<---------------cut here---------------end--------------->8--- HTH, Tassilo