emacs-devel
[Top][All Lists]
Advanced

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

Re: Universal/prefix argument for "other window" redirection?


From: Gregory Heytings
Subject: Re: Universal/prefix argument for "other window" redirection?
Date: Thu, 08 Apr 2021 12:16:57 +0000


Is there already a way to "automatically" modify interactive commands to "auto-work" in other window instead of current window?

I know I can scroll other window already and switch to some buffer in another window with `switch-to-buffer-another-window`, I already use them.

What I would like is to have all the cursor motion stuff, expression evals etc, work on in other window so I don't need to switch back and forth two buffers (I like to work with two buffers side-by-side). I wonder if there is already something I could use; prefix command/universal prefix whatever, to autmoatically modify behaviour of interactive commands involved or do I have to write my own (if it's possible :))?


(defun next-command-in-other-window ()
  (interactive)
  (let ((key (read-key-sequence nil)))
    (let ((window (other-window-for-scrolling)))
      (with-selected-window window
        (execute-kbd-macro key)))))



reply via email to

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