help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: moving around multiple buffers


From: A.Politz
Subject: Re: moving around multiple buffers
Date: Thu, 20 Aug 2009 09:45:21 -0700 (PDT)
User-agent: G2/1.0

On Aug 20, 10:58 am, Tamas K Papp <tkp...@gmail.com> wrote:
[...]
> I know how to do the splitting, but I am curious about what people use
> to move around.  Using C-x o (other-window) is a pain [...]


What about a little modality ?

(defun other-window-repeatable (arg)
  "Make it convenient to repeat `other-window', by just having to
press the last character of the invoking keysequence. Timeout
waiting after 3s."
  (interactive "p")
  (other-window arg)
  (let (readp)
    (while (eq last-input-event
               (setq readp
                     (read-event
                      (format "Press `%s' to repeat other-window."
                              (key-description
                               (vector last-input-event)))
                      nil 3)))
      (other-window (signum arg)))
    (message nil)
    (when readp
      (setq unread-command-events
            (list last-input-event)))))

(global-set-key [?\C-x ?o] 'other-window-repeatable)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]