From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#70577: [PATCH] New command other-project-prefix Date: Mon, 06 May 2024 21:30:34 +0300 Organization: LINKOV.NET Message-ID: <86o79ieqt1.fsf@mail.linkov.net> 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26737"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 70577@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 06 20:32:02 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 1s4386-0006mA-1k for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 May 2024 20:32:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s437v-0001m6-Vs; Mon, 06 May 2024 14:31:52 -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 1s437i-0001WL-8U for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 14:31:39 -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 1s437h-0007BA-UI for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 14:31:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4386-0005WD-8d for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 14:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2024 18:32:02 +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.171502030221199 (code B ref 70577); Mon, 06 May 2024 18:32:02 +0000 Original-Received: (at 70577) by debbugs.gnu.org; 6 May 2024 18:31:42 +0000 Original-Received: from localhost ([127.0.0.1]:39523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s437m-0005Vq-7i for submit@debbugs.gnu.org; Mon, 06 May 2024 14:31:42 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:57753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s437k-0005Vi-6c for 70577@debbugs.gnu.org; Mon, 06 May 2024 14:31:41 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id F0917C0004; Mon, 6 May 2024 18:31:07 +0000 (UTC) In-Reply-To: <861q6esvhl.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 06 May 2024 20:25:42 +0300") X-GND-Sasl: juri@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:284599 Archived-At: >>> 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'. > 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. > > 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. Sorry, I didn't realize that implementation of other-project-prefix can be changed to read the project before reading the command with arguments: (defun other-project-prefix () (letrec ((root (funcall project-prompter)) (depth (minibuffer-depth)) (echofun (lambda () "[switch-project]")) (around-fun ...