From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#70577: [PATCH] New command other-project-prefix Date: Tue, 7 May 2024 22:16:40 +0300 Message-ID: References: <86le501ykg.fsf@mail.linkov.net> <86jzkhe81b.fsf@mail.linkov.net> <208c7a05-6cfe-40c2-af54-187967348686@gutov.dev> <86le4tz88d.fsf@mail.linkov.net> <865xvsjklh.fsf@mail.linkov.net> <861q6esvhl.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22699"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 70577@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 07 21:18:05 2024 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 1s4QKB-0005ar-0s for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 May 2024 21:18:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4QJq-0000nL-Ce; Tue, 07 May 2024 15:17:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4QJm-0000hl-0O for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 15:17:38 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4QJl-0004jP-HV for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 15:17:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4QK9-0002ax-Sb for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 15:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 May 2024 19:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70577 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70577-submit@debbugs.gnu.org id=B70577.17151094389953 (code B ref 70577); Tue, 07 May 2024 19:18:01 +0000 Original-Received: (at 70577) by debbugs.gnu.org; 7 May 2024 19:17:18 +0000 Original-Received: from localhost ([127.0.0.1]:44231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4QJR-0002aT-G4 for submit@debbugs.gnu.org; Tue, 07 May 2024 15:17:17 -0400 Original-Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]:51145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4QJO-0002aN-Sd for 70577@debbugs.gnu.org; Tue, 07 May 2024 15:17:16 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id E2B521C000BD; Tue, 7 May 2024 15:16:43 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 07 May 2024 15:16:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1715109403; x=1715195803; bh=q0nVj95Jkfr21f2WVMc/qj+Na8rxdypus3+1voZW5o8=; b= Wg6EjMUD9yUZtF31025kjk5xHf+06YvLnqjjFr6rfGvlKjahkT2jZ8sZIJJnc9dn Vz96ZfpPWq+dq0qpSkyCKoxCYt+3BBPfzFAgm7Fw7DuE8jDEovWllOyjLQDM0FYJ CTgD7woG2S1PFzsDGQGhIWSdiGRN1+ezi2/i+korNlTxW/CU7y2HwvuMiGjFy8Dc P8cqrrCnaeG0W2B54Q0ZIU7mfhgP2wjAz5kmmMhyM99VUPiWB2eyB1qxXFtzzmHA g/pwt90owHmh+iAWnEUBaa6pXP1aaWDDfy2RWKWFupiZ14SsZeGpZrYaDNZtzk0+ cATNwsBAst+v48K835mlKQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1715109403; x= 1715195803; bh=q0nVj95Jkfr21f2WVMc/qj+Na8rxdypus3+1voZW5o8=; b=c 6rG/SGRYQkUxZI7aQORNhh7f3FToplhHkviW5Z5frVDJtvBO8VTy2K4U6SfyQ2vj QNNOvquXEVC1vFza//IO09gGpw8hQ+Q0j82XP34elV3QHklZDxfOsWPqew9z3WBb cfyQxlEnKggTWONnvv7unjQZMCjWwWlm0mBoQ5bXBvfTzfylU6alXVMdW8+HoR2w vqju3X/Lz2+kqOAP3o3OaTJwNGrHApCrW0JdghF3H2UvFNB7hIVMm+UTPx3KvGaY fcoLOv2M/YlJHX8o4IA9g6kTPfnZ2XnOZWTS5uk+Y3Js8H9B4aNqu688XE712Jnc ElzuLzEFLBZPBtLDZdIIw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvkedgudefvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveeg udejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 May 2024 15:16:42 -0400 (EDT) Content-Language: en-US In-Reply-To: <861q6esvhl.fsf@mail.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284654 Archived-At: On 06/05/2024 20:25, Juri Linkov wrote: >>> Wow, everything works now, will test more as a primary 'C-x p p' command. >> >> Thanks, let me know if you find any other problems. > > I confirm that everything works nicely, thanks. The only > problem is that after trying to use it, its order looks unnatural. > I already accustomed to this order: 1) select the project, > 2) run the command. This is handy especially with > project-switch-commands set to 'project-prefix-or-any-command'. Could be a problem indeed, but only if we are aiming at changing the default. We're probably not going to do that, or at least not right away. > This order looks more logical because after selecting the > project, the user mentally switches to another project, and > then types a command with arguments in the switched project. > However, the reverse order of typing a command keys > before switching the project looks like trying > to run the command in the previous project. > Also the problem is that typing a command keys and reading > the command arguments is separated by reading a project. My advantage (maybe?) is that I don't use the "switch project" command very often. But when I do and I think about it, it kinds of seem to stick out compared to some other commands, in particular "prefix" ones, that you have two separate key sequences which you need to input, instead of just one longer one. That's where my main motivation for this patch comes (the other being that 'C-h' works with it). Speaking of the implementation strategy, though, I think the current other-project-prefix implementation still doesn't work well together with project-other-*-command. I.e. I'd expect 'C-x p P C-x 4 p f' to function as "find file in different project", but it both interrupts the key sequence before the last char (with a prompt), and ultimately fails to switch to that different project. > Maybe many users would prefer other-project-prefix, I don't know. > But other-project-prefix can't replace project-switch-project, > only to be an alternative. I think we could add the new command, and then revisit the question of defaults in 1-2 years. I guess the main difficulty is documenting all the new alternatives added in Emacs 30 adequately, so the user can make a confident choice which one to use.