emacs_buffer_cycling

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: cycle buffers like Windows ALT-TAB
From: Ted Zlatanov <tzz@heechee.beld.net>
Date: 07 Dec 2000 10:22:52 -0500

Christoph Conrad <C.Conrad@cli.de> writes:

> Has anyone realized a function to cycle buffers like in Windows ALT-Tab?

This is what I use:

;; LCD Archive Entry:
;; cycle-buffer|Vladimir Alexiev|vladimir@cs.ualberta.ca|
;; Select buffers by cycling|
;; ftp://ftp.cs.ualberta.ca/pub/oolog/emacs/cycle-buffer.el|
;; 21-May-97|Version 2.16|

-- 
Teodor Zlatanov <tzz@iglou.com>
"Brevis oratio penetrat colos, longa potatio evacuat ciphos." -Rabelais

Path: nntp.stanford.edu!newsfeed.stanford.edu!news.tele.dk!194.213.69.151!news.algonet.se!newsfeed1.telenordia.se!algonet!newsfeed1.nokia.com!news1.nokia.com!news2.nokia.com.POSTED!scott
From: scott@pp.htv.fi (Scott Andrew Borton)
Newsgroups: comp.emacs
Subject: Re: cycle buffers like Windows ALT-TAB
References: <ulmtsffiv.fsf@cli.de>
Message-ID: <slrn92vbje.ma5.scott@anvil.ntc.nokia.com>
User-Agent: slrn/0.9.6.2 (Unix)
Lines: 18
Date: Thu, 07 Dec 2000 15:36:32 GMT
NNTP-Posting-Host: 131.228.178.39
X-Complaints-To: newsmaster@nokia.com
X-Trace: news2.nokia.com 976203392 131.228.178.39 (Thu, 07 Dec 2000 17:36:32 EET)
NNTP-Posting-Date: Thu, 07 Dec 2000 17:36:32 EET
Organization: Nokia
Xref: nntp.stanford.edu comp.emacs:52965

In <ulmtsffiv.fsf@cli.de>, Christoph Conrad wrote:

>Has anyone realized a function to cycle buffers like in Windows ALT-Tab?

This cycles buffers, but not like Alt-Tab (this doesn't provide a
list of targets like Alt-Tab does):

;; Scroll through buffers using control-tab
(global-set-key [C-tab] 'bury-buffer)




--scott

-- 
Airline route mapping/animations for yer PC:
http://two-wugs.net/px.phtml?dispatch

Path: nntp.stanford.edu!newsfeed.stanford.edu!xfer10.netnews.com!netnews.com!oleane.net!oleane!in2p3.fr!univ-lyon1.fr!news.ens-lyon.fr!news.imag.fr!grenet.fr!news.inpg.fr!news.ujf-grenoble.fr!news.inrialpes.fr!not-for-mail
From: Xavier Decoret <Xavier.Decoret@imag.fr>
Newsgroups: comp.emacs
Subject: Re: cycle buffers like Windows ALT-TAB
Date: 07 Dec 2000 17:05:07 +0100
Organization: Unite de Recherche INRIA Rhone-Alpes France
Lines: 18
Message-ID: <ubpelzk9pzg.fsf@imag.fr>
References: <ulmtsffiv.fsf@cli.de>
NNTP-Posting-Host: ciboule.inrialpes.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6
Xref: nntp.stanford.edu comp.emacs:52970

Christoph Conrad <C.Conrad@cli.de> writes:

> Hi!
> 
> Has anyone realized a function to cycle buffers like in Windows ALT-Tab?
> 

I *strongly* recommand you use the iswitchb.el package which does the
cycling plus a lot more.

-- 
+------------------+----------------------------------------------------+
|Xavier DECORET| iMAGIS, Laboratoire GRAVIR/IMAG  (CNRS,INRIA,INPG,UJF) |
|              | INRIA Rhone-Alpes, 655 Av de l'Europe, 38330 Montbonnot|
|Doctorant     | France. Tel: +33 4 76 61 54 58 - Fax: +33 4 76 61 54 40|
+------------------+--------+-------------------------------------------+
|Xavier.Decoret@imag.fr  |  http://www-imagis.imag.fr/~Xavier.Decoret   |
+---------------------------+-------------------------------------------+

Path: nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.uswest.net!nwanews.nwa.com!not-for-mail
From: "Jeff Jensen" <jeffjensen@nospam.visi.com>
Newsgroups: comp.emacs
Subject: Re: cycle buffers like Windows ALT-TAB
Date: Thu, 7 Dec 2000 11:38:12 -0600
Organization: Northwest Airlines, Inc.
Lines: 31
Message-ID: <90oi2f$1l3k$1@nwanews.nwa.com>
References: <ulmtsffiv.fsf@cli.de> <ubpelzk9pzg.fsf@imag.fr>
NNTP-Posting-Host: s19541.mn.nwa.com
X-Trace: nwanews.nwa.com 976210831 54388 139.72.121.118 (7 Dec 2000 17:40:31 GMT)
X-Complaints-To: usenet@nwa.com
NNTP-Posting-Date: 7 Dec 2000 17:40:31 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Xref: nntp.stanford.edu comp.emacs:52975

...or ido-mode, which is iswitchb plus the same for opening files (very
nice!):

;; Author: Kim F. Storm <stormware@get2net.dk>
;; Based on: iswitchb by Stephen Eglen <stephen@cns.ed.ac.uk>
;; Maintainer: Kim F. Storm <stormware@get2net.dk>
;; Location: http://hjem.get2net.dk/storm/emacs/


"Xavier Decoret" <Xavier.Decoret@imag.fr> wrote in message
news:ubpelzk9pzg.fsf@imag.fr...
> Christoph Conrad <C.Conrad@cli.de> writes:
>
> > Hi!
> >
> > Has anyone realized a function to cycle buffers like in Windows ALT-Tab?
> >
>
> I *strongly* recommand you use the iswitchb.el package which does the
> cycling plus a lot more.
>
> --
> +------------------+----------------------------------------------------+
> |Xavier DECORET| iMAGIS, Laboratoire GRAVIR/IMAG  (CNRS,INRIA,INPG,UJF) |
> |              | INRIA Rhone-Alpes, 655 Av de l'Europe, 38330 Montbonnot|
> |Doctorant     | France. Tel: +33 4 76 61 54 58 - Fax: +33 4 76 61 54 40|
> +------------------+--------+-------------------------------------------+
> |Xavier.Decoret@imag.fr  |  http://www-imagis.imag.fr/~Xavier.Decoret   |
> +---------------------------+-------------------------------------------+



From: "James Chapman" <Jim.Chapman@nospam.ncr.com>
Newsgroups: comp.emacs
References: <ulmtsffiv.fsf@cli.de>
Subject: Re: cycle buffers like Windows ALT-TAB
Date: Thu, 7 Dec 2000 15:20:55 -0800
Lines: 53
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Original-NNTP-Posting-Host: jbc01.elsegundoca.ncr.com
Message-ID: <3a301b25$1@rpc1284.daytonoh.ncr.com>
X-Original-Trace: 7 Dec 2000 18:20:05 -0500, jbc01.elsegundoca.ncr.com
NNTP-Posting-Host: ncrnews.daytonoh.ncr.com
X-Trace: 7 Dec 2000 18:20:08 -0500, ncrnews.daytonoh.ncr.com
Path: nntp.stanford.edu!newsfeed.stanford.edu!xfer10.netnews.com!netnews.com!feed2.news.rcn.net!rcn!chnws02.mediaone.net!news-out.cwix.com!newsfeed.cwix.com!pullfeed!rpc1287.DaytonOH.NCR.COM!ncrnews.daytonoh.ncr.com
Xref: nntp.stanford.edu comp.emacs:52992

"Christoph Conrad" <C.Conrad@cli.de> wrote in message
news:ulmtsffiv.fsf@cli.de...
> Hi!
>
> Has anyone realized a function to cycle buffers like in Windows ALT-Tab?
>

Many years ago, I wrote these functions, 'cycle-buffer' and
'toggle-recent-buffer'
to use with Emacs V. 18, and I'm still using it with V. 20.7.1, though
perhaps
there's a better way to do it.

(defun cycle-buffer ()
  "Switch to the least recently accessed buffer.
Repeated executions of this command will cycle through all the
non-scratch buffers."
  (interactive)
  (if (setq thebuf (get-non-scratch-buffer (reverse (buffer-list))))
      (switch-to-buffer thebuf)
    (message "There are no other non-scratch buffers")))

(defun toggle-recent-buffer ()
  "Switch to the previously accessed buffer.
Repeated executions toggle between the two most recently acccessed
non-scratch buffers."
  (interactive)
  (if (setq thebuf (get-non-scratch-buffer (cdr (buffer-list))))
      (switch-to-buffer thebuf)
    (message "There are no other non-scratch buffers")))

; The following predicate returns non-nil if the buffer is to be skipped.
; Use this to bypass scratch buffers, the minibuffer, etc.

(defun scratch-buffer-p (name)
  (or (equal " " (substring name 0 1))
      (equal "*" (substring name 0 1))
      (equal name (buffer-name (current-buffer)))))

; Recursively search a list of buffers and return the first one that is
; not a scratch buffer.

(defun get-non-scratch-buffer (buflst)
  (if (null buflst)
      nil
    (let ((posbuf (car buflst)))
      (if (scratch-buffer-p (buffer-name posbuf))
   (get-non-scratch-buffer (cdr buflst))
 posbuf))))





Path: nntp.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!HSNX.atgi.net!dcc.unicamp.br!lakesis.fapesp.br!lakesis.fapesp.br!serv1.uspnet.usp.br!not-for-mail
From: Jorge Kinoshita <jkinoshi@pcs.usp.br>
Newsgroups: comp.emacs
Subject: Re: cycle buffers like Windows ALT-TAB
Date: Sat, 09 Dec 2000 08:44:11 -0200
Organization: Universidade de S

the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu