From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: call function in other window ? Date: Sat, 20 May 2017 13:25:17 -0700 (PDT) Message-ID: <38f43e30-eeb0-427a-a885-fbd30d0d0d97@default> References: <0F7D0254-9A80-42BF-82EB-E09007BE3A39@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1495311961 11427 195.159.176.226 (20 May 2017 20:26:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 20 May 2017 20:26:01 +0000 (UTC) To: Jean-Christophe Helary , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 20 22:25:55 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCAwi-0002nS-Fz for geh-help-gnu-emacs@m.gmane.org; Sat, 20 May 2017 22:25:52 +0200 Original-Received: from localhost ([::1]:35352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCAwo-00064S-5L for geh-help-gnu-emacs@m.gmane.org; Sat, 20 May 2017 16:25:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCAwI-00064M-Kh for help-gnu-emacs@gnu.org; Sat, 20 May 2017 16:25:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCAwF-0007Lt-GK for help-gnu-emacs@gnu.org; Sat, 20 May 2017 16:25:26 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:22279) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dCAwF-0007Ld-6I for help-gnu-emacs@gnu.org; Sat, 20 May 2017 16:25:23 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v4KKPJeP027210 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 20 May 2017 20:25:19 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v4KKPIHq023258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 20 May 2017 20:25:19 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v4KKPImu011980; Sat, 20 May 2017 20:25:18 GMT In-Reply-To: <0F7D0254-9A80-42BF-82EB-E09007BE3A39@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113090 Archived-At: > 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) =09(apply fn args)))))