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 07:43:15 +0900 Message-ID: <26D747C5-FD5A-4810-938E-77DD21C6D2F9@gmail.com> References: <0F7D0254-9A80-42BF-82EB-E09007BE3A39@gmail.com> <38f43e30-eeb0-427a-a885-fbd30d0d0d97@default> 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 1495320229 8891 195.159.176.226 (20 May 2017 22:43:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 20 May 2017 22:43:49 +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 00:43:45 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 1dCD69-0002DC-6z for geh-help-gnu-emacs@m.gmane.org; Sun, 21 May 2017 00:43:45 +0200 Original-Received: from localhost ([::1]:35611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCD6E-0006Bo-OB for geh-help-gnu-emacs@m.gmane.org; Sat, 20 May 2017 18:43:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCD5h-0006Bi-E3 for help-gnu-emacs@gnu.org; Sat, 20 May 2017 18:43:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCD5e-0006LB-Bi for help-gnu-emacs@gnu.org; Sat, 20 May 2017 18:43:17 -0400 Original-Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]:35239) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCD5e-0006L5-5c for help-gnu-emacs@gnu.org; Sat, 20 May 2017 18:43:14 -0400 Original-Received: by mail-pf0-x230.google.com with SMTP id n23so54882193pfb.2 for ; Sat, 20 May 2017 15:43:14 -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=zNL9weRQCtP8GPrJyvghEf5Fa8hDzJLzFq2pHHKhMO0=; b=pKnSkbgr/CYcEC2h+iKunwVixq8d5T6IZ68DVXzwlg99nvIuAoSgdg61IwJhvYCfXG RK+X4jSlJhEeJPU9YVlUFTp3Zp+zUFbNSWegUkCHUIpZ+C28F+AD5CkaWw0QdEH8ahiH 4nPHnGBmICMj7vW/RxuQp5UCWXfyUjDuc8VdodlVJ66yItnyVxMa+v86h/WGMGwi6lkz VR+K1zGAWVzB7B1qZxqfZPZkNVWjl4qfj1kkqIjMpM+T8fGZvsrj5hRYcvLLyPXt+7+C lDxSF3vuTPvOogIfgkXYLPkOJQJTiVQgNQbcJdgUC0pOo7KvaArF3bZZ5BVxApk1fs57 j09Q== 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=zNL9weRQCtP8GPrJyvghEf5Fa8hDzJLzFq2pHHKhMO0=; b=poXUnQss/aeuwZYmkcuAVBZEvoXCqhtSPvPO9qS6ilLyWS0QHGI+5hpn27S4oA5e/6 6cYHADfdO1TqF5zq5W7/BFonis0Z2o3ZN80lQn0LUMKo8Y/J5O+OBzYl42Bl54dbwt8s kYhdQxIqwegKUEpoyBwmQos1fLv/PkiQ/iUKJlxdnm16ZAe2XNDdTjywETYJEXzokrQO 6re5/Y+WzwCrph2g5cwkXCbngEoQPfk0FyL2ihUkJxpMWmUYE14NdyId6KtWszxkVXBA /mWl4b+RyPkI/jnQ3fV0cDRmT74ofwCeIKzkK3QKejUIJ2uho2W7BpQYCZAbfHw6C+45 G1Gw== X-Gm-Message-State: AODbwcAlNyhi7ODzNhn5uTV0jMW2MmmaWtTLCn6EWMzNSVEcEk8g0iPd o4QSMc6N3AbQOPDFH9A= X-Received: by 10.98.18.157 with SMTP id 29mr17163236pfs.75.1495320192907; Sat, 20 May 2017 15:43:12 -0700 (PDT) Original-Received: from [192.168.24.54] (pl25298.ag0304.nttpc.ne.jp. [133.232.153.210]) by smtp.gmail.com with ESMTPSA id o66sm15643408pga.64.2017.05.20.15.43.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 May 2017 15:43:12 -0700 (PDT) X-Priority: 3 In-Reply-To: <38f43e30-eeb0-427a-a885-fbd30d0d0d97@default> 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::230 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:113092 Archived-At: Thank you Drew. Wouldn't it be something that people use frequently enough that is has = its own function in Emacs ? Jean-Christophe=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)))))