From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Universal/prefix argument for "other window" redirection? Date: Thu, 08 Apr 2021 17:58:37 +0200 Message-ID: References: <9ff81b52facc50337ed6@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34132"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt) Cc: emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 08 17:59:48 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUX4N-0008m3-L7 for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Apr 2021 17:59:47 +0200 Original-Received: from localhost ([::1]:37770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUX4M-000390-Lf for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Apr 2021 11:59:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUX3O-0002Lg-Lu for emacs-devel@gnu.org; Thu, 08 Apr 2021 11:58:46 -0400 Original-Received: from mail-oln040092064107.outbound.protection.outlook.com ([40.92.64.107]:20592 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUX3K-0006Rh-TG for emacs-devel@gnu.org; Thu, 08 Apr 2021 11:58:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IVH3kCqK4iLtwYIIjwliA/7KwAMD2JOsqJWl86IdqEX5fnGID58TEL635UdSJUJZSaJfETM1/YfuyHba17xUNqAE7L3yaDT05izEIdY05vTUfu8N7J7xu4Q3VzW8GYlOU4w5L5q1mvXyd1P6l1reQR1UrUUQIfetgH/3l4G6xOGpLuoebNk5UViAQ1lH5uv2dnZ2zvjWAY6XVPMGujy+DAoVQrsfvJMdbakuBOwTJWMhNgntuaNj+v+Zn/Snnj1oq3XiKdvzLR5ljVnT3ypSUaOJV5jX9tRxlRugKUiJ5Lj+tX/565HogK7v7bm2TAiuLXC9MA3UEShub02laWDecA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EckT0PJlb6ePZtB82/xcYB2mj2hk4qH+/t6WbtdvdwM=; b=UR/wmL6qqc2doaibA5GuV4eE+D233Of7KE5CYKaoUOayWCc70ukdE/cvV0TJuUfZqE0bVIaj3dO5yHbO4OexviWf8xqiv83HgdnM75NP3XZx7flOOCxTsQSd8vAqxUUUTLZ9GPlZo71o9I9q0w77PQdihig5yrXiEQ+TMmJAcKrfoIMtrKDh3r59h5hksY80C1Pl7ExoLmCMz0RTMvFyQBshELh04Non53gn1nKe8vGrqBnQoyKLJTvGxSKwbYk4eoEm3eCzDfbWL4Sw5dC0CmpZzzsD9qiF8ciUFr0V/A/enhLQcDIgUmyM7JWj6hvsVA+wwh/MdlRFgGg+RUAdag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EckT0PJlb6ePZtB82/xcYB2mj2hk4qH+/t6WbtdvdwM=; b=j2IhUF3SUUnzaUuk0k4l+902CvcZucCL3GbpJq9vzFN04SbmPs3fuz4N914yOscqBtfCeL4X7987SaqmGhgTeyCVr4wtBjOfj9/VnufcqZlz52/7fOTn1FemQOFq8+gPnPytyQ860koHJBNzveCthCw3/noxbMo5dCO4gtDWmbNDnGK0MrmRnPbsI5iduAbZ/hDKH3HvlZCwotU8IjrXgjpb8ZzrFyFhLQXJUPT4ORx6Q0ZcO/xrr6KniqMwEkQKJEJtZa4V/VKLdwz6+CY8tTeGScvoEcZa0fpSLG797Yu/K9J9qy6jOXeY6X84RMxzg6cF80gTAdaMYeUcI4FLpg== Original-Received: from VE1EUR01FT010.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::43) by VE1EUR01HT104.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::377) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17; Thu, 8 Apr 2021 15:58:40 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e19::52) by VE1EUR01FT010.mail.protection.outlook.com (2a01:111:e400:7e19::83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Thu, 8 Apr 2021 15:58:40 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:80D17F8242E1D4DCACEFECE72A70CB848378287693F927F96EA9F59338CC5C4B; UpperCasedChecksum:A206D959AFD4BBC58E79A1F308D8DCFED8C2904692B571E29161577DB5387B51; SizeAsReceived:7702; Count:47 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b%6]) with mapi id 15.20.4020.017; Thu, 8 Apr 2021 15:58:39 +0000 In-Reply-To: <9ff81b52facc50337ed6@heytings.org> (Gregory Heytings's message of "Thu, 08 Apr 2021 12:16:57 +0000") X-TMN: [hNRbon4yOWFTVyTduwBvhpevEKwusqQL] X-ClientProxiedBy: AM5PR0101CA0015.eurprd01.prod.exchangelabs.com (2603:10a6:206:16::28) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <821rbk7ope.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from HP-Laptop.homepc (81.232.177.30) by AM5PR0101CA0015.eurprd01.prod.exchangelabs.com (2603:10a6:206:16::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Thu, 8 Apr 2021 15:58:39 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 77d6c63c-dd09-47ea-f625-08d8faa72d04 X-MS-TrafficTypeDiagnostic: VE1EUR01HT104: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RGhuwTT7hS5fMmEpf6rEDDg88eKtmuxKnIbUdhbvmoKSF4MykxbeX7hSm5n1TQpr2HB0CU+x3St0uayDOtzw/vJ9E3uGYsISaymyFcEWl0rBG+ElvFce4u8DNS0PWVm10BayFFwb3RHuim0rW5CiAi5GFYAkPmf9/L+Ep4BbnY/K0kSJLpo2hoVTGXlY/xhgNdm50vUbnAZBrUyjUYwmqYxN49wzXbiy3Rh5VmEIEfeYYDSkXdRTljJEI8iAMpvrNRcx5krrPzpridzfAzOfGHir4JMJE/Tbhu3FhQN3NcdraTHv/LDEPXw6l+6h2vYrwh4djgoIY9sPysZ4ucDU2n5klFIP81GQQmWKMnya0dtNiFwkSaLT8Rn6e36XWzHG2Qo4rJ+sIjNTTPCqHrKcLA== X-MS-Exchange-AntiSpam-MessageData: C71icWyPLTzmeEE8Sblq97cLmR8+sd68Ro7NvmtMk0xNbGDVNxcXJHRceZtqMy4kRtZvI88JljBFjq1lc7cCRlug/GtJj7Ej/JIXfCe4UjdewCzPXrqvENyHdyMvwfWpu/1x7pR6sy7Ot5dElR4zcg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77d6c63c-dd09-47ea-f625-08d8faa72d04 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2021 15:58:39.9247 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: VE1EUR01FT010.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT104 Received-SPF: pass client-ip=40.92.64.107; envelope-from=arthur.miller@live.com; helo=EUR01-DB5-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267628 Archived-At: Gregory Heytings writes: >> >> Is there already a way to "automatically" modify interactive commands to >> "auto-work" in other window instead of current window? >> >> I know I can scroll other window already and switch to some buffer in an= other >> window with `switch-to-buffer-another-window`, I already use them. >> >> What I would like is to have all the cursor motion stuff, expression eva= ls >> etc, work on in other window so I don't need to switch back and forth tw= o >> buffers (I like to work with two buffers side-by-side). I wonder if ther= e is >> already something I could use; prefix command/universal prefix whatever,= to >> autmoatically modify behaviour of interactive commands involved or do I = have >> to write my own (if it's possible :))? >> > > (defun next-command-in-other-window () > (interactive) > (let ((key (read-key-sequence nil))) > (let ((window (other-window-for-scrolling))) > (with-selected-window window > (execute-kbd-macro key))))) ha! It was that simple :-). I had something else in mind, but good I didn't wrote anything. Seems to work very fine with some commands; not so good with others. For example motion commands like forward char, word, line etc, seems to work very good. C-x C-f does not work at all (for me it is helm-find-files). I know there is C-x 4 C-f I have put it on `=A7` as a shortcut and tested for a while today. I am not sure if like my idea :). For "one-timers" quick commands it saves switching to original buffer and feels overal lighter than switching to other window and back. But some things felt slightly confusing since I don't see the cursor, like evaling last expression.=20 Cool anyway, thanks!