all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Jean-Christophe Helary <jean.christophe.helary@gmail.com>,
	help-gnu-emacs@gnu.org
Subject: RE: call function in other window ?
Date: Sat, 20 May 2017 13:25:17 -0700 (PDT)	[thread overview]
Message-ID: <38f43e30-eeb0-427a-a885-fbd30d0d0d97@default> (raw)
In-Reply-To: <0F7D0254-9A80-42BF-82EB-E09007BE3A39@gmail.com>

> Is there an argument to M-x... to call a function not in the current
> buffer/window but in a different one (like the one targeted by "other
> window" ? Or a different way to do that ?

(defun foo (fn &rest args)
  (let ((win  (next-window)))
    (when win
      (with-current-buffer (window-buffer win)
	(apply fn args)))))



  reply	other threads:[~2017-05-20 20:25 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-20 15:35 call function in other window ? Jean-Christophe Helary
2017-05-20 20:25 ` Drew Adams [this message]
2017-05-20 22:43   ` Jean-Christophe Helary
2017-05-20 23:50     ` Emanuel Berg
2017-05-21  1:27     ` Drew Adams
2017-05-21  1:58       ` Emanuel Berg
2017-05-21  2:39     ` Jean-Christophe Helary
2017-05-21 10:07       ` Emanuel Berg
2017-05-21 10:16         ` Jean-Christophe Helary
2017-05-21 10:50           ` Joost Kremers
2017-05-21 11:08             ` Jean-Christophe Helary
2017-05-21 13:52               ` Emanuel Berg
2017-05-21 15:05               ` Eli Zaretskii
2017-05-21 15:14                 ` Jean-Christophe Helary
2017-05-21 15:56                   ` Emanuel Berg
2017-05-22  6:39                     ` Jean-Christophe Helary
2017-05-22 21:18                       ` Emanuel Berg
2017-05-22 22:26                         ` Jean-Christophe Helary
2017-05-22 22:42                           ` Kaushal Modi
2017-05-23  0:20                             ` Emanuel Berg
2017-05-23  0:19                           ` Emanuel Berg
2017-05-23  7:10                             ` tomas
2017-05-23  7:44                               ` Emanuel Berg
2017-05-23  7:57                                 ` tomas
2017-05-23  8:14                                   ` Emanuel Berg
2017-05-23  8:54                                     ` tomas
2017-05-23 12:58                                       ` Emanuel Berg
2017-05-23 13:03                                         ` Jean-Christophe Helary
2017-05-23 13:14                                           ` Emanuel Berg
2017-05-23 19:18                                             ` tomas
2017-05-23 20:25                               ` Tomas Nordin
2017-05-23 21:02                                 ` John Ankarström
2017-05-24 19:40                                   ` Emanuel Berg
2017-05-24  7:26                                 ` tomas
2017-05-21 15:59                   ` Eli Zaretskii
2017-05-21 22:58                   ` Drew Adams
     [not found]                   ` <<83tw4enqtl.fsf@gnu.org>
2017-05-21 23:00                     ` Drew Adams
2017-05-21 13:48           ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38f43e30-eeb0-427a-a885-fbd30d0d0d97@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=jean.christophe.helary@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.