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: Mon, 29 Apr 2024 00:40:00 +0300 Message-ID: <208c7a05-6cfe-40c2-af54-187967348686@gutov.dev> References: <86le501ykg.fsf@mail.linkov.net> <86jzkhe81b.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------mEOiBgdDWQVL9T0Tqp4wyU0z" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5443"; 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 Sun Apr 28 23:41:09 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 1s1CGh-0001Cl-FM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Apr 2024 23:41:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1CGL-000214-G1; Sun, 28 Apr 2024 17:40:45 -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 1s1CGI-00020e-GO for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2024 17:40:42 -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 1s1CGI-0008PJ-7m for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2024 17:40:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s1CGb-0002Oy-Pl for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2024 17:41: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: Sun, 28 Apr 2024 21:41: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.17143404329218 (code B ref 70577); Sun, 28 Apr 2024 21:41:01 +0000 Original-Received: (at 70577) by debbugs.gnu.org; 28 Apr 2024 21:40:32 +0000 Original-Received: from localhost ([127.0.0.1]:53032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1CG8-0002Oc-Be for submit@debbugs.gnu.org; Sun, 28 Apr 2024 17:40:32 -0400 Original-Received: from fout2-smtp.messagingengine.com ([103.168.172.145]:40631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1CG5-0002OU-24 for 70577@debbugs.gnu.org; Sun, 28 Apr 2024 17:40:31 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id F19651380228; Sun, 28 Apr 2024 17:40:03 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 28 Apr 2024 17:40:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc: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=1714340403; x=1714426803; bh=hicaaXjB5w TfyEUnIGSJw/ogEtlS9BRZp9hMskS3REE=; b=BJnsbYf9XVWra+8O/m7U1ioVsL +uLs1Q/JOoe4Z4HTEgpEvD422NxH6+UwNbwK3PwM3l3CRdL982+1HTRom5iOWCBq 5Ys+sB9CTH7f3VFv2QPY0pmupu3OprMxzmva57HP0kIh9NTQIQVlxFxUebOgY/0x xXUPJanCnuz/62YEJf/EDKps/WWcxurd2ZTRQdDCbwmt99JunmcsLLOdWnynUpF7 mgvMIv9u1/1irbKewCZWthV2r5EUHnIiXdg8Bizdm+8c6PaMo34CJJWhcWzkVJ8z KDSzF/jZEJrYKDmd4XuSKylNHWV34CO0YnfYrVgUCyFED9v3SW03gcJLMc1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=1714340403; x=1714426803; bh=hicaaXjB5wTfyEUnIGSJw/ogEtlS 9BRZp9hMskS3REE=; b=UWPEQtbJtybxl7QZg9L+8Ld1jKu5tBF2ROJeOF1qosgr msaA9c8TigwI/7iyU4NI3I/ezRaQgTrpycAGaTXwvCdvSji0fxhNP7Flpzx7nGSR qtRUD0pDiCa/BspMK9O5vDnwXGawIPDlAvJ0QAWdBNO5Q52l8b+RG9Djr/VKF0wh oaTyPskjiNkJOc8U68acCT8X479hRdaZzIynpU1KPjK/GJHKB9lLfTXjpR2UN1gw 2recJgHEMLLQNlBk15sYCJulgWADq28NSOMGfF4sDBc5bkI9j/5uE7xvSSdF/lH6 LDjGj5vMgiODacgKjGqc0LCgdvsr62QaqnBhgspUjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddthedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptgfkffggfgfuvfevfhfhjgesmhdtreertddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeelkeejiedvffdtgeejvdffffelueelkefhtdekjeehuefgteduheegfefhieek jeenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 28 Apr 2024 17:40:02 -0400 (EDT) Content-Language: en-US In-Reply-To: <86jzkhe81b.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:284110 Archived-At: This is a multi-part message in MIME format. --------------mEOiBgdDWQVL9T0Tqp4wyU0z Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 28/04/2024 19:51, Juri Linkov wrote: >> On 26/04/2024 13:59, Dmitry Gutov wrote: >>> On 26/04/2024 09:09, Juri Linkov wrote: >>>>> This is based on Juri's patch in >>>>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63648#161, but the idea is >>>>> more focused: to switch the order of events, and first read the full key >>>>> sequence, and then prompt for the project and the command >>>>> arguments. Like >>>>> we also discussed in the past. >>>> >>>> I'm not a fan of reading the full key sequence bypassing the event loop. >>> That's what the current code does. While the patch tries to change that. >> >> Sorry, I forgot to attach the actual patch. > > Thanks. > >> +(defun other-project-prefix () > > Something is wrong here. I bound 'other-project-prefix' to 'C-x p P'. > Then typing 'C-x p P C-x d' asked a directory name, then later > after selecting a project asked for the directory name again. Looks like that has to do with the interactive spec. See the attached next revision, it seems to behave better. > Then some advice remains unremoved. Ok, will test more. I haven't noticed this particular problem, so please write down a repro if you find one. --------------mEOiBgdDWQVL9T0Tqp4wyU0z Content-Type: text/x-patch; charset=UTF-8; name="other-project-prefix-v2.diff" Content-Disposition: attachment; filename="other-project-prefix-v2.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3Byb2plY3QuZWwgYi9saXNwL3Byb2dtb2Rl cy9wcm9qZWN0LmVsCmluZGV4IDAwMGEwNTgwNGE4Li5mZWIzMWNhYmE0ZCAxMDA2NDQKLS0t IGEvbGlzcC9wcm9nbW9kZXMvcHJvamVjdC5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy9wcm9q ZWN0LmVsCkBAIC05NTIsNiArOTUyLDQ3IEBAIHByb2plY3Qtb3RoZXItdGFiLWNvbW1hbmQK ICh3aGVuIChib3VuZC1hbmQtdHJ1ZS1wIHRhYi1wcmVmaXgtbWFwKQogICAoZGVmaW5lLWtl eSB0YWItcHJlZml4LW1hcCAicCIgIydwcm9qZWN0LW90aGVyLXRhYi1jb21tYW5kKSkKIAor Ozs7IyMjYXV0b2xvYWQKKyhkZWZ1biBvdGhlci1wcm9qZWN0LXByZWZpeCAoKQorICAiXCJT d2l0Y2hcIiB0byBhbm90aGVyIHByb2plY3QgYmVmb3JlIHJ1bm5pbmcgYW4gRW1hY3MgY29t bWFuZC4KK01ha2VzIHN1cmUgdGhlIG5leHQgY29tbWFuZCBpbnZva2VkIGFza3MgZm9yIHRo ZSBwcm9qZWN0IHRvIHJ1biBpdCBpbi4iCisgIChpbnRlcmFjdGl2ZSkKKyAgKHByZWZpeC1j b21tYW5kLXByZXNlcnZlLXN0YXRlKQorICAobGV0cmVjICgoZGVwdGggKG1pbmlidWZmZXIt ZGVwdGgpKQorICAgICAgICAgICAoZWNob2Z1biAobGFtYmRhICgpICJbc3dpdGNoLXByb2pl Y3RdIikpCisgICAgICAgICAgIChhcm91bmQtZnVuCisgICAgICAgICAgICAobGFtYmRhIChj b21tYW5kICZyZXN0IF9hcmdzKQorICAgICAgICAgICAgICAoaW50ZXJhY3RpdmUgIydpZ25v cmUpCisgICAgICAgICAgICAgIChhZHZpY2UtcmVtb3ZlIHRoaXMtY29tbWFuZCBhcm91bmQt ZnVuKQorICAgICAgICAgICAgICAodW5sZXNzIChvciAoZXEgdGhpcy1jb21tYW5kICdvdGhl ci1wcm9qZWN0LXByZWZpeCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKGVxIGxhc3Qt Y29tbWFuZC1ldmVudCBoZWxwLWNoYXIpKQorICAgICAgICAgICAgICAgIChsZXQgKChyb290 IChmdW5jYWxsIHByb2plY3QtcHJvbXB0ZXIpKSkKKyAgICAgICAgICAgICAgICAgIChpZiAo b3IgKHN0cmluZy1wcmVmaXgtcCAicHJvamVjdC0iCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHN5bWJvbC1uYW1lIHRoaXMtY29tbWFuZCkpCisgICAg ICAgICAgICAgICAgICAgICAgICAgIChnZXQgdGhpcy1jb21tYW5kICdwcm9qZWN0LWF3YXJl KSkKKyAgICAgICAgICAgICAgICAgICAgICAobGV0ICgocHJvamVjdC1jdXJyZW50LWRpcmVj dG9yeS1vdmVycmlkZSByb290KSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChjYWxsLWlu dGVyYWN0aXZlbHkgY29tbWFuZCkpCisgICAgICAgICAgICAgICAgICAgIChsZXQgKChkZWZh dWx0LWRpcmVjdG9yeSByb290KSkKKyAgICAgICAgICAgICAgICAgICAgICAoY2FsbC1pbnRl cmFjdGl2ZWx5IGNvbW1hbmQpKSkpKSkpCisgICAgICAgICAgIChwcmVmdW4KKyAgICAgICAg ICAgIChsYW1iZGEgKCkKKyAgICAgICAgICAgICAgKHVubGVzcyAoPiAobWluaWJ1ZmZlci1k ZXB0aCkgZGVwdGgpCisgICAgICAgICAgICAgICAgKHJlbW92ZS1ob29rICdwcmUtY29tbWFu ZC1ob29rIHByZWZ1bikKKyAgICAgICAgICAgICAgICAocmVtb3ZlLWhvb2sgJ3ByZWZpeC1j b21tYW5kLWVjaG8ta2V5c3Ryb2tlcy1mdW5jdGlvbnMgZWNob2Z1bikKKyAgICAgICAgICAg ICAgICAod2hlbiAoYW5kIHRoaXMtY29tbWFuZCAoc3ltYm9scCB0aGlzLWNvbW1hbmQpKQor ICAgICAgICAgICAgICAgICAgKGFkdmljZS1hZGQgdGhpcy1jb21tYW5kIDphcm91bmQgYXJv dW5kLWZ1bikpKSkpKQorICAgIChhZGQtaG9vayAncHJlLWNvbW1hbmQtaG9vayBwcmVmdW4p CisgICAgKGFkZC1ob29rICdwcmVmaXgtY29tbWFuZC1lY2hvLWtleXN0cm9rZXMtZnVuY3Rp b25zIGVjaG9mdW4pCisgICAgKGxldCAoKG1hcCAobWFrZS1zcGFyc2Uta2V5bWFwKSkpCisg ICAgICAoc2V0LWtleW1hcC1wYXJlbnQgbWFwIHByb2plY3QtcHJlZml4LW1hcCkKKyAgICAg IDs7IERvZXNuJ3Qgd29yayA7LSgKKyAgICAgIDs7IChkZWZpbmUta2V5IG1hcCAodmVjdG9y IGhlbHAtY2hhcikKKyAgICAgIDs7ICAgICAgICAgICAgIChsYW1iZGEgKCkgKGludGVyYWN0 aXZlKSAoaGVscC1mb3JtLXNob3cpKSkKKyAgICAgIChzZXQtdHJhbnNpZW50LW1hcCBtYXAp KQorICAgIChtZXNzYWdlIChjb25jYXQgIlR5cGUgIiAocHJvamVjdC0ta2V5bWFwLXByb21w dCkgIiBvciBhbnkgZ2xvYmFsIGtleSIpKSkpCisKKzs7IChkZWZpbmUta2V5IHByb2plY3Qt cHJlZml4LW1hcCAoa2JkICJQIikgIydvdGhlci1wcm9qZWN0LXByZWZpeCkKKwogKGRlY2xh cmUtZnVuY3Rpb24gZ3JlcC1yZWFkLWZpbGVzICJncmVwIikKIChkZWNsYXJlLWZ1bmN0aW9u IHhyZWYtLWZpbmQtaWdub3Jlcy1hcmd1bWVudHMgInhyZWYiKQogCg== --------------mEOiBgdDWQVL9T0Tqp4wyU0z--