From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#42210: Add -other-window variants of project-prefix-map commands Date: Sun, 05 Jul 2020 18:58:17 -0700 Message-ID: <87wo3hflqe.fsf@iris.silentflame.com> References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> <87k0zhv6kb.fsf@linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6497"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42210@debbugs.gnu.org, dgutov@yandex.ru To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 06 03:59:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jsGPZ-0001aH-2e for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jul 2020 03:59:13 +0200 Original-Received: from localhost ([::1]:56288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jsGPX-00070B-2f for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jul 2020 21:59:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsGPO-0006wf-8q for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 21:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jsGPO-0004nN-0R for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 21:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jsGPN-00042a-VO for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 21:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 01:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs Original-Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159400071015489 (code B ref 42210); Mon, 06 Jul 2020 01:59:01 +0000 Original-Received: (at 42210) by debbugs.gnu.org; 6 Jul 2020 01:58:30 +0000 Original-Received: from localhost ([127.0.0.1]:33189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsGOr-00041l-Lv for submit@debbugs.gnu.org; Sun, 05 Jul 2020 21:58:29 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsGOm-00041V-PG for 42210@debbugs.gnu.org; Sun, 05 Jul 2020 21:58:28 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 496175C00A9; Sun, 5 Jul 2020 21:58:19 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 05 Jul 2020 21:58:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=4IT3ubfEdrm80dnuTsuK0tTOuq YNb1OTmNhG1ivp8t0=; b=P/C9kn7cQkyzqXCTEntWxfcJBhU37Z1eqK3sjz1DHX otxC3/+A9+m9Yu11gYVQBo/rYQ/aD5apsZljyWE8y56LjSljoxRcXqLOIXvmSVTW Bv0MiT8c0LV4oeHIya55p1DZpPiX62CQa45IZA46ZdQ5PDc6tD9bx+0drooofqE0 g1SLcrbyZV72xSQ8lE5tQOjFvmq5/pjCaCBwniNMH1aEGD7oA+QyJ9yHAEiUAkUj 7ej6hsRhB8pWb0Z3yOS3ieV0FiWyBYGrwPZLiCxb6er7aWijmJdk1GjNzDcrQcT7 wdO7JpXa+7GmVyRvf7oNl1EbH8qitma1z2laKDt3TaeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=4IT3ub fEdrm80dnuTsuK0tTOuqYNb1OTmNhG1ivp8t0=; b=BCqtmlCoObLCqcLO7yM2PC E0iD7VYSf4pSdnTzsOThDU6Ct0K+dl+JilpAzGnDtSiqquK5MMgbYVambZTf++dE J/qEePB/ghonESW10dJM18GEmPgUNJQLUZU4q2Wmlz/ybDOoubAM7MzrcSKzp3tv 7zcHFCaEUaJOlOH4fBuyxLiYdnoTe9JuLydnaGYHA5uKk8GZI1Bpaucsl4GyPaz6 nFKuqsmrPtITrM8iK0N8iI2Q/fSZWL8xkng1J7KrC7E41/b2JP3W+DkfKzb+tU8Z 2zdAhiKfHPFWKZR0hQ/fVKljKvYn3qNBEKFlZyJR1eZjdqiURUEe5keouNM44ijQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefuvggrnhcuhghh ihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepgeetfffgtdeuveduveekteejuddugeevvdevheeggefhgeeifeef hfdtffevvdejnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhihht thhonhdrnhgrmhgv X-ME-Proxy: In-Reply-To: <87k0zhv6kb.fsf@linkov.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182762 Archived-At: Hello Juri, Thanks for taking a look. On Mon 06 Jul 2020 at 03:19AM +03, Juri Linkov wrote: >> Here is a patch implementing commands under C-x 4 p. If the approach is >> thought sound I can also prepare patches for C-x 5 p and C-x t p. >> >> I have tested the attached change except for the autoload cookies which >> I am not sure will work with my new macro. And I'm not sure I should be >> doing this with a macro instead of a function which calls fset -- please >> advise. > > Thanks for the patch. On emacs-devel you said that rather than add > definitions of project-find-file-other-window, etc. > display-buffer-override-next-command could be used. But there is no > display-buffer-override-next-command in your patch, and definitions of > project-find-file-other-window etc. are still added (with the help of macro). Yeah. After thinking about it a bit more I thought that this would be more consistent with both the way the other C-x 4 commands work and how the C-x p subcommands work -- i.e., it's just an ordinary keymap. Additionally, my approach means that the -other-window functions are available to be called from lisp, just as switch-to-buffer-other-window and find-file-other-window already are, which might be useful. >From my perspective, the use of define-other-window-command is sufficient to resolve my concerns (posted to emacs-devel) about having to define all the functions. And I think that the macro could be useful in user init files and maybe elsewhere. > Would it be possible to define the 'C-x 4 p' map the same way as > 'C-x p p' is defined? There is a patch in https://debbugs.gnu.org/41890#127 > to use the default project keymap 'C-x p' in 'C-x p p'. You could try to > use the same keymap in 'C-x 4 p', and wrap the command call with > display-buffer-override-next-command. I could give it a shot, but wouldn't it be less useful, since the -other-window functions would no longer be available to be called from lisp? As I say, I think the concerns about having to define the functions is resolved by define-other-window-command (or whatever it ends up called). Maybe you could explain why you think doing it like C-x p p would be better. Thanks again. -- Sean Whitton