From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?windows-1252?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: How to bring previous-buffer to cycle through the full list of buffers Date: Fri, 08 May 2015 08:01:41 +0200 Message-ID: <554C5145.3030500@easy-emacs.de> References: , <554B4533.5070103@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1431064947 14964 80.91.229.3 (8 May 2015 06:02:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 May 2015 06:02:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 08 08:02:14 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YqbMT-0004Xv-Hg for geh-help-gnu-emacs@m.gmane.org; Fri, 08 May 2015 08:02:13 +0200 Original-Received: from localhost ([::1]:53706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqbMS-0000YK-3X for geh-help-gnu-emacs@m.gmane.org; Fri, 08 May 2015 02:02:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqbMJ-0000Y0-9k for help-gnu-emacs@gnu.org; Fri, 08 May 2015 02:02:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqbMA-0001UD-0z for help-gnu-emacs@gnu.org; Fri, 08 May 2015 02:02:03 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]:63474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqbM9-0001U3-N9 for help-gnu-emacs@gnu.org; Fri, 08 May 2015 02:01:53 -0400 Original-Received: from [192.168.178.31] ([77.6.189.202]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0M4kN3-1Z9dfx1zC9-00yvzB for ; Fri, 08 May 2015 08:01:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: X-Provags-ID: V03:K0:jdzPhtq8UdNduM9LpVawIc4XNEcX8smmLp98N3GbjiX/iSJ2fow Fu77dBfeQNMDYKAsekFAZ1+hddLZpT4dK+Kp+xqxgNW2XRolffIhoR74iWkZyvd5bFolp/C mRBERYEYBtC/sDdNB5Z0MFEEOxw+p1XMtuxu63Ayw6crlqgN42A6HzHK84/mRuv80AmeSZG ldvs7q4Uq3cibDYbPLBKA== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.13 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104287 Archived-At: Am 07.05.2015 um 16:42 schrieb Jürgen Hartmann: > Thank you, Andreas Roehler, for your suggestion: > >> Not exactly what you are asking for: >> >> AFAIU it's about to jump back to a certain buffer. > Not exactly, I meant cycling through all available buffers. > >> In use here are a kind of hard-coded registers. >> >> Like that: >> >> (defun gehe-zu-register-x (&optional arg) >> "With C-u: Puffer merken" >> (interactive "P") >> (if arg >> (progn >> (window-configuration-to-register ?x) >> (message "%s" "Fenster mit \[C-kp-1] oder \\C-x j x erreichbar")) >> (jump-to-register ?x) >> (delete-other-windows) >> (message "%s" "Mit Arg.: Puffer merken"))) >> >> ;;;;; >> >> (global-set-key [(control kp-1)] 'gehe-zu-register-x) >> >> I.e. C-u C-kp-1 stores it. > This implements a nice bookmark functionality. But as said before, my focus > is on cycling trough all buffers. It is very much like previous-buffer already > does, but it should bring up all buffers. > > The background is that I typically have a more or less fixed arrangement of > windows--one larger one on the right half of the screen to do the actual edit > stuff, some smaller ones in a vertical split of the left hand side--and just > want to quickly alter the buffer that any of these windows shows. > > Of course one could use switch-to-buffer and enter the respective buffer's > name, but if there are not so much buffers it is faster to quickly cycle > through all of them until the right one is shown. > >> HTH, >> >> Andreas > Thank you very much. > > Juergen > > Hmm, when it is about to restore some older windows configuration, previous-buffer and the like will not do it, as being volatile. You could use result of (current-window-configuration) similar to registered positions as shown. Then (set-window-configuration MY-last-window-configuration), now jumping to subsequent stores. Cheers, Andreas