From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Universal/prefix argument for "other window" redirection? Date: Thu, 08 Apr 2021 21:18:25 -0700 Message-ID: <87pmz4jdke.fsf@ericabrahamsen.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5749"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 09 06:19:11 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 1lUibv-0001NB-Oe for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Apr 2021 06:19:11 +0200 Original-Received: from localhost ([::1]:41882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUibu-0002yJ-L9 for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Apr 2021 00:19:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUibO-0002XZ-24 for emacs-devel@gnu.org; Fri, 09 Apr 2021 00:18:38 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:36206 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUibM-00062T-AE for emacs-devel@gnu.org; Fri, 09 Apr 2021 00:18:37 -0400 Original-Received: from localhost (nat-out-5.ykwc.net [199.68.205.5]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id DEDDCFA086; Fri, 9 Apr 2021 04:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1617941908; bh=7XtIcN0UrzZ8WCNgm0Oi4vgICTs1wSJdKzep+tda6gs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=NeBOgRaho5ODhlN4BLdOt5xizE3ocqoeo481Xx9Orc5WI7PmTiO1JoZDoKFkjPY/H AROhCa+mVNcTjqJ5tkC5Ik3+8AyE1+SxevoWtdi1hzd0BQrAyishX3+wiEdMC2/eeA lf1R85tzsLIiNN8o5xbJzYs52iWXY8yx7SmGzAO4= In-Reply-To: (Arthur Miller's message of "Thu, 08 Apr 2021 18:11:23 +0200") Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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:267684 Archived-At: Arthur Miller writes: > Stefan Monnier writes: > >>> What I would like is to have all the cursor motion stuff, expression >>> evals etc, work on in other window so I don't need to switch back and >>> forth two buffers (I like to work with two buffers side-by-side). I >>> wonder if there 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 :))? >> >> OT1H you mention universal-prefix (which only affects the very next >> command) but OTOH you say "all the cursor motion stuff ...". >> >> For the "all the cursor ..." case, it seems you're saying all the >> commands should operate on the other window, which is exactly what you >> get after `C-x o`, so your description needs more details to know what >> you really mean. > > Haha, yes, I think I myself need more details to know what I mean :). > > I don't know myself what I really want. I find myself switching a lot > between two windows, which sometimes feels redundant. Maybe it is just > the shortcut, C-x o, or in my case C-v o. After playing with Gregory's > example, I am thinking of just binding the other-window to the `=C2=A7` k= ey. > Maybe that itself will be enough for somewhat "smoother" experience. I wrote a command that sends the cursor to another buffer window, and lets you do whatever you want in that window, until you hit "q" (this is a special-mode buffer so insertion isn't an issue), whereupon it pops you back to the original window. It uses a transient keymap to do that, which is yet another approach you could consider. https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/ebdb-mua.el?h=3Dexter= nals/ebdb#n1244