From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Todd Kokoszka Newsgroups: gmane.emacs.help Subject: Re: rotating between buffers Date: Fri, 16 Aug 2002 12:18:18 +0200 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <20020816121818.C7987@mobileway.com> References: <20020816.110026.59655103.fgs@epulse.net> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tThc/1wpZn/ma/RB" X-Trace: main.gmane.org 1029492669 22932 127.0.0.1 (16 Aug 2002 10:11:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 16 Aug 2002 10:11:09 +0000 (UTC) Cc: Brigham.Stevens@wamu.net Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17fe4R-0005xl-00 for ; Fri, 16 Aug 2002 12:11:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fe5P-00041J-00; Fri, 16 Aug 2002 06:12:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17fe4k-0003tj-00 for help-gnu-emacs@gnu.org; Fri, 16 Aug 2002 06:11:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17fe4i-0003tO-00 for help-gnu-emacs@gnu.org; Fri, 16 Aug 2002 06:11:26 -0400 Original-Received: from [194.98.169.20] (helo=pineau.local) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fe4h-0003tH-00 for help-gnu-emacs@gnu.org; Fri, 16 Aug 2002 06:11:24 -0400 Original-Received: (from kokoszka@localhost) by pineau.local (8.11.0/8.11.0) id g7GAIIc08768; Fri, 16 Aug 2002 12:18:18 +0200 X-Authentication-Warning: pineau.local: kokoszka set sender to kokostm@auburn.edu using -f Original-To: Francesco Scaglioni , help-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020816.110026.59655103.fgs@epulse.net>; from fgs@epulse.net on Fri, Aug 16, 2002 at 11:00:26AM +0100 Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:825 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:825 --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I found the attached at an emacs website -- perhaps it was http://www.emacswiki.org/cgi-bin/wiki.pl I looked to find the author in order to give her/him credit, but I couldn't. I use ctl-tab (forward) and ctl-alt-tab (backward) to cycle through buffers. I think it has more functionality but I'm not sure how to use it. Todd On Fri 16 Aug 2002 at 11:00:26 +0100, Francesco Scaglioni wrote: > > Hi > > Herewith relevant section of my .emacs -- keep on persuading > > ; Switch buffer with ctrl-tab > (global-set-key [(ctrl tab)] 'bury-buffer) ; Ctrl-Tab switches buffers > > F > > > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=emacs ; necessary support function for buffer burial (defun crs-delete-these (delete-these from-this-list) "Delete DELETE-THESE FROM-THIS-LIST." (cond ((car delete-these) (if (member (car delete-these) from-this-list) (crs-delete-these (cdr delete-these) (delete (car delete-these) from-this-list)) (crs-delete-these (cdr delete-these) from-this-list))) (t from-this-list))) ; this is the list of buffers I never want to see (defvar crs-hated-buffers '("KILL" "*Compile-Log*")) ; might as well use this for both (setq iswitchb-buffer-ignore (append '("^ " "*Buffer") crs-hated-buffers)) (defun crs-hated-buffers () "List of buffers I never want to see, converted from names to buffers." (delete nil (append (mapcar 'get-buffer crs-hated-buffers) (mapcar (lambda (this-buffer) (if (string-match "^ " (buffer-name this-buffer)) this-buffer)) (buffer-list))))) ; I'm sick of switching buffers only to find KILL right in front of me (defun crs-bury-buffer (&optional n) (interactive) (unless n (setq n 1)) (let ((my-buffer-list (crs-delete-these (crs-hated-buffers) (buffer-list (selected-frame))))) (switch-to-buffer (if (< n 0) (nth (+ (length my-buffer-list) n) my-buffer-list) (bury-buffer) (nth n my-buffer-list))))) (global-set-key [(control tab)] 'crs-bury-buffer) (global-set-key [(control meta tab)] (lambda () (interactive) (crs-bury-buffer -1))) --tThc/1wpZn/ma/RB--