From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: buffers Date: Sat, 25 Jan 2003 10:23:04 +0000 Organization: muc.de e.V. -- private internet access Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <8iot0b.0d.ln@acm.acm> References: <_emY9.2066$6U3.12590@newsfep4-gui.server.ntli.net> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1043490894 365 80.91.224.249 (25 Jan 2003 10:34:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2003 10:34:54 +0000 (UTC) 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 18cNeG-00005k-00 for ; Sat, 25 Jan 2003 11:34:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18cNfP-0005BX-0C for gnu-help-gnu-emacs@m.gmane.org; Sat, 25 Jan 2003 05:36:03 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!zen.net.uk!news.imp.ch!news.imp.ch!uni-erlangen.de!news-nue1.dfn.de!newsfeed.r-kom.de!newsfeed.completel.de!news.space.net!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1043490083 30002 193.149.49.134 (25 Jan 2003 10:21:23 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 25 Jan 2003 10:21:23 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:109434 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5954 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5954 chris.danx wrote on Sat, 25 Jan 2003 02:04:24 +0000: > Hi, > I found some code to switch between buffers in the google archives of > this group, but on some emacs it doesn't work as expected or rather it > does but it goes to "hidden buffers" that don't show up in others. At > home (emacs 21.1.1 on mandrake) it works fine, going to/from any > buffers open in order but at uni (running rh 7.2 - no emacs version > number sorry) some buffers are selected which contain lots of symbols > and err, other junk - it's probably not junk but it's incomprehensible > to me. I don't know off hand what these buffers are, only that they > don't show up at home when cycling through the entire buffer list. > Is there any way to prevent certain buffers from being selected when > you cycle through buffers? Are their "hidden buffers" in emacs? There are buffers in emacs which do contain, er, junk, but their names all start with a space. Go to the *scratch* buffer, and execute (buffer-list) with C-u C-x C-e. Note the difference between # and # ^ | > The code is > ;switch between buffers > (defalias 'switch-to-next-buffer 'bury-buffer) > (defun switch-to-previous-buffer () > "Switches to previous buffer" > (interactive) > (switch-to-buffer (nth (- (length (buffer-list)) 1) (buffer-list))) > ) > (global-set-key "\C-c\j" 'switch-to-previous-buffer) > (global-set-key "\C-c\k" 'switch-to-next-buffer) It might be an idea to reprogram these commands so that internal buffers are normally filtered out from the buffer list, but with a C-u prefix, they would be treated as normal buffers. > Chris -- Alan Mackenzie (Munich, Germany) Email: aacm@muuc.dee; to decode, wherever there is a repeated letter (like "aa"), remove half of them (leaving, say, "a").