From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.help Subject: Re: call function in other window ? Date: Sun, 21 May 2017 11:39:32 +0900 Message-ID: <9D41C2D6-0361-43C1-A89E-7C4440B512B9@gmail.com> References: <0F7D0254-9A80-42BF-82EB-E09007BE3A39@gmail.com> <38f43e30-eeb0-427a-a885-fbd30d0d0d97@default> <26D747C5-FD5A-4810-938E-77DD21C6D2F9@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1495334417 14617 195.159.176.226 (21 May 2017 02:40:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 May 2017 02:40:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 21 04:40:13 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 1dCGmz-0003Zj-Dw for geh-help-gnu-emacs@m.gmane.org; Sun, 21 May 2017 04:40:13 +0200 Original-Received: from localhost ([::1]:36061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCGmw-0003Bc-OK for geh-help-gnu-emacs@m.gmane.org; Sat, 20 May 2017 22:40:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCGmM-0003BV-0x for help-gnu-emacs@gnu.org; Sat, 20 May 2017 22:39:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCGmI-0003ed-Un for help-gnu-emacs@gnu.org; Sat, 20 May 2017 22:39:34 -0400 Original-Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]:32829) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCGmI-0003eJ-Nb for help-gnu-emacs@gnu.org; Sat, 20 May 2017 22:39:30 -0400 Original-Received: by mail-pf0-x22d.google.com with SMTP id e193so56184571pfh.0 for ; Sat, 20 May 2017 19:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=aYcbLOCdAmOoURNylEdTHhkOLT1r8iA4jqbkGLdJ4kM=; b=TjjY4SphFkLefRRxlyWVN3btYJJhcaHMkX8jgSA9HzUkD/EZzOyz9DIA6UQos2G0cF /6KTrS6pRrFC/oSvj0SOCkbet8LaOH+tx5vMjaUqrrtTda8MG/W6pBkBEtGhL6jbvEaV dYST08OYm6YZYGBFm2fjw/7jjydESA+V4KtJNE4mialmW9zFG3iMLxa3Ju0qXRnp/O95 X9IyEq3HqJtMnshb9myuEQ0OAYXVSg1RktKzxVZfqCsUmdhF5VCdo7My7Bq+45WZj8Ax IVDJj34H1ZyjLB8a/seEv5rVUpCLiDKnGmNkWw7ZSmx509xra1TIYLBQdiepgQ34Eyil VKuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=aYcbLOCdAmOoURNylEdTHhkOLT1r8iA4jqbkGLdJ4kM=; b=rNRDW3fBD9g0TU3hxMA3cU18uEe4yjGYus7UmfQfoR7zlPUPSgIG+CzduG5WJATHB6 /fz8/B6dlqZUkWwylV6866ZwBou0OPTsToZ5k65J3iVL40MOSv6wj2w9NfouNzBQxbfX IBoBf965hewME3AcImz2erLZ5CVpr/H0eyI+wiOF7H040V6p1+SivnsamInMC2uHhpCF nQH6PKJMHTO+pqCWW7tYyvUkcBFmUDJEvXNB3tuCS2BkjdT88L56J0DPHSb/Za+8nvKM Z9GzOE3VCa8fq3mJe0P4eclAHzAQunalHExpyspIhZoPDAiDbh1hJtA7Qhv36CayibMV WlaQ== X-Gm-Message-State: AODbwcBpi6nTSR1cvf0jjRUxTab+YTaSnpq1sNFdlJVSZJbuN2hUzVFB f/rwnJH9O2r47pdo0zE= X-Received: by 10.98.192.143 with SMTP id g15mr17986851pfk.219.1495334369529; Sat, 20 May 2017 19:39:29 -0700 (PDT) Original-Received: from [10.251.103.141] ([210.160.37.44]) by smtp.gmail.com with ESMTPSA id j191sm24297693pgc.53.2017.05.20.19.39.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 May 2017 19:39:28 -0700 (PDT) X-Priority: 3 In-Reply-To: <26D747C5-FD5A-4810-938E-77DD21C6D2F9@gmail.com> X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22d 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:113096 Archived-At: Thanks everybody for the replies. It maybe that my workflow does not include (yet) methods that are = specific to the way emacs works. I'll try to see specifically what I = want and why I want it that way and will get back to this thread. Thank = you again. Jean-Christophe=20 > On May 21, 2017, at 7:43, Jean-Christophe Helary = wrote: >=20 > Thank you Drew. >=20 > Wouldn't it be something that people use frequently enough that is has = its own function in Emacs ? >=20 > Jean-Christophe=20 >=20 >> On May 21, 2017, at 5:25, Drew Adams wrote: >>=20 >>> 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 ? >>=20 >> (defun foo (fn &rest args) >> (let ((win (next-window))) >> (when win >> (with-current-buffer (window-buffer win) >> (apply fn args))))) >=20