* cycling through windows
@ 2013-07-12 4:42 C K Kashyap
2013-07-12 5:55 ` Jambunathan K
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: C K Kashyap @ 2013-07-12 4:42 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org
Hi,
What is a good way to cycle through windows - looks like C-x o cycles
through in one order and if I need to change the direction I need to C-u -
C-x o
But it seems too many keystrokes - is there a better way (other than doing
my own key bindings that is)
Regards,
Kashyap
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cycling through windows
2013-07-12 4:42 cycling through windows C K Kashyap
@ 2013-07-12 5:55 ` Jambunathan K
2013-07-12 8:09 ` Thorsten Jolitz
2013-07-12 16:17 ` Teemu Likonen
2 siblings, 0 replies; 7+ messages in thread
From: Jambunathan K @ 2013-07-12 5:55 UTC (permalink / raw)
To: C K Kashyap; +Cc: help-gnu-emacs@gnu.org
C K Kashyap <ckkashyap@gmail.com> writes:
> Hi,
> What is a good way to cycle through windows - looks like C-x o cycles
> through in one order and if I need to change the direction I need to C-u -
> C-x o
> But it seems too many keystrokes - is there a better way (other than doing
> my own key bindings that is)
Other window
C-x o
Keep Othering
C-x z
z
z
z
z
Reverse window movement
C-u - C-x o
Keep reversing
C-x z
z
z
z
z
> Regards,
> Kashyap
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cycling through windows
2013-07-12 4:42 cycling through windows C K Kashyap
2013-07-12 5:55 ` Jambunathan K
@ 2013-07-12 8:09 ` Thorsten Jolitz
2013-07-12 16:17 ` Teemu Likonen
2 siblings, 0 replies; 7+ messages in thread
From: Thorsten Jolitz @ 2013-07-12 8:09 UTC (permalink / raw)
To: help-gnu-emacs
C K Kashyap <ckkashyap@gmail.com> writes:
> Hi,
> What is a good way to cycle through windows - looks like C-x o cycles
> through in one order and if I need to change the direction I need to C-u -
> C-x o
> But it seems too many keystrokes - is there a better way (other than doing
> my own key bindings that is)
> Regards,
> Kashyap
I use libraries that make window switching easier, e.g.
,-------------------------
| (require 'switch-window)
`-------------------------
and
,-----------------------------------------------
| (when (require 'window-numbering nil 'NOERROR)
| (window-numbering-mode 1))
`-----------------------------------------------
With them its just
,--------------
| C-x o <digit>
`--------------
or
,----------
| M-<digit>
`----------
to switch to a another (numbered) window.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cycling through windows
[not found] <mailman.891.1373604148.12400.help-gnu-emacs@gnu.org>
@ 2013-07-12 9:13 ` Emanuel Berg
2013-07-12 15:51 ` Drew Adams
0 siblings, 1 reply; 7+ messages in thread
From: Emanuel Berg @ 2013-07-12 9:13 UTC (permalink / raw)
To: help-gnu-emacs
C K Kashyap <ckkashyap@gmail.com> writes:
> What is a good way to cycle through windows ...
If you would consider not base cursor movement on windows, but on
files/buffers, I wrote this a while back in this group. I found it
somewhere on the Internet and it really made my life easier, once
I set it up.
- old but still great material below -
(global-set-key (kbd "C-j") 'jump-to-register)
(set-register ?a (cons 'file "/sudo::/etc/apt/sources.list"))
(set-register ?c (cons 'file "~/.irssi/config"))
(set-register ?C (cons 'file "/sudo::/etc/default/console-setup"))
(set-register ?e (cons 'file "~/.emacs"))
;; etc.
Note: 1) How to use it for superuser, *and* ordinary files, 2)
that it is case sensitive ('c' and 'C'), and 3) the mnemonic use
of letters (I use zsh, otherwise there would have been a 'b' for
.bashrc - you get it).
Before I started with this system, I lost a lot of time typing
file paths, iterating the buffer list, etc. Now I just (for
example) [C-j e] to bring up .emacs - and if there is such a
buffer already, I get to the correct place (where I had point on
my last visit).
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: cycling through windows
2013-07-12 9:13 ` Emanuel Berg
@ 2013-07-12 15:51 ` Drew Adams
0 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2013-07-12 15:51 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
> (global-set-key (kbd "C-j") 'jump-to-register)
>
> (set-register ?a (cons 'file "/sudo::/etc/apt/sources.list"))
> (set-register ?c (cons 'file "~/.irssi/config"))
> (set-register ?C (cons 'file "/sudo::/etc/default/console-setup"))
> (set-register ?e (cons 'file "~/.emacs"))
>
> Before I started with this system, I lost a lot of time typing
> file paths, iterating the buffer list, etc. Now I just (for
> example) [C-j e] to bring up .emacs - and if there is such a
> buffer already, I get to the correct place (where I had point on
> my last visit).
If you want such persistence then instead of loading code to
recreate the registers each time, just use bookmarks.
That's what they're for.
And bookmarks have hooks, so you can add behavior.
And you can define your own bookmark types, to give you any
behavior you want.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cycling through windows
2013-07-12 4:42 cycling through windows C K Kashyap
2013-07-12 5:55 ` Jambunathan K
2013-07-12 8:09 ` Thorsten Jolitz
@ 2013-07-12 16:17 ` Teemu Likonen
2013-07-14 6:35 ` C K Kashyap
2 siblings, 1 reply; 7+ messages in thread
From: Teemu Likonen @ 2013-07-12 16:17 UTC (permalink / raw)
To: C. K. Kashyap; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
C. K. Kashyap [2013-07-12 10:12:02 +05:30] wrote:
> What is a good way to cycle through windows - looks like C-x o cycles
> through in one order and if I need to change the direction I need to
> C-u - C-x o But it seems too many keystrokes - is there a better way
> (other than doing my own key bindings that is)
I use "repeat command" idea which I got from Drew Adams. With that I can
cycle with "C-x o o o o o o". That is, just repeating the last component
("o").
(defun tl-repeat-command (command)
;; From Drew Adams.
(require 'repeat)
(let ((repeat-message-function 'ignore))
(setq last-repeatable-command command)
(repeat nil)))
(defun tl-other-window (count)
(interactive "p")
(tl-repeat-command 'other-window))
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cycling through windows
2013-07-12 16:17 ` Teemu Likonen
@ 2013-07-14 6:35 ` C K Kashyap
0 siblings, 0 replies; 7+ messages in thread
From: C K Kashyap @ 2013-07-14 6:35 UTC (permalink / raw)
To: Teemu Likonen; +Cc: help-gnu-emacs@gnu.org
Thank you all so much.
I think the "keep-othering" suggested by Jambunathan works just fine for me.
Regards,
Kashyap
On Fri, Jul 12, 2013 at 9:47 PM, Teemu Likonen <tlikonen@iki.fi> wrote:
> C. K. Kashyap [2013-07-12 10:12:02 +05:30] wrote:
>
> > What is a good way to cycle through windows - looks like C-x o cycles
> > through in one order and if I need to change the direction I need to
> > C-u - C-x o But it seems too many keystrokes - is there a better way
> > (other than doing my own key bindings that is)
>
> I use "repeat command" idea which I got from Drew Adams. With that I can
> cycle with "C-x o o o o o o". That is, just repeating the last component
> ("o").
>
>
> (defun tl-repeat-command (command)
> ;; From Drew Adams.
> (require 'repeat)
> (let ((repeat-message-function 'ignore))
> (setq last-repeatable-command command)
> (repeat nil)))
>
> (defun tl-other-window (count)
> (interactive "p")
> (tl-repeat-command 'other-window))
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-07-14 6:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-12 4:42 cycling through windows C K Kashyap
2013-07-12 5:55 ` Jambunathan K
2013-07-12 8:09 ` Thorsten Jolitz
2013-07-12 16:17 ` Teemu Likonen
2013-07-14 6:35 ` C K Kashyap
[not found] <mailman.891.1373604148.12400.help-gnu-emacs@gnu.org>
2013-07-12 9:13 ` Emanuel Berg
2013-07-12 15:51 ` Drew Adams
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.