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

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

Re: call function in other window ?


From: Emanuel Berg
Subject: Re: call function in other window ?
Date: Sun, 21 May 2017 01:50:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Jean-Christophe Helary wrote:

> Wouldn't it be something that people use
> frequently enough that is has its own
> function in Emacs ?

I don't think people do this that often.
Probably what people do is `other-window', or
whatever command to get to the desired buffer,
and then M-x their function, then get back...

There are shortcuts, or they can be set up, to
move very rapidly between buffers,
keyboard only.

If you want to optimize a specific case in
Elisp, you could do something like

    (defun do-something-other-window ()
      (interactive)
      (save-window-excursion
        (other-window 1)
        (do-something) ))

Perhaps with a check included to see where you
ended up - at least if "do-something" includes
changing the other buffer.

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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