Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

step one buffer tab to the left/right?

0 views
Skip to first unread message

Torsten Mohr

unread,
Oct 26, 2004, 3:37:24 PM10/26/04
to
Hi,

i use the buffer tabs to show the buffers that are
actually loaded.

Is there a command to change one buffer tab to the
left/right?


Thanks for any hints,
Torsten.

Adrian Aichner

unread,
Oct 26, 2004, 5:23:29 PM10/26/04
to
Torsten Mohr <tm...@s.netic.de> writes:

> Hi,
>
> i use the buffer tabs to show the buffers that are
> actually loaded.
>
> Is there a command to change one buffer tab to the
> left/right?

Use
M-x customize-variable RET default-gutter-position RET

>
>
> Thanks for any hints,
> Torsten.
>

--
Adrian Aichner
mailto:adr...@xemacs.org
http://www.xemacs.org/

Torsten Mohr

unread,
Oct 27, 2004, 7:38:37 PM10/27/04
to
Hi,

thanks for that hint, but now that i read my original
posting i see that i posted it in an unclear way.

>> i use the buffer tabs to show the buffers that are
>> actually loaded.
>>
>> Is there a command to change one buffer tab to the
>> left/right?
>
> Use
> M-x customize-variable RET default-gutter-position RET

I have the gutter position set to "top", which is fine and
what i don't want to change.
Very often i load several files and have several buffers
then, which are shown in the "gutter". I now want to
activate another buffer and i don't want to bring up the
buffer list and select the buffer that i want to make
active.

I'd rather like to have a keyboard macro to activate the
buffer that is left/right to the buffer that is active
at the moment in the gutter.

E.g. the gutter says:

file1.c | main.c | gui.c | network.c

If main.c is the active buffer, i'd like to activate "gui.c"
by some keyboard command like "Ctrl-Meta-RightArrow".

Is something like this possible?

Stephen J. Turnbull

unread,
Oct 27, 2004, 10:42:25 PM10/27/04
to
>>>>> "Torsten" == Torsten Mohr <tm...@s.netic.de> writes:

Torsten> E.g. the gutter says:

Torsten> file1.c | main.c | gui.c | network.c

Torsten> If main.c is the active buffer, i'd like to activate
Torsten> "gui.c" by some keyboard command like
Torsten> "Ctrl-Meta-RightArrow".

Torsten> Is something like this possible?

Apparently not. It seems that the list of buffers used by the tab
control widget internally is not available to Lisp, or is somehow
inconsistent with what is available to Lisp.

If you google on this topic in this newsgroup you'll see that this
kind of issue has come up before; if you're interested in trying to
work out the problem, please make a bug report and join the discussion
on the XEmacs Beta mailing list.

I have a personal interest in this area, but unfortunately it must be
low priority for me for some time to come. So you should either have
some knowledge of Emacs Lisp, or a strong interest in learning it, and
a willingness to study and analyze the code in lisp/gutter-items.el.

A little C, some Xt knowledge, and analysis of lwlib/xlwtabs.* will
also be necessary, but I can provide substantial support there as that
is related to something higher on my task list.

Or you can just post the bug report to xemacs-beta and hope somebody
takes an interest. But the "usual suspects" for this kind of thing
have not been terribly active recently.


--
Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.

Adrian Aichner

unread,
Oct 28, 2004, 3:05:59 AM10/28/04
to
Torsten Mohr <tm...@s.netic.de> writes:

This works in the 21.5 beta series, not in 21.4:

M-Sh-end runs the command switch-to-next-buffer-in-group
M-Sh-home runs the command switch-to-previous-buffer-in-group

etc\sample.init.el of 21.4 also has code for this, but it does not
seem to work for me.

Best regards,

Adrian

>
>
> Thanks for any hints,
> Torsten.
>
>

--

Adrian Aichner

unread,
Oct 28, 2004, 3:11:47 AM10/28/04
to
Adrian Aichner <adr...@xemacs.org> writes:

M-p (switch-to-previous-buffer-in-group)
M-n (switch-to-next-buffer-in-group)
which steps on existing kep bindings, at least in Gnus.

George Ogata

unread,
Oct 29, 2004, 5:40:28 AM10/29/04
to
Torsten Mohr <tm...@s.netic.de> writes:

> Very often i load several files and have several buffers
> then, which are shown in the "gutter". I now want to
> activate another buffer and i don't want to bring up the
> buffer list and select the buffer that i want to make
> active.
>
> I'd rather like to have a keyboard macro to activate the
> buffer that is left/right to the buffer that is active
> at the moment in the gutter.
>
> E.g. the gutter says:
>
> file1.c | main.c | gui.c | network.c
>
> If main.c is the active buffer, i'd like to activate "gui.c"
> by some keyboard command like "Ctrl-Meta-RightArrow".
>
> Is something like this possible?

I've been using pc-bufsw for similar functionality. It doesn't use
the gutter (I don't even have gutters compiled in), but you may be
interested in it anyway. Get it at:

http://www.gnusoftware.com/Emacs/Lisp/pc-bufsw.el

Depending on the keys you want to use, you may then want to wrap it in
a minor mode:

;; making this a minor mode makes the key-bindings available
;; irrespective of the major mode. Some modes tended to restore the
;; default settings of C-TAB if they were just global-set-key'ed in
(defvar pc-bufsw-mode-map (make-sparse-keymap))
(define-key pc-bufsw-mode-map [(meta tab)] 'pc-bufsw::previous)
(define-key pc-bufsw-mode-map [(meta iso-left-tab)] 'pc-bufsw::lru)

(defvar g0-pc-bufsw-mode nil
"Toggle var for g0-pc-bufsw-mode.")

(defun g0-pc-bufsw-mode (&optional arg)
"Mode to enable g0-pc-bufsw-mode bindings irrespective of major mode."
(setq g0-pc-bufsw-mode
(if (null arg) (not g0-pc-bufsw-mode)
(> (prefix-numeric-value arg) 0))))

(add-minor-mode 'g0-pc-bufsw-mode nil pc-bufsw-mode-map)

(g0-pc-bufsw-mode 1)

HTH.

0 new messages