From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: "Francis Moreau" <francis.moro@gmail.com>
Cc: Tassilo Horn <tassilo@member.fsf.org>, help-gnu-emacs@gnu.org
Subject: Re: How to toggle to buffer previously selected ?
Date: Thu, 07 Feb 2008 17:18:08 +0100 [thread overview]
Message-ID: <874pck7nb3.fsf@thievol.homelinux.org> (raw)
In-Reply-To: <38b2ab8a0802070746w2e182ef1i531ddb1cc180d8e6@mail.gmail.com> (Francis Moreau's message of "Thu, 7 Feb 2008 16:46:29 +0100")
"Francis Moreau" <francis.moro@gmail.com> writes:
> On Feb 7, 2008 11:53 AM, Tassilo Horn <tassilo@member.fsf.org> wrote:
>> "Francis Moreau" <francis.moro@gmail.com> writes:
>>
>> Hi Francis,
>>
>> > I know 'C-x o' to select the next selected buffer but I'd like to
>> > toggle between 2 buffers even if more than 2 buffers are displayed.
>>
>> I use this:
>>
>> (defun th-other-buffer ()
>> (interactive)
>> (switch-to-buffer (other-buffer)))
>>
>> (global-set-key (kbd "C-?") 'th-other-buffer)
>>
>
> This is not what I want to do. Sorry I wasn't clear enough in my previous email.
>
> OK, let's say I have the following setup in my emacs:
>
> +-------+--------+
> | | |
> | 1 | 2 |
> | | |
> +-------+--------+
> | | |
> | 3 | 4 |
> | | |
> +-------+--------+
>
> Currently buffer "2" is selected.
>
> I now select buffer "3". I did some typing in that buffer now I want
> to get back quickly to buffer "2". I don't want to do "\C-x\C-o" but
> I'd like for example just to do "\C-TAB".
>
> So I can go back and forth between these 2 buffers just by typing "\C-TAB"
>
> Thanks
;; C-x o inversé de n windows(optional)
(defun other-window-backward (&optional n)
"retourne sur n window(s) precedent(s)"
(interactive "p")
(other-window (- (or n 1))))
(global-set-key (kbd "<C-tab>") 'other-window-backward)
To go back 1 window C-tab
2 windows C-u 2 C-tab ...etc...
--
A + Thierry
Pub key: http://pgp.mit.edu
next prev parent reply other threads:[~2008-02-07 16:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-07 10:45 How to toggle to buffer previously selected ? Francis Moreau
2008-02-07 10:52 ` Bastien Guerry
2008-02-07 10:53 ` Tassilo Horn
2008-02-07 15:46 ` Francis Moreau
2008-02-07 15:58 ` Lennart Borgman (gmail)
2008-02-07 16:18 ` Thierry Volpiatto [this message]
2008-02-07 18:57 ` Tassilo Horn
2008-02-08 11:11 ` Francis Moreau
[not found] ` <mailman.7148.1202469108.18990.help-gnu-emacs@gnu.org>
2008-02-08 14:27 ` Joel J. Adamson
2008-02-08 19:08 ` Martin Marcher
[not found] <mailman.7093.1202381161.18990.help-gnu-emacs@gnu.org>
2008-02-15 13:32 ` Sam Peterson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874pck7nb3.fsf@thievol.homelinux.org \
--to=thierry.volpiatto@gmail.com \
--cc=francis.moro@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=tassilo@member.fsf.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).