From unknown Sat Aug 16 11:41:30 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#67171 <67171@debbugs.gnu.org> To: bug#67171 <67171@debbugs.gnu.org> Subject: Status: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Reply-To: bug#67171 <67171@debbugs.gnu.org> Date: Sat, 16 Aug 2025 18:41:30 +0000 retitle 67171 30.0.50; (At least) some VC commands fail with project-prefix= -or-any-command reassign 67171 emacs submitter 67171 Sean Whitton severity 67171 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 14 08:13:59 2023 Received: (at submit) by debbugs.gnu.org; 14 Nov 2023 13:13:59 +0000 Received: from localhost ([127.0.0.1]:60339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2tEs-0003x0-Oo for submit@debbugs.gnu.org; Tue, 14 Nov 2023 08:13:59 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2tEq-0003wn-QN for submit@debbugs.gnu.org; Tue, 14 Nov 2023 08:13:57 -0500 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 1r2tE5-0004gO-8o for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 08:13:09 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2tE3-0007Lp-Cc for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 08:13:09 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7D52D5C024A for ; Tue, 14 Nov 2023 08:13:05 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 14 Nov 2023 08:13:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1699967585; x=1700053985; bh=t0e3WRVlJvyzbEdj1895O0L6x 9cjldtBKDOl5VRlfXQ=; b=X3kC0HSF2nKOGjwuouD++xCuFmFBuAMgfJmIu1BWl GFy+vG+rY0Zk93EGLj56BNqQSHQnvFOfew4mZOqITDjWWwOQ3I/NoFIlcBzrBpgo 2+GdDSfTO1L4SWkcX0r8k4qv3am2ND4mkDNFQfT45V9/E+mJH/TXLfsP2vXGpCPI pPjZJNcsx07KOu7EwGAPND+dURSCs1Vc05O97ToQfEdgQr89aXgTFDr4NaWwWxnv E1otK1cLtA6w92dAdSTxQFKwJMlR7iDvKmMoX28xQR9H5l1w2HhmHJygfFr+uQmh t6TZZ1oMSDXOpASVQ5d3TS0lqNL2yvZaqMS4ifbumajGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1699967585; x=1700053985; bh=t0e3WRVlJvyzbEdj1895O0L6x9cjldtBKDO l5VRlfXQ=; b=KKAJUrUDeHdBPIdwg6ZaBC5NSvFmDsqbAyxB3bGXBlwUCf8EQxl MtrXPHDD+rJqBhXZUR7BRV8uu1ZUk1VF31Ds0fMxczI07QuDIjOtM9j/dwk3lzWW lPY0fobfczhEON0raVhGMp7YpqJhpuew60htS5oujxEbOs25IvjLQ6oM6piXDvgF /UpYBEbhHFQB72ejt82MhDx7EGtit9sNm7qTYc4hbYIGtSyDBd9cKKcs/qaJOWfF lA3Z5WQcYuBuRWeyNB0yL2YM6Y3Bo9FzePUoKPwcTWXScCwW1ZquuigWQ+s3dyLU x11W+W44BXjjkg2p1N4vCmr3p9dcNxm7uzQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudefvddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkfgggtgesthdttddttd ertdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhp fihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeffgfehgefggfehuedvte fhkedutdfggfdtueekgeektdetffdtgefhvdfgtdejleenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhith htohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 14 Nov 2023 08:13:05 -0500 (EST) Received: by melete.silentflame.com (Postfix, from userid 1000) id 3C4CD7E00FF; Tue, 14 Nov 2023 13:13:04 +0000 (GMT) From: Sean Whitton To: bug-gnu-emacs@gnu.org Subject: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Date: Tue, 14 Nov 2023 13:13:04 +0000 Message-ID: <87y1f0cwbj.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=66.111.4.27; envelope-from=spwhitton@spwhitton.name; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) X-debbugs-cc: dmitry@gutov.dev, juri@linkov.net, sbaugh@catern.com Hello, 1. cd /home/spwhitton/src/some-project && emacs -q 2. (setopt project-switch-commands #'project-prefix-or-any-command) 3. (project-remember-project (project-current nil "/home/spwhitton/src/emacs/trunk/)) 4. C-x p p /home/spwhitton/src/emacs/trunk RET C-x v L VC prints the log of /home/spwhitton/some-project, not that of /home/spwhitton/src/emacs/trunk. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 19 21:18:05 2023 Received: (at 67171) by debbugs.gnu.org; 20 Nov 2023 02:18:05 +0000 Received: from localhost ([127.0.0.1]:52309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4trR-0006kR-H8 for submit@debbugs.gnu.org; Sun, 19 Nov 2023 21:18:05 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:40823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4trM-0006jp-4h for 67171@debbugs.gnu.org; Sun, 19 Nov 2023 21:18:03 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 33CF33200955; Sun, 19 Nov 2023 21:17:52 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 19 Nov 2023 21:17:52 -0500 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:sender:subject:subject:to:to; s=fm2; t= 1700446671; x=1700533071; bh=uW7I2kJKB5EGC6/klc3fqF9h8QJyvdq1+7L OLaTAEok=; b=UrJ3dsTdtccTf9PZBiJdXyTYwhNMrjK2CFK5Fcj9SUXZBhFjvTk g0E2RKkkNlsRLwERrZqx7i5JVIbCQmO5VxX0ePIvIjABCYrJwOFuFTz6qYYnFmtj m6lP8Tl0+mvj8cQGND03dhrMaKGMdjbKF/bsFDvQozYTmjykUhy88pvcrvc80psE a8essdG+xyr8U0ao2IIna4Lv8UPJVw3JifEYctXm+kN7kgsVv4fjInar/LCK/8PB 31Bm28wk8+s9VaeTiioLkmvo6Ty9yu8jItRfpBAvjy00lLpiZ51j0RxvWbw7m+i3 GplThiwjyeiz8Q4x3I7giUqqwfwzcrN6HnQ== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700446671; x=1700533071; bh=uW7I2kJKB5EGC6/klc3fqF9h8QJyvdq1+7L OLaTAEok=; b=QVJq6L/Yc/JhunOTpVlGHr8+Qu0XjwlQGiGKN6fOEJqjPqLxftq 8KkL5LSaobUj30ym/mQhMocmBhe5RJVuDWGDuQfsRbURafjzPD/e3hUK8tTvI3JR o1BXYDMdYsM+WRbP5JBU0j/8Yc4NeDIp4cTuZY3/mr6HsmzVuCDb/pWiUpLO+H3U cmNTN5OWK/EVV1FCG5QOHeCyjOiktV1U2VSbqeteTspbjYMqRp9wpBLO7MIctoVS aqB4sR929kVaevLZVhF1uocu5Awtr7WR8QLYWyugZEAve8KmEKnH7jQ15xHe0d6O mCLtQ80GgOM6VhxzKYLiU3YsK0f+XN1461w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeghedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Nov 2023 21:17:50 -0500 (EST) Message-ID: Date: Mon, 20 Nov 2023 04:17:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Sean Whitton , 67171@debbugs.gnu.org References: <87y1f0cwbj.fsf@melete.silentflame.com> From: Dmitry Gutov In-Reply-To: <87y1f0cwbj.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: sbaugh@catern.com, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) Hi! On 14/11/2023 15:13, Sean Whitton wrote: > X-debbugs-cc: dmitry@gutov.dev, juri@linkov.net, sbaugh@catern.com > > Hello, > > 1. cd /home/spwhitton/src/some-project && emacs -q > 2. (setopt project-switch-commands #'project-prefix-or-any-command) > 3. (project-remember-project (project-current nil "/home/spwhitton/src/emacs/trunk/)) > 4. C-x p p /home/spwhitton/src/emacs/trunk RET C-x v L > > VC prints the log of /home/spwhitton/some-project, not that of /home/spwhitton/src/emacs/trunk. I'm having difficulty reproducing this. On step 4, I'm asked for the project root (because *scratch* doesn't have a current VC backend), but the input defaults to the directory chosen in steps 3 and 4. And if I open a file-visiting buffer first, then the prompt is skipped, and I do see the log of the other project. Not the one used in step 1. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 10:21:53 2023 Received: (at 67171) by debbugs.gnu.org; 23 Nov 2023 15:21:53 +0000 Received: from localhost ([127.0.0.1]:34677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6BWa-0002Vu-M8 for submit@debbugs.gnu.org; Thu, 23 Nov 2023 10:21:53 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:44947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6BWY-0002Vg-7m for 67171@debbugs.gnu.org; Thu, 23 Nov 2023 10:21:51 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1DB485C0101; Thu, 23 Nov 2023 10:21:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 23 Nov 2023 10:21:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1700752900; x= 1700839300; bh=9kqxWd+7hmRtCWW6XUtyjavrsq2Rvj+oSjAe3gXFpT4=; b=z BbIZLE082fCx2+W4rutT2k73IKI2VwW6gFqeXg3MsRSZnI+gFONiX1xK5fyyL/VP 2D98sKGHzXPGSrNU7ns4rehEbQp7HFiL3pHc3MSTwcx8nvSPGbQXuLv4KwROVKAh z1xkWeMx65rQtSK8LpGNanH/mROhj0p4mtcQ/2xMAy8TXhX5QPc3nEFLGXX4PgEf Mg84jp5mkIZ5nyLHFErPaAMHppnKelWgta7GyZHsJt3bPqvtiQoTLPxQcYV6r7ZZ XWsA8LMBLpu6tPuN4jR7spZWji8NMJRVqyD3K9JrQbDGVBi1a3kV9Q2lHdHXB0NU rCLAZWCiRRU26DVnQbBcQ== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1700752900; x=1700839300; bh=9kqxWd+7hmRtC WW6XUtyjavrsq2Rvj+oSjAe3gXFpT4=; b=piD2qoLSVxylglH/dhbB3d/wv3U5L wiB0Elbg/dIzH+gMXxede0PWD1GRrdo7KXkorcxVnRKrBAMkvTtwkaaeOF0r1Vj/ WCd2JDH7nUi0NtIg7ocsQ9gveqjmy3fUSxJaU1v6BVqYdfNlGZPaptXQYULVlVRT gKz6R/mWBMA9BZA7mga0UG/NqTDKVVCvooVmFRcdRSxXassHZEHeNYA74Qf4/SUa BwvXmwzsemTRJ02hYKpP4FDdvhKcCtewNBnjRhz7K45AthOp5kIaKE3gDDkDfiuX yIWywNIaKi058RiQCrRtx7E8UKtQmDNYI+Jkc+PBvUg04A+NzMyqRzIgw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehfedgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffffkfgggtgesthdttddttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpeeutdffheegleehffehgfejjeeivedtheeuuedujeeukefg keeljeegudeuieejveenucffohhmrghinhepvghlrdhimhenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhi thhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 10:21:39 -0500 (EST) Received: by melete.silentflame.com (Postfix, from userid 1000) id 177CF7EB49B; Thu, 23 Nov 2023 15:21:37 +0000 (GMT) From: Sean Whitton To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: (Dmitry Gutov's message of "Mon, 20 Nov 2023 04:17:47 +0200") References: <87y1f0cwbj.fsf@melete.silentflame.com> Date: Thu, 23 Nov 2023 15:21:37 +0000 Message-ID: <87a5r4bim6.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, On Mon 20 Nov 2023 at 04:17am +02, Dmitry Gutov wrote: > Hi! > > On 14/11/2023 15:13, Sean Whitton wrote: >> X-debbugs-cc: dmitry@gutov.dev, juri@linkov.net, sbaugh@catern.com >> Hello, >> 1. cd /home/spwhitton/src/some-project && emacs -q >> 2. (setopt project-switch-commands #'project-prefix-or-any-command) >> 3. (project-remember-project (project-current nil "/home/spwhitton/src/emacs/trunk/)) >> 4. C-x p p /home/spwhitton/src/emacs/trunk RET C-x v L >> VC prints the log of /home/spwhitton/some-project, not that of >> /home/spwhitton/src/emacs/trunk. > > I'm having difficulty reproducing this. Hmm. I can't reproduce it with 'emacs -q', but I can still reproduce with my init.el. I'm not sure whether something changed or whether I was wrong before. > On step 4, I'm asked for the project root (because *scratch* doesn't > have a current VC backend), but the input defaults to the directory > chosen in steps 3 and 4. And if I open a file-visiting buffer first, > then the prompt is skipped, [...] If I select *Messages*, which has a default-directory of "~/", then 'C-x p p RET ~/src/emacs/trunk RET C-x v L' prompts me for a directory, but the default value is "~/". Before I start bisecting my init, does anything else occur to you? As an aside, it doesn't seem good that whether or not step four prompts you for a directory depends on whether the current buffer happens to be visiting a file or not. Can we improve that, or is it inherent to the design of the new feature? Thanks. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 12:21:44 2023 Received: (at 67171) by debbugs.gnu.org; 23 Nov 2023 17:21:44 +0000 Received: from localhost ([127.0.0.1]:35036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6DOa-0000UE-EN for submit@debbugs.gnu.org; Thu, 23 Nov 2023 12:21:44 -0500 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:46291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6DOY-0000U0-8B for 67171@debbugs.gnu.org; Thu, 23 Nov 2023 12:21:43 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 26FFD240002; Thu, 23 Nov 2023 17:21:29 +0000 (UTC) From: Juri Linkov To: Sean Whitton Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: <87a5r4bim6.fsf@melete.silentflame.com> (Sean Whitton's message of "Thu, 23 Nov 2023 15:21:37 +0000") Organization: LINKOV.NET References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> Date: Thu, 23 Nov 2023 19:20:22 +0200 Message-ID: <867cm8z8rt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: Dmitry Gutov , sbaugh@catern.com, 67171@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > As an aside, it doesn't seem good that whether or not step four prompts > you for a directory depends on whether the current buffer happens to be > visiting a file or not. Can we improve that, or is it inherent to the > design of the new feature? This was improved recently in bug#67145, so now you can set 'vc-deduce-backend-nonvc-modes' to nil to avoid this prompt. I'm not sure if nil should be the default value. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 17:21:43 2023 Received: (at 67171) by debbugs.gnu.org; 23 Nov 2023 22:21:43 +0000 Received: from localhost ([127.0.0.1]:35301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6I4t-0002Oa-G1 for submit@debbugs.gnu.org; Thu, 23 Nov 2023 17:21:43 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:45061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6I4r-0002ON-Eo for 67171@debbugs.gnu.org; Thu, 23 Nov 2023 17:21:42 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id DE8B65C00C4; Thu, 23 Nov 2023 17:21:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 23 Nov 2023 17:21:31 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1700778091; x=1700864491; bh=Uy/2tG5RleBw2yq6iCRSDRnfP4Z+Xu1Ue/o zCb47+mE=; b=iyMISRxT83eQlgW/soVfoVmgKThSwYPfk2p44sV8qLJ0Rq6Kuem Tor/DYtsRlyqskCogqPGsa9fbYfn2dFgz7jFzy+Gn+8z68/ri3swGi647MSkyvVj DrLcY09FFVD5cx8JCVfpwqN0Kaujdh3qePaY3VVO9AXZcOyUKIgrUgVhvPmRhse1 y9uuBNx/m0YUA6Er2MxZb/vhfYhRDzlWOVOmiYYT495f8gdOPOCF4zpE1wFggwh2 AdilCjFyMGwTINOQVn8GsyVGMLb+azMK99wFq5RU1q0IRUs6AUesGNlFkblecA4A cacRdZGXJUI1083IE/tozVYtW8MpdlSL7wg== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700778091; x=1700864491; bh=Uy/2tG5RleBw2yq6iCRSDRnfP4Z+Xu1Ue/o zCb47+mE=; b=Iv2Q3zsWKOaNGVPgHotfMPCBjDpxTe7IrQ8bvHoIN8WLA7zHQoq S6ELdbmVXYmuNb99tCfNrfTujCPdUaWsMoG3shLZtl32DK2tzg7dUa6aoQnbdSEP zPAr+hlwA3IToJxTlsw1Rv1TjpyGNPESBy32R/+n4GXtfL3XZ63QjjjYAhwYTR7M eFXW8U1UFP+h0nlkKXnq2Uz8a6yrT8kM5vDjzMHkSg8Rn4WlQ7T6Gu9xB1Qbr5tH /MCsp+K2z49SePYiCInjz6OA3/2D8Ax59M12VE+4z2aFO6qrORxEmAcZZ72XO4FD gEOL9E/VaINVvkxBpgGWqZEfMQdtbiszDkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehfedgudehkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 17:21:30 -0500 (EST) Message-ID: <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> Date: Fri, 24 Nov 2023 00:21:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Juri Linkov , Sean Whitton References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> <867cm8z8rt.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <867cm8z8rt.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 23/11/2023 19:20, Juri Linkov wrote: >> As an aside, it doesn't seem good that whether or not step four prompts >> you for a directory depends on whether the current buffer happens to be >> visiting a file or not. Can we improve that, or is it inherent to the >> design of the new feature? > This was improved recently in bug#67145, so now you can set > 'vc-deduce-backend-nonvc-modes' to nil to avoid this prompt. > I'm not sure if nil should be the default value. I wonder if the "deduce in all modes" value should be t rather than nil. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 17:30:57 2023 Received: (at 67171) by debbugs.gnu.org; 23 Nov 2023 22:30:57 +0000 Received: from localhost ([127.0.0.1]:35320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6IDp-0002eN-6C for submit@debbugs.gnu.org; Thu, 23 Nov 2023 17:30:57 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:35781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6IDn-0002e8-Dx for 67171@debbugs.gnu.org; Thu, 23 Nov 2023 17:30:56 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2DD095C00E1; Thu, 23 Nov 2023 17:30:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 23 Nov 2023 17:30:46 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1700778646; x=1700865046; bh=dB0WPialitYquYH/XfXmbRSC6PNkyVN2s2x +TU44B5c=; b=Nv2D25YDMpGFO0pDMShhEnJaZAYmXMsgiQKCLBTTiQaYx7NwpxU hhL6kDsZu+SpaQhIGUJdoCou/yi6ZUjW9hon+WNl0Dk9Feo3JEodr/YDYt0ChPQz FGPGYZPDqDZH2bdGQM3eYjVLBNZBzdfUVAOCZ2LzuPiACB5jmQgEw0zb+2u1VwJl LBcPXnYh822XmKhwydKxao51C585963sjPtpa0nIJUUXw7bcqBCyG9lnpd7l+G7a Tv/wf9hIgKjsIXS5Mgn2YiIg8Nltr6AoUERKlxGugDv4rKAqvAXxktou+kTzPTm+ 26lU/TS/hqVdHFIT6pE91ZSQRAD+egkMdKg== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700778646; x=1700865046; bh=dB0WPialitYquYH/XfXmbRSC6PNkyVN2s2x +TU44B5c=; b=G7zfFY/OkL+wND6Xm7yp6X5W0lgcOucRnsb8VpBGKimWf4UMYAg ODl9ZkUjTiQxJ5SCEIa/rY7EfFe0Up5NkppD25GecTBmN7QDslI3KQ3l6bbjS0ZC SITQNVw94Uu+2kIopQ/f2xWwNQ3brAZCTuOt8zrCD0hRxSOxUkmmfjpYykyUuBb2 twt79FNII2IS/y/mi+cYgHX4C2hQ7RYy6UnKU6eOwPVm4j9yKj2sCakanwTfMIb9 ybFSaSwFmhdu1F+PRxLu9tZDAb16c6vky8Nc2gKINTO5wN9LoCIWozHQFL6QISRx IuyTwfLBbIgWXWyefgRPFF7Q5FwBQIa/6NQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehfedgudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeduudeujeeiteevkefftdejleehieetveeutddtudejieefvdfgteetfefh ffdugeenucffohhmrghinhepvghlrdhimhenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 17:30:44 -0500 (EST) Message-ID: Date: Fri, 24 Nov 2023 00:30:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Sean Whitton References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> From: Dmitry Gutov In-Reply-To: <87a5r4bim6.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 23/11/2023 17:21, Sean Whitton wrote: >> On 14/11/2023 15:13, Sean Whitton wrote: >>> X-debbugs-cc: dmitry@gutov.dev, juri@linkov.net, sbaugh@catern.com >>> Hello, >>> 1. cd /home/spwhitton/src/some-project && emacs -q >>> 2. (setopt project-switch-commands #'project-prefix-or-any-command) >>> 3. (project-remember-project (project-current nil "/home/spwhitton/src/emacs/trunk/)) >>> 4. C-x p p /home/spwhitton/src/emacs/trunk RET C-x v L >>> VC prints the log of /home/spwhitton/some-project, not that of >>> /home/spwhitton/src/emacs/trunk. >> >> I'm having difficulty reproducing this. > > Hmm. I can't reproduce it with 'emacs -q', but I can still reproduce > with my init.el. I'm not sure whether something changed or whether I > was wrong before. > >> On step 4, I'm asked for the project root (because *scratch* doesn't >> have a current VC backend), but the input defaults to the directory >> chosen in steps 3 and 4. And if I open a file-visiting buffer first, >> then the prompt is skipped, [...] > > If I select *Messages*, which has a default-directory of "~/", then > 'C-x p p RET ~/src/emacs/trunk RET C-x v L' prompts me for a directory, > but the default value is "~/". Before I start bisecting my init, does > anything else occur to you? That's the thing: I've tried a few different things which could have helped reproduce this, but they didn't. > As an aside, it doesn't seem good that whether or not step four prompts > you for a directory depends on whether the current buffer happens to be > visiting a file or not. Can we improve that, or is it inherent to the > design of the new feature? More like it's inherent to how the command you are calling is designed: it checks for the backend of the current buffer and behaves differently depending on whether one is found. Since project-prefix-or-any-command works in the current buffer, it cannot really reset every such local variable. OTOH, it could temporarily switch to an empty buffer. In that case, however, any thing-at-point functionality won't work (and the invoked command might want to use the symbol at point as some default input or etc). At the time we discussed this, the latter seemed like a bigger problem. Like Juri said, this particular disparity can be configured away, but different oddities in that class are bound to come up again. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 24 03:22:07 2023 Received: (at 67171) by debbugs.gnu.org; 24 Nov 2023 08:22:07 +0000 Received: from localhost ([127.0.0.1]:35566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6RRv-0001oc-AP for submit@debbugs.gnu.org; Fri, 24 Nov 2023 03:22:07 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:51929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6RRt-0001o6-Og for 67171@debbugs.gnu.org; Fri, 24 Nov 2023 03:22:06 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 9089CC0008; Fri, 24 Nov 2023 08:21:52 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> (Dmitry Gutov's message of "Fri, 24 Nov 2023 00:21:27 +0200") Organization: LINKOV.NET References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> <867cm8z8rt.fsf@mail.linkov.net> <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> Date: Fri, 24 Nov 2023 09:46:20 +0200 Message-ID: <86il5rlj01.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> As an aside, it doesn't seem good that whether or not step four prompts >>> you for a directory depends on whether the current buffer happens to be >>> visiting a file or not. Can we improve that, or is it inherent to the >>> design of the new feature? >> This was improved recently in bug#67145, so now you can set >> 'vc-deduce-backend-nonvc-modes' to nil to avoid this prompt. >> I'm not sure if nil should be the default value. > > I wonder if the "deduce in all modes" value should be t rather than nil. Good idea since nil could be used to disable deduction completely. Then maybe it should be defcustom? From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 24 07:28:16 2023 Received: (at 67171) by debbugs.gnu.org; 24 Nov 2023 12:28:16 +0000 Received: from localhost ([127.0.0.1]:35812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6VI7-0000Em-VA for submit@debbugs.gnu.org; Fri, 24 Nov 2023 07:28:16 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:44649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6VI4-0000ES-US for 67171@debbugs.gnu.org; Fri, 24 Nov 2023 07:28:14 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A7E965C013B; Fri, 24 Nov 2023 07:28:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 24 Nov 2023 07:28:01 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1700828881; x=1700915281; bh=CifJtNp1MVPFaCahOCPAtvCsWECyggaU2y9 63QlvSeo=; b=xhDjXldiVifPms5ObUndLyCqi99ClM86UfjNsuPzpAVnGvWpRCe ud6P2dy6i+9ZlpK0P7Ym1h3slpzFHu2088KM0gPsmmlVx/ZiVuw0CZtQLGCHW9d+ VYK0xBf1iVljLpIrLYLOgEWYEWMbP+1vm1db8CyEw+roqP5wFN4kXu7hkqKnzBQU RMCMcwLfRAyGXpeWLsDlHjSaV1yHO9Qp1KUQ4fv+r4Ap3asK4sRcl9pzGR81/8bA 0BeqOUyQMLTrsiuyHjIk5q0pif7ZRe5h5Cy4g0D2eiiBApJ47SZhWool+wZ5gB/q N7+p6WwLxmb61XkLznFnl/ch3a9kDe6lYbg== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700828881; x=1700915281; bh=CifJtNp1MVPFaCahOCPAtvCsWECyggaU2y9 63QlvSeo=; b=a579W6+fzQoeS8akjaIE1IqKFoRH3QIwr7pbmSGplSxxUNzCg1+ V8qIsdIScOfSE9WnmE2HR2X8uTeHhBTorzqKHK/FZBT8S59Qj6+V/t+1LnoBoSHe zNOo4kmWM1fVDXYhv8l13ycL3Qsd6FR0TThhR3jgTLqRgj+WxywDHbFnfKdh4rEf 3F1+4/5Q8XmXSSfjKrUp5+4V3aLCZK8NpqmSNnHKO+LRpuLmrC6LUuKKzSdKJSlx EhjJa8YPFavWlM4TXO6Dbod+P3at7ARZsGFmq+5Lu+1kXOKt04AIfN7na3/sL7wB 0lnsc+aSeaLjShXCjYyEceFQpzVsTvvA1ng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehhedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Nov 2023 07:27:59 -0500 (EST) Message-ID: Date: Fri, 24 Nov 2023 14:27:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Juri Linkov References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> <867cm8z8rt.fsf@mail.linkov.net> <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> <86il5rlj01.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86il5rlj01.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 24/11/2023 09:46, Juri Linkov wrote: >>>> As an aside, it doesn't seem good that whether or not step four prompts >>>> you for a directory depends on whether the current buffer happens to be >>>> visiting a file or not. Can we improve that, or is it inherent to the >>>> design of the new feature? >>> This was improved recently in bug#67145, so now you can set >>> 'vc-deduce-backend-nonvc-modes' to nil to avoid this prompt. >>> I'm not sure if nil should be the default value. >> I wonder if the "deduce in all modes" value should be t rather than nil. > Good idea since nil could be used to disable deduction completely. > Then maybe it should be defcustom? Why not. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 13:43:35 2023 Received: (at 67171) by debbugs.gnu.org; 25 Nov 2023 18:43:35 +0000 Received: from localhost ([127.0.0.1]:40287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6xct-0005df-5c for submit@debbugs.gnu.org; Sat, 25 Nov 2023 13:43:35 -0500 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:57041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6xcj-0005cr-Gx for 67171@debbugs.gnu.org; Sat, 25 Nov 2023 13:43:26 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 11760240003; Sat, 25 Nov 2023 18:43:11 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: (Dmitry Gutov's message of "Fri, 24 Nov 2023 14:27:56 +0200") Organization: LINKOV.NET References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> <867cm8z8rt.fsf@mail.linkov.net> <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> <86il5rlj01.fsf@mail.linkov.net> Date: Sat, 25 Nov 2023 20:39:37 +0200 Message-ID: <86a5r1y8wm.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain >>>>> As an aside, it doesn't seem good that whether or not step four prompts >>>>> you for a directory depends on whether the current buffer happens to be >>>>> visiting a file or not. Can we improve that, or is it inherent to the >>>>> design of the new feature? >>>> This was improved recently in bug#67145, so now you can set >>>> 'vc-deduce-backend-nonvc-modes' to nil to avoid this prompt. >>>> I'm not sure if nil should be the default value. >>> I wonder if the "deduce in all modes" value should be t rather than nil. >> Good idea since nil could be used to disable deduction completely. >> Then maybe it should be defcustom? > > Why not. Maybe something like this: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=vc-deduce-backend-nonvc-modes.patch diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 1bd9ecb2193..bde22536d1f 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1071,19 +1071,23 @@ log-edit-vc-backend (defvar diff-vc-backend) (defvar diff-vc-revisions) -;; Maybe we could even use comint-mode rather than shell-mode? -(defvar vc-deduce-backend-nonvc-modes +(defcustom vc-deduce-backend-nonvc-modes + ;; Maybe we could even use comint-mode rather than shell-mode? '(dired-mode shell-mode eshell-mode compilation-mode) "List of modes not supported by VC where backend should be deduced. In these modes the backend is deduced based on `default-directory'. -When nil, the backend is deduced in all modes.") +When t, the backend is deduced in all modes." + :type '(choice (const :tag "None" nil) + hook + (const :tag "All" t)) + :version "30.1") (defun vc-deduce-backend () (cond ((derived-mode-p 'vc-dir-mode) vc-dir-backend) ((derived-mode-p 'log-view-mode) log-view-vc-backend) ((derived-mode-p 'log-edit-mode) log-edit-vc-backend) ((derived-mode-p 'diff-mode) diff-vc-backend) - ((or (null vc-deduce-backend-nonvc-modes) + ((or (eq vc-deduce-backend-nonvc-modes t) (derived-mode-p vc-deduce-backend-nonvc-modes)) (ignore-errors (vc-responsible-backend default-directory))) (vc-mode (vc-backend buffer-file-name)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 14:07:56 2023 Received: (at 67171) by debbugs.gnu.org; 25 Nov 2023 19:07:57 +0000 Received: from localhost ([127.0.0.1]:40297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6y0S-0000Uw-K7 for submit@debbugs.gnu.org; Sat, 25 Nov 2023 14:07:56 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:35877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6y0P-0000Ud-Jo for 67171@debbugs.gnu.org; Sat, 25 Nov 2023 14:07:54 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4903E5C0179; Sat, 25 Nov 2023 14:07:42 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 25 Nov 2023 14:07:42 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1700939262; x=1701025662; bh=eYb+qazlb4gFqhveXzu7J8g4dkpXGZJMsFX Q5kqPnBI=; b=ESKAOVUYxzqJAxgBcCeb4veLHxCKyeRakZwPw4WJqIacrzUa2rB eJ+uRgREjuwI0qZLmkVORjTBwdjj0GZcOxOiox2PjT7kCwrbt7e4cIdVmWyA9v1i X4G966YVCbl2OkVakk9v2uH9sHiRkKegfp6Hjh2Z65HLPKWMzc/v49jjVk8Y+Smv RFV+TtzvVJ3Tu/H8e+SmwtQAIusg5xhCh/GFgDXyS1rxUKbYXm1w/DeIe9GnzHGh 9y5hwtvAuWsrMh+TEOEuDIvySYaY4ihul4+umu65kdbhzQtD7mjlj3RJ/DA7LWDl Gf7Bgb6lanRP376m5GNcGYhrMrUhHAVD22w== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700939262; x=1701025662; bh=eYb+qazlb4gFqhveXzu7J8g4dkpXGZJMsFX Q5kqPnBI=; b=p7l0G/KgDml15Co8ZsshtEZiZ+eEd/0f+bAZ39tRaW0ykZDpKis zrSj7K4clmfhumyZ3zSUS9N+08Z9qmmXCsvfk9h0tzVnhAAoSFXMaKoQV88RrCrU hyw+kNURy8AIg83uYPJPXfrL9AiVajT5B8Q2dyPQ/4GL/aKXFTrg/CCLKVBsf301 rmT7Zs9Vguj/v5OqxvsQMQRRUdv0qh3d+7gqVOf6MS2QB3ox882MpiiE3lODGfLs rYh1iDAJhaoUHaLEYdmGob81ZxcCqhe+x0vTk1Kd7+wKf5rwFpk5fzouoFK0bIF0 /rNf70lTNa9P7dYqrqXEmMfyxgQlz3YBx8w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehjedguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Nov 2023 14:07:39 -0500 (EST) Message-ID: Date: Sat, 25 Nov 2023 21:07:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Juri Linkov References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> <867cm8z8rt.fsf@mail.linkov.net> <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> <86il5rlj01.fsf@mail.linkov.net> <86a5r1y8wm.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86a5r1y8wm.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 25/11/2023 20:39, Juri Linkov wrote: > + hook This one looks a bit out of place, but if it simply means "a function", that's ok. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 14:11:10 2023 Received: (at 67171) by debbugs.gnu.org; 25 Nov 2023 19:11:10 +0000 Received: from localhost ([127.0.0.1]:40305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6y3a-0000aw-H4 for submit@debbugs.gnu.org; Sat, 25 Nov 2023 14:11:10 -0500 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:50483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6y3X-0000aI-3Z for 67171@debbugs.gnu.org; Sat, 25 Nov 2023 14:11:08 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id EBA9B240005; Sat, 25 Nov 2023 19:10:53 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: (Dmitry Gutov's message of "Sat, 25 Nov 2023 21:07:37 +0200") Organization: LINKOV.NET References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> <867cm8z8rt.fsf@mail.linkov.net> <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> <86il5rlj01.fsf@mail.linkov.net> <86a5r1y8wm.fsf@mail.linkov.net> Date: Sat, 25 Nov 2023 21:10:27 +0200 Message-ID: <86wmu5wsws.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> + hook > > This one looks a bit out of place, but if it simply means "a function", > that's ok. Actually, it's a shorthand for "a list of functions". From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 14:14:14 2023 Received: (at 67171) by debbugs.gnu.org; 25 Nov 2023 19:14:14 +0000 Received: from localhost ([127.0.0.1]:40314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6y6Y-0000gC-E1 for submit@debbugs.gnu.org; Sat, 25 Nov 2023 14:14:14 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:60743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6y6W-0000fw-Bg for 67171@debbugs.gnu.org; Sat, 25 Nov 2023 14:14:13 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id F11A05C018D; Sat, 25 Nov 2023 14:14:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 25 Nov 2023 14:14:01 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1700939641; x=1701026041; bh=7mAB1bswuQxXhNIY2PykLtOUDlRaHX7TN5K UDsor2Mk=; b=aPv7xhBxqaK4q8EOHX62FdkhPk0mgDiUfNv/vNd4JbmA1+2irmC 31BspR7DLYIoFL8pc0OEdCIYdmptQlB2lw6SqjndRaQXDFM8SB8crXInQwPPRK0f qJvO6cW4lQ3MUkCkYD4gXbs/9sntDgr0P7Ig9eKZiy7V4WwLqcRaVYNqoq1yp1/Z KjTtYaEV+QviDncUiZFdTtwfS2C6tcRageDDI4jhTwvsHoc5y2PknYfnzt5v2HvO v5+hanWArRpV461NrvNIdCgF5ZExGEAdo1n+/SaJ/RmwB+9gXfgJXIuk1lIWoGmk jELFpK/DB3zzBt74K+6iBWVCJkjf9+7xACQ== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700939641; x=1701026041; bh=7mAB1bswuQxXhNIY2PykLtOUDlRaHX7TN5K UDsor2Mk=; b=wQ2t7nzlzL6zFMapadCNeCIeWPG8jLFm5fvsEFc6wCpANy72u2Z g6fcRgX41o7+kWClIjHrSOsNwy+0Sx22gqHgeXmY+g9lvF+3YIw0rRSccci1jywm 8avxvTw2JHo91JHbCy/hj4j+J4YD94rWR3tz7C3S86PXl4QHe7qB2lMIJD3kMI3s kjg2714StIxaWg9CyQP6/YAFVOoJrJQofmq+5vquQ4CPZbXC52FjZfOrYWBsSD2/ /oZ0Pq17Ncr+Ht9GJ9Xw+RLVuyhlV6DQxHY+wasqTka7+KzaxJ/YXX/PZbmcFXlC zxd21oS7enLvZ4kKcp43VMJlsMep2Dl6Ozg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehjedguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Nov 2023 14:14:00 -0500 (EST) Message-ID: Date: Sat, 25 Nov 2023 21:13:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Juri Linkov References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> <867cm8z8rt.fsf@mail.linkov.net> <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> <86il5rlj01.fsf@mail.linkov.net> <86a5r1y8wm.fsf@mail.linkov.net> <86wmu5wsws.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86wmu5wsws.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 25/11/2023 21:10, Juri Linkov wrote: >>> + hook >> This one looks a bit out of place, but if it simply means "a function", >> that's ok. > Actually, it's a shorthand for "a list of functions". Ah, perfect. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 25 14:14:22 2023 Received: (at 67171) by debbugs.gnu.org; 25 Nov 2023 19:14:22 +0000 Received: from localhost ([127.0.0.1]:40318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6y6f-0000gU-R9 for submit@debbugs.gnu.org; Sat, 25 Nov 2023 14:14:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6y6d-0000gA-6h for 67171@debbugs.gnu.org; Sat, 25 Nov 2023 14:14:20 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6y6S-00067G-BZ; Sat, 25 Nov 2023 14:14:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=q7kD34v+ZLOzqJG0eEQtXAuvFx+EMXWfD/9GAX9NHUg=; b=Xbx0tsq5Fnh4 C4hx5apUhF4WL6R7n4qFfvH9AbD9gd66XgzAALxrpTS36Jrv6RxEWY9AZVTQmWsBC2oZwVNl4h+7G aXc2YAn+p0p+HtG5R3kGjpwN+IfT5BzBRsq2OS3108G94CkmlZGrfvgY/mn/pOo7dZrRzRCe9jFle n6+zZfCLkz6X3MgjbjNAwZW/Vf1nEE0MLKUj9LJJta3l2agxTTmsfgVQEVMgF/m0ZTqhRiBYPKwiQ a0iD8oJqBVBOX4/tD2Tg7hx7sqMSXbl+rXy+CqAr/wSWvWglyfwFuvn1qjrmY448ucbZeIEESZYun 2tZzZ1YTsnRRtwOwAq6j4Q==; Date: Sat, 25 Nov 2023 21:13:52 +0200 Message-Id: <83msv1bq8f.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <86a5r1y8wm.fsf@mail.linkov.net> (message from Juri Linkov on Sat, 25 Nov 2023 20:39:37 +0200) Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> <867cm8z8rt.fsf@mail.linkov.net> <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> <86il5rlj01.fsf@mail.linkov.net> <86a5r1y8wm.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67171 Cc: dmitry@gutov.dev, sbaugh@catern.com, spwhitton@spwhitton.name, 67171@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, > Sean Whitton > From: Juri Linkov > Date: Sat, 25 Nov 2023 20:39:37 +0200 > > +(defcustom vc-deduce-backend-nonvc-modes > + ;; Maybe we could even use comint-mode rather than shell-mode? > '(dired-mode shell-mode eshell-mode compilation-mode) > "List of modes not supported by VC where backend should be deduced. > In these modes the backend is deduced based on `default-directory'. > -When nil, the backend is deduced in all modes.") > +When t, the backend is deduced in all modes." Please don't use "when" in these contexts; use "if" instead. "When" could be confusing because it has the meaning of time, not only of condition. Also, it is better to say "If the value is t" or "If this is t", instead of just "If t". From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 02:40:33 2023 Received: (at 67171) by debbugs.gnu.org; 27 Nov 2023 07:40:33 +0000 Received: from localhost ([127.0.0.1]:43159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7WEK-00044D-Vv for submit@debbugs.gnu.org; Mon, 27 Nov 2023 02:40:33 -0500 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:48337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7WEH-00043u-VH for 67171@debbugs.gnu.org; Mon, 27 Nov 2023 02:40:31 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 5E5061BF206; Mon, 27 Nov 2023 07:40:15 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: <83msv1bq8f.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Nov 2023 21:13:52 +0200") Organization: LINKOV.NET References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> <867cm8z8rt.fsf@mail.linkov.net> <197e0d54-dab9-e7cf-e78d-ea7384735f1b@gutov.dev> <86il5rlj01.fsf@mail.linkov.net> <86a5r1y8wm.fsf@mail.linkov.net> <83msv1bq8f.fsf@gnu.org> Date: Mon, 27 Nov 2023 09:39:17 +0200 Message-ID: <86cyvvhcgq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: dmitry@gutov.dev, sbaugh@catern.com, spwhitton@spwhitton.name, 67171@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> +(defcustom vc-deduce-backend-nonvc-modes >> + ;; Maybe we could even use comint-mode rather than shell-mode? >> '(dired-mode shell-mode eshell-mode compilation-mode) >> "List of modes not supported by VC where backend should be deduced. >> In these modes the backend is deduced based on `default-directory'. >> -When nil, the backend is deduced in all modes.") >> +When t, the backend is deduced in all modes." > > Please don't use "when" in these contexts; use "if" instead. "When" > could be confusing because it has the meaning of time, not only of > condition. > > Also, it is better to say "If the value is t" or "If this is t", > instead of just "If t". Now changed to defcustom with these fixes. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 05 17:40:56 2023 Received: (at 67171) by debbugs.gnu.org; 5 Dec 2023 22:40:56 +0000 Received: from localhost ([127.0.0.1]:38528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAe63-0001lo-NQ for submit@debbugs.gnu.org; Tue, 05 Dec 2023 17:40:56 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:37363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAe5y-0001lU-D7 for 67171@debbugs.gnu.org; Tue, 05 Dec 2023 17:40:54 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 49B065C01AF; Tue, 5 Dec 2023 17:40:33 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 05 Dec 2023 17:40:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1701816033; x= 1701902433; bh=5GlS7vR3zSkwopLN65Bgij/x1OmbXiNfKTzNR/2KL7A=; b=N jEBDQSo9KKVHEV8t+a123wutW+O1WsKc5pQAfXi0Aodb64iizNzWIR43mp6Sz0Sb LKVQyF0+xrHUY3sjjlV08ALosw97Nylh4iICDHb4E8kyNOcJLiBdDP+uyYETRMjt ZUFNpfIgsR3Mj7IdV9uq8DvBAVmG/SUTpSqz/KyrQE3Sx0HCz/17G4cPT8gPlOtB IHQ9f8pmPNq1nN8f3VPTxYHjW5sY0L589dApuk9EQOwzXNQIAWezqOKTY4vyDN+Z bPDQMKSLrPr7REGhmN0MSgdxJ8nPcaKicG+f7AKAYXxNi/gpz0mVtAGKhx84q9Rl RKubvjI52AfjpM4diaAQA== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701816033; x=1701902433; bh=5GlS7vR3zSkwo pLN65Bgij/x1OmbXiNfKTzNR/2KL7A=; b=PVrYb3Rmj4kK5jHYCYOXU5wpsuiv/ YQj18Xe8U81lkqcrPZZYeGKiTzi+c/lWmvdhJv3+wT/9Od5Lx3WIAmgkjCX34t8z q9s4Ya3kDD86/IwBopunMWvZ4RFZZ+Th03i4mZ6jIsuiQWXIK1Dy+J4u/vif91I6 42rulvJgBtcW0q+3q8co6DkJqsTXN1XfOWImuzYEjyZh6hxTG3yabVRwVPWMOJyO xUWtFBoq5WzcnS4aepUpTGR/8T+timbLx0kY07mZrPgC3Wz1en8lwqqsJEdY1Fe8 MtMF6OJt99/EKVPcCb3Mn5naFMhC85Y/9NLnkeI70x+sQ2ANZrEfjsmgA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejledgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffffkfgggtgesthdttddttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpedtffdvffeuleeuvdetkedvveehgfehvdegvefghfevudek geegleevgeejkeetkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Dec 2023 17:40:32 -0500 (EST) Received: by melete.silentflame.com (Postfix, from userid 1000) id 7CBFF7E7BF2; Tue, 5 Dec 2023 22:40:30 +0000 (GMT) From: Sean Whitton To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: (Dmitry Gutov's message of "Mon, 20 Nov 2023 04:17:47 +0200") References: <87y1f0cwbj.fsf@melete.silentflame.com> Date: Tue, 05 Dec 2023 22:40:30 +0000 Message-ID: <874jgwff35.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, On Mon 20 Nov 2023 at 04:17am +02, Dmitry Gutov wrote: > On 14/11/2023 15:13, Sean Whitton wrote: >> X-debbugs-cc: dmitry@gutov.dev, juri@linkov.net, sbaugh@catern.com >> Hello, >> 1. cd /home/spwhitton/src/some-project && emacs -q >> 2. (setopt project-switch-commands #'project-prefix-or-any-command) >> 3. (project-remember-project (project-current nil "/home/spwhitton/src/emacs/trunk/)) >> 4. C-x p p /home/spwhitton/src/emacs/trunk RET C-x v L >> VC prints the log of /home/spwhitton/some-project, not that of >> /home/spwhitton/src/emacs/trunk. > > I'm having difficulty reproducing this. > > On step 4, I'm asked for the project root (because *scratch* doesn't have a > current VC backend), but the input defaults to the directory chosen in steps 3 > and 4. And if I open a file-visiting buffer first, then the prompt is skipped, > and I do see the log of the other project. Not the one used in step 1. Alright, I've bisected it. After step 3, additionally eval this form: (define-key project-prefix-map "L" #'vc-print-root-log) I have this because I want to be able to type just L instead of C-x v L. That doesn't work -- possibly not a bug -- but surely adding that binding shouldn't affect C-x v L, at least? -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 05 19:26:42 2023 Received: (at 67171) by debbugs.gnu.org; 6 Dec 2023 00:26:42 +0000 Received: from localhost ([127.0.0.1]:38563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAfkP-0004d7-Ng for submit@debbugs.gnu.org; Tue, 05 Dec 2023 19:26:42 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:59299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAfkJ-0004cq-W8 for 67171@debbugs.gnu.org; Tue, 05 Dec 2023 19:26:40 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 81CB83200033; Tue, 5 Dec 2023 19:26:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 05 Dec 2023 19:26:17 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1701822377; x=1701908777; bh=GFbQtF2hQUXWBHTBboKJsFoox5dFiwgWjBy fK3GrXJU=; b=Jd3/rdaz9bMiCwEypPfHh3JsTQ7Iu73cX3orT+z+i0JH/IX2GbJ zzzxwZB59RjiiEh/Js3nAOpLxPTxiwRxH9b/bJQ0Nt1GAozslsy9IwTEMFya16Cu MlAupcFaUl8r0+nsufmNla7FzeaXDt79e3oxUnXOzFkGIQKSgYqDh4DgRbHGWwxb ykQQ9p+6Nn1XuZQSVN4LGxETUNDeIZiorJdDmBS8iBbgr6bo4AhulI1cEtC9FKFw 5w5G6bY4pItjnFET973OUZjVlEHwruSlLYoCmQrjoSrTOYOlA/3daWBrxqQHAsoR a9vmApFEmwQO0pIOZCz0OBwq2ciAgbq8Wtg== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701822377; x=1701908777; bh=GFbQtF2hQUXWBHTBboKJsFoox5dFiwgWjBy fK3GrXJU=; b=BQ4bxrOYE985Jsxgaqucucb7CqTgIahMcjspxyVdnx3w7JmTksH Q7WNJJBcwu2Lt0Aq0gnc0wF5DbKItI5XxCV2/9474hoFgLfNS+CCHVPyG8g3I/Ct 3I4UyQz5U+GJjXSEFt4VIKvOCXWR+/MUU0zpJiDQLfVtgkoX9NexiAVYdORZlL27 GDfbQXtfGyAG14Z2Qs7QfH+Lx+QP5+3l07n7m6dDQ2BlnlaFDCSUNFoF9G/b5luZ Az1YQV3OFkqW9aRlTh3bwE84T5We4s1w70yFWA+e6N/cDCizGbFpVYL3s/eCmsra T1F+1vNAf0Dlf4HN00tF4m2sZ6VPMOGjZyg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejledgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Dec 2023 19:26:13 -0500 (EST) Message-ID: <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> Date: Wed, 6 Dec 2023 02:26:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Sean Whitton References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> From: Dmitry Gutov In-Reply-To: <874jgwff35.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 06/12/2023 00:40, Sean Whitton wrote: > Alright, I've bisected it. After step 3, additionally eval this form: > > (define-key project-prefix-map "L" #'vc-print-root-log) > > I have this because I want to be able to type just L instead of C-x v L. > That doesn't work -- possibly not a bug -- but surely adding that > binding shouldn't affect C-x v L, at least? All right, the full scenario is unexpected, but otherwise it's a documented behavior, see the docstring for 'project-any-command'. We discussed the possibility of the override in the other way (in bug#63648, which resulted in this command), but not an opt-out for commands in project-prefix-map, yet. So... something like this? diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a81bb63fba4..feef7ba5248 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1861,9 +1861,10 @@ project-any-command (when command ;; We could also check the command name against "\\`project-", ;; and/or (get command 'project-command). - (map-keymap - (lambda (_evt cmd) (if (eq cmd command) (setq found t))) - project-prefix-map) + (unless (get command 'project-switch-with-default-directory) + (map-keymap + (lambda (_evt cmd) (if (eq cmd command) (setq found t))) + project-prefix-map)) (if found (let ((project-current-directory-override root)) (call-interactively command)) Combined with (put 'vc-print-root-log 'project-switch-with-default-directory t) somewhere in your init script. The alternative would be tagging all project-related commands. Even if we also check for the 'project-' prefix in command's name, the user-defined commands using the project API will be affected (I don't know for how many it would be a problem, but still). From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 06 10:10:11 2023 Received: (at 67171) by debbugs.gnu.org; 6 Dec 2023 15:10:11 +0000 Received: from localhost ([127.0.0.1]:40181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAtXO-0006I2-JW for submit@debbugs.gnu.org; Wed, 06 Dec 2023 10:10:10 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:59221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAtXL-0006He-Gp for 67171@debbugs.gnu.org; Wed, 06 Dec 2023 10:10:08 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3434B5C027F; Wed, 6 Dec 2023 10:09:50 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 06 Dec 2023 10:09:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1701875390; x= 1701961790; bh=If2MbRWpdk7Ssu0cHLGVUNn7P1KWy7M2v9tL6ze+o0g=; b=C cO7reibMRbzq4TSr3EzRxUCIqLW7E0qubNWRFLQschBoWsBiCgyx/hWgSfNBiHwJ Soiq/4fq2/uGp7gpXAKNWyJkteB9/aRJ95rWSI/1t7MNkAV8HljC3i0gut3uOwO5 DjZ7fm8ROfDpeR7ACVga4ZuXGvpJtufvWJUZLs3K3x7aq7REv/qTwvP2efxH6cLO zzVJS+sj6kY0pxRVo+oeOlCmPYkJrSAGq5P8YSjselLViGJwDpT0tY6BIneOWevd KtLA71FDJvXCN8RU25WYVlFwFJJTHSVh8D8UNFW5AozY5sOVaXqZLsDmfW35j3o0 EE7dI8tlNqSUArZjxi1SA== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701875390; x=1701961790; bh=If2MbRWpdk7Ss u0cHLGVUNn7P1KWy7M2v9tL6ze+o0g=; b=D7kUYV/xjmHOBfp4fnPSSyNNDlOsD EN9XmmuVGTckHk4/3PHnfs3xXbEx728mZqJeKU7EJpYg2pFc6FOqjJdwUomfHFyA rfuTfCM6wg8Y0ZjXSRsM5nrKayGK1rn4plKtRaMMm0ntffyIxGlCMf3+i5vZ8Q+j q4CFP/uizoM+kU4NALPjiWCt7kM16lfELwW3+YHiqDSFZwbuH3DNi0AH3+QYjuJ0 coERyzM6QPKWYopW9I16F1h4iVwfksqF3IIkVKrvkJZFYMKuuBZxsktK4HylS59G wzpGvxiWdYfnHRTOU3P4qRqb97aJvDLjMZ1QorlRwwRKMDlQ4qx65wjWA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudektddgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffffkfgggtgesthdttddttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpedtffdvffeuleeuvdetkedvveehgfehvdegvefghfevudek geegleevgeejkeetkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Dec 2023 10:09:49 -0500 (EST) Received: by melete.silentflame.com (Postfix, from userid 1000) id 3399F7EDF76; Wed, 6 Dec 2023 15:09:47 +0000 (GMT) From: Sean Whitton To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> (Dmitry Gutov's message of "Wed, 6 Dec 2023 02:26:12 +0200") References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> Date: Wed, 06 Dec 2023 15:09:47 +0000 Message-ID: <87zfyne5ac.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, On Wed 06 Dec 2023 at 02:26am +02, Dmitry Gutov wrote: > On 06/12/2023 00:40, Sean Whitton wrote: >> Alright, I've bisected it. After step 3, additionally eval this form: >> (define-key project-prefix-map "L" #'vc-print-root-log) >> I have this because I want to be able to type just L instead of C-x v L. >> That doesn't work -- possibly not a bug -- but surely adding that >> binding shouldn't affect C-x v L, at least? > > All right, the full scenario is unexpected, but otherwise it's a documented > behavior, see the docstring for 'project-any-command'. Thanks, I see what you mean. > We discussed the possibility of the override in the other way (in > bug#63648, which resulted in this command), but not an opt-out for > commands in project-prefix-map, yet. > > So... something like this? > > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index a81bb63fba4..feef7ba5248 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -1861,9 +1861,10 @@ project-any-command > (when command > ;; We could also check the command name against "\\`project-", > ;; and/or (get command 'project-command). > - (map-keymap > - (lambda (_evt cmd) (if (eq cmd command) (setq found t))) > - project-prefix-map) > + (unless (get command 'project-switch-with-default-directory) > + (map-keymap > + (lambda (_evt cmd) (if (eq cmd command) (setq found t))) > + project-prefix-map)) > (if found > (let ((project-current-directory-override root)) > (call-interactively command)) > > > Combined with > > (put 'vc-print-root-log 'project-switch-with-default-directory t) > > somewhere in your init script. > > The alternative would be tagging all project-related commands. Even if we also > check for the 'project-' prefix in command's name, the user-defined commands > using the project API will be affected (I don't know for how many it would be > a problem, but still). This solution makes sense. We definitely want the user to have a way to tag additional commands. But couldn't we pre-tag some, like this one, for example? It is difficult to think of wanting to not have this one tagged. And the user could always remove the tag in their init. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 06 12:28:40 2023 Received: (at 67171) by debbugs.gnu.org; 6 Dec 2023 17:28:40 +0000 Received: from localhost ([127.0.0.1]:40341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAvhP-0001uL-Q4 for submit@debbugs.gnu.org; Wed, 06 Dec 2023 12:28:40 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:48567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAvhM-0001tx-T9 for 67171@debbugs.gnu.org; Wed, 06 Dec 2023 12:28:38 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id E9785E0003; Wed, 6 Dec 2023 17:28:14 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> (Dmitry Gutov's message of "Wed, 6 Dec 2023 02:26:12 +0200") Organization: LINKOV.NET References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> Date: Wed, 06 Dec 2023 19:10:03 +0200 Message-ID: <86msunbegc.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > So... something like this? > > @@ -1861,9 +1861,10 @@ project-any-command > (when command > ;; We could also check the command name against "\\`project-", > ;; and/or (get command 'project-command). > - (map-keymap > - (lambda (_evt cmd) (if (eq cmd command) (setq found t))) > - project-prefix-map) > + (unless (get command 'project-switch-with-default-directory) > + (map-keymap > + (lambda (_evt cmd) (if (eq cmd command) (setq found t))) > + project-prefix-map)) > (if found > (let ((project-current-directory-override root)) > (call-interactively command)) Why not let-bind both variables for all commands: 'project-current-directory-override' and 'default-directory'? Then project commands will pick up the first: (or project-current-directory-override default-directory) And non-project commands will just ignore 'project-current-directory-override'. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 06 19:02:07 2023 Received: (at 67171) by debbugs.gnu.org; 7 Dec 2023 00:02:08 +0000 Received: from localhost ([127.0.0.1]:40682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB1qB-0000pa-JP for submit@debbugs.gnu.org; Wed, 06 Dec 2023 19:02:07 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:50371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB1q6-0000ox-EO for 67171@debbugs.gnu.org; Wed, 06 Dec 2023 19:02:06 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9030B5C0274; Wed, 6 Dec 2023 19:01:44 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 06 Dec 2023 19:01:44 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1701907304; x=1701993704; bh=xANkbhVvhFmXS6E9pvJHwCFDNrK3nz0VCB4 4VaEUkGw=; b=T+E2gIh6HJW0ycceAGbMT5Qzv3LNleJ8RZx8BwpRTcaiJl0rvt6 siY9ocLOWZJMB9t2ugZBsDbHrueulh5MxBf988V3PFG1SGRCcmscKFztJDY4UXlL eO44r9Rxpyp5G4xVrQjYPFA0gigSSCs8DznQAPUl906NFQxoKfds46i5l3Pk0TSj TYQtjTSl6Aa64a5nxgEnVK8JOEsKD5QGFhXX3ezn8cqHeGtoaOQs9wlTetFZWW0R LrHHWQPGSHvXTncmZ0vuFOj8CFJx5VK8uf1LgMAsPIW1TDcsetZSP5xM8AkEpUHy k+EteJwJ8NHGmV8WR/d/8fOknqo+HIBpVpg== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701907304; x=1701993704; bh=xANkbhVvhFmXS6E9pvJHwCFDNrK3nz0VCB4 4VaEUkGw=; b=Gr+Pht4Hm5UDIknj+58dVmkNjuR0s/5p75rSjcdYvan0H4MIxRc mR9t8I7pQdZrH1NK7w+Rgrmfo206AdrbPskKDBzX7OJASPL+kQb4yGzbIR4N1uGM RJivlyX4X2X8NAgkxjWo1jGm4Qd5l9ZvXR3hoVUCtxngTJwqfRgkPBM3KH1DFN+c tfcfpoccxgcKKVT3M7eGarri2l1AyGvK8kcPOv6achORoupLd7vQaLGUvsYYSdeW dyMGKkHfwt9CX46+L4k2vev8ZdcoR63AB2VCMSiA/EGQDRXVDH3KG0K17A/T/Tu1 81l/9OLJJjpteUn3+0muW0+mGDpvCqNV71w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekuddgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Dec 2023 19:01:42 -0500 (EST) Message-ID: <2db0d197-cbc7-6946-dfaf-ba7160a8b0ab@gutov.dev> Date: Thu, 7 Dec 2023 02:01:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Juri Linkov References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> <86msunbegc.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86msunbegc.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 06/12/2023 19:10, Juri Linkov wrote: >> So... something like this? >> >> @@ -1861,9 +1861,10 @@ project-any-command >> (when command >> ;; We could also check the command name against "\\`project-", >> ;; and/or (get command 'project-command). >> - (map-keymap >> - (lambda (_evt cmd) (if (eq cmd command) (setq found t))) >> - project-prefix-map) >> + (unless (get command 'project-switch-with-default-directory) >> + (map-keymap >> + (lambda (_evt cmd) (if (eq cmd command) (setq found t))) >> + project-prefix-map)) >> (if found >> (let ((project-current-directory-override root)) >> (call-interactively command)) > Why not let-bind both variables for all commands: > 'project-current-directory-override' and 'default-directory'? > > Then project commands will pick up the first: > > (or project-current-directory-override default-directory) > > And non-project commands will just ignore > 'project-current-directory-override'. I think that would still regress bug#58784. And project-current-directory-override was really only added to benefit such rare cases. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 06 19:10:36 2023 Received: (at 67171) by debbugs.gnu.org; 7 Dec 2023 00:10:36 +0000 Received: from localhost ([127.0.0.1]:40687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB1yK-00015E-Ms for submit@debbugs.gnu.org; Wed, 06 Dec 2023 19:10:36 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:40667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB1yI-00014z-Oo for 67171@debbugs.gnu.org; Wed, 06 Dec 2023 19:10:32 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 652E65C027C; Wed, 6 Dec 2023 19:10:13 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 06 Dec 2023 19:10:13 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1701907813; x=1701994213; bh=rX+koOdDIcfaCMUFG7Pn2s01iSVRP3CMTKa olaVpHME=; b=YX8ukIqEtAHO5/+PJqc+hxYjpQKHr/2yGsqDnVtswYgjmytN7ba Q0rUW4jMoCGGW1M5EvesKSLS6Jc7e+njBMVzwLgoCeM43KxsUFvxglEGnWvme6jI utfMNHyGqNuM1IcjGR1nOvm9PFafUutBX64jozR9DjbDB3Fc+l21cYBCbtnx2BuK 1hY/wjymk5V1pEPPipaKgf4+KI7rHDFcc9jlsXz5j1OHDF6mxqdGnOFbawIhpVHr kqcW+Ap0CU4DbeItuYDhvmGy79JXDglL8r31pxGMTf0DqismmICDnv7U9XG8ZSId Vu1eV2gjFCvhFMriAcHDmiFAkUPZTF3D16A== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701907813; x=1701994213; bh=rX+koOdDIcfaCMUFG7Pn2s01iSVRP3CMTKa olaVpHME=; b=IYd2UQRo+5BqWIGx7ZMsyyWuaL1FrHfoc7tapxaWMysb7UNAeJ4 k3hZKVc4nqwTKw+94o3JJEHkmM3AJ0VCcBP3wyTxh/DWh4w1YOuWvabuK1YQZu9o 82WYcXEalNGyoi1KfkzkxIiDuBtx57h6zbiQY9IRboiiXYnysKhmtJVR0jyFiMsn sFvy8LVhJlkoji+eeoUFs7bXDH+umkGpTXgXWIyiGAxbi6VYWbckct9T2X5ey9TR fWCrw4eMoum9+r2gCT5Z/9X0eUJ+PoT2r/TsD8vGgHdktD1PUEwxxyecfYhyJ2RZ Oh2tsKvs91lN96hV+qCPen2CQPkbFRtPT6A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekuddgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Dec 2023 19:10:09 -0500 (EST) Message-ID: Date: Thu, 7 Dec 2023 02:10:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Sean Whitton References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> <87zfyne5ac.fsf@melete.silentflame.com> From: Dmitry Gutov In-Reply-To: <87zfyne5ac.fsf@melete.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 06/12/2023 17:09, Sean Whitton wrote: >> Combined with >> >> (put 'vc-print-root-log 'project-switch-with-default-directory t) >> >> somewhere in your init script. >> >> The alternative would be tagging all project-related commands. Even if we also >> check for the 'project-' prefix in command's name, the user-defined commands >> using the project API will be affected (I don't know for how many it would be >> a problem, but still). > > This solution makes sense. We definitely want the user to have a way to > tag additional commands. But couldn't we pre-tag some, like this one, > for example? It is difficult to think of wanting to not have this one > tagged. And the user could always remove the tag in their init. That would be a half-measure still. And why this command but not others? And if others too, then which ones? It might seem natural to you, but it never occurred to add vc-print-root-log to project-prefix-map to me. What other commands would not occur to us both but would to others? Would it make sense to tag all VC commands? Or just consider the 'vc-' prefix as a negative? To consider the "alternative" approach once more, we could recognize the 'project-' commands as the ones that should use project-current-directory-override. But the rest would use default-directory, unless they have a property 'project-related' or something. That would exclude user-defined commands in the beginning, but then again, the difference between binding project-current-directory-override and default-directory might matter only to a small fraction of them. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 06:24:04 2023 Received: (at 67171) by debbugs.gnu.org; 7 Dec 2023 11:24:04 +0000 Received: from localhost ([127.0.0.1]:41224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBCU7-00079Z-W6 for submit@debbugs.gnu.org; Thu, 07 Dec 2023 06:24:04 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:58159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBCU3-000790-Ly for 67171@debbugs.gnu.org; Thu, 07 Dec 2023 06:24:02 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D6D605C0156; Thu, 7 Dec 2023 06:23:41 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 07 Dec 2023 06:23:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1701948221; x= 1702034621; bh=EE1s1pCEDR88etNT5Qeo7xDHz46zL6fV2QYDP4m4KCs=; b=F ngoH9p/WLgZocFKThEde0srDWJyVWOifH0E4t5vhdXXv+GjjPEDaCmhaH3WMl52t +n/Ef2anFPrsK1c69q3p6zP5EwZNGjXZ+utGUuccc6zWVZ3V9KIxu2kuXegXV6Y/ 0eRLtRoiKS3Q0iDzEqQXjSbC+Nf0w4JavgfxLKvnrXLahvY4mPVItaltxRZkLFVM APp43uj5vGha3Hno23vwTYxqtaanvDAZHGCmH8D8hvbNzMYKPfdQzaAOVM1A97pM +9JkLT0xuX1tB3213vIbm7sX+qcrRfQpBH3mvE53L57Bm7UM4+4p8Zpxban9qafp NE+xih07ei2ZeE6VUh8nQ== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701948221; x=1702034621; bh=EE1s1pCEDR88e tNT5Qeo7xDHz46zL6fV2QYDP4m4KCs=; b=WW0ATmP78v4XV48kasIrMTR4Xuucu VkZAT9huMN2++TiFVOJZILvI/XrGW44icwhJiZSJyQj1Pj+xg+sUhrG015HyLxSZ BlBifb16titjP74JZM53Yettfz3xa4gZuLzuwz6uSMd/Al57ZI0oaEB4vBaAsU/1 ybAGfi3vkeerLnZTP3lpoAykbhvY0OYcUoAXq9/pf0Ng/EKnRXzcdWZV/Ja593ev OCTx9JO6q+mhkAsW2ycb9iYzj1bpaZBx1HMoVXALU97yMWAAUBMLMGh9IRAj3GZF RGz0zT3iZR4NQLOGb02JX++rt+NUu2X2+ARSZKa7jHnaGKX4lhru6cuRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekvddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffffkfgggtgesthdttddttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpedtffdvffeuleeuvdetkedvveehgfehvdegvefghfevudek geegleevgeejkeetkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Dec 2023 06:23:40 -0500 (EST) Received: by zephyr.silentflame.com (Postfix, from userid 1000) id 7AF489414DA; Thu, 7 Dec 2023 11:23:35 +0000 (GMT) From: Sean Whitton To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: (Dmitry Gutov's message of "Thu, 7 Dec 2023 02:10:07 +0200") References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> <87zfyne5ac.fsf@melete.silentflame.com> Date: Thu, 07 Dec 2023 11:23:35 +0000 Message-ID: <87zfym2r48.fsf@zephyr.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, On Thu 07 Dec 2023 at 02:10am +02, Dmitry Gutov wrote: > On 06/12/2023 17:09, Sean Whitton wrote: > >>> Combined with >>> >>> (put 'vc-print-root-log 'project-switch-with-default-directory t) >>> >>> somewhere in your init script. >>> >>> The alternative would be tagging all project-related commands. Even if we also >>> check for the 'project-' prefix in command's name, the user-defined commands >>> using the project API will be affected (I don't know for how many it would be >>> a problem, but still). >> This solution makes sense. We definitely want the user to have a way to >> tag additional commands. But couldn't we pre-tag some, like this one, >> for example? It is difficult to think of wanting to not have this one >> tagged. And the user could always remove the tag in their init. > > That would be a half-measure still. And why this command but not others? And > if others too, then which ones? > > It might seem natural to you, but it never occurred to add vc-print-root-log > to project-prefix-map to me. What other commands would not occur to us both > but would to others? > > Would it make sense to tag all VC commands? Or just consider the 'vc-' prefix > as a negative? > > To consider the "alternative" approach once more, we could recognize the > 'project-' commands as the ones that should use > project-current-directory-override. But the rest would use default-directory, > unless they have a property 'project-related' or something. That would exclude > user-defined commands in the beginning, but then again, the difference between > binding project-current-directory-override and default-directory might matter > only to a small fraction of them. I think the half-measure is okay, for it can become a fuller measure over time. Let's not do anything blanket for all vc- or project- commands, but just provide the facility, and pre-tag commands as we realise it couldn't make sense not to want the facility for those. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 12:34:24 2023 Received: (at 67171) by debbugs.gnu.org; 7 Dec 2023 17:34:24 +0000 Received: from localhost ([127.0.0.1]:43049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBIGW-0001d6-Aw for submit@debbugs.gnu.org; Thu, 07 Dec 2023 12:34:24 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:52977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBIGU-0001cY-4J for 67171@debbugs.gnu.org; Thu, 07 Dec 2023 12:34:23 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7766F1BF207; Thu, 7 Dec 2023 17:34:01 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: <2db0d197-cbc7-6946-dfaf-ba7160a8b0ab@gutov.dev> (Dmitry Gutov's message of "Thu, 7 Dec 2023 02:01:39 +0200") Organization: LINKOV.NET References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> <86msunbegc.fsf@mail.linkov.net> <2db0d197-cbc7-6946-dfaf-ba7160a8b0ab@gutov.dev> Date: Thu, 07 Dec 2023 19:22:10 +0200 Message-ID: <86y1e6gk2d.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> + (unless (get command 'project-switch-with-default-directory) >>> + (map-keymap >>> + (lambda (_evt cmd) (if (eq cmd command) (setq found t))) >>> + project-prefix-map)) >>> (if found >>> (let ((project-current-directory-override root)) >>> (call-interactively command)) >> Why not let-bind both variables for all commands: >> 'project-current-directory-override' and 'default-directory'? >> Then project commands will pick up the first: >> (or project-current-directory-override default-directory) >> And non-project commands will just ignore >> 'project-current-directory-override'. > > I think that would still regress bug#58784. > > And project-current-directory-override was really only added to benefit > such rare cases. So the only reason to distinguish project commands from non-project commands is that 'project-buffers' uses (buffer-local-value 'default-directory buf)? Then wouldn't it be easier to exclude from setting default-directory all commands that use 'project-buffers'? From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 12:35:09 2023 Received: (at 67171) by debbugs.gnu.org; 7 Dec 2023 17:35:10 +0000 Received: from localhost ([127.0.0.1]:43062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBIHF-0001fN-Jl for submit@debbugs.gnu.org; Thu, 07 Dec 2023 12:35:09 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:46723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBIHD-0001eo-LN for 67171@debbugs.gnu.org; Thu, 07 Dec 2023 12:35:08 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C809A5C011D; Thu, 7 Dec 2023 12:34:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 07 Dec 2023 12:34:49 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1701970489; x=1702056889; bh=0fVlT7Cb/bMFrGcElpaB4r261ZlRuDmxECR PyJrdnlU=; b=JA5nfTY6Ds5cBI7Tw1f5X8hS2vLyUYdqs0HxUW0JQ2HTq9Abm8U taIctvusVbg5bQcrSThabf+Yx/zb9OII+eXgoZTULsAzA+NrJlNrGMrryGY00Kvi frjbkj3DSClugTQBMMenLStD9iqGkcFdZ0c+6H44olVSpUYt8qYkqnG70Yekj2mf f03nKrd5m8Y9MCcdVuxuZTKtzlQTq9vP2QC5/yRQQ4y0OwFFSNmfgR19L689oSx+ YnNQaT/1/u5Arfz5oTgW/dTaBH+m5QmumisL9HXdlvrVQ3xOSR9RPj5/zMCitH1h 9lsSJLn9JhE9qhrPccImZAyRW4aB2zTMyKg== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701970489; x=1702056889; bh=0fVlT7Cb/bMFrGcElpaB4r261ZlRuDmxECR PyJrdnlU=; b=1UkLi222W0i+k3iepWgPCGveTey7+fCW5ObfYM54Pe8GAcIzYek oPzz7JLZvxoRdZCRfm60KThXJ//1m5JT7Q0YNkCExyG4JCUaCcg0aMksNzYD6Una mNCD6qAtid0eCNog6fakddDireVUadxUek5GDztmz1j+XCFS8fnmawiIi/Gcg09i 1223zPTxA50XeOlH5SB9K1rAylufCob21eYBx3X6DyZvztU8zMq6Nshs5AeY42/f /niI9qXkwysuHpgldyYJslrmZlNreQAPB+O8OCepd5wyS83WTjAiV7uePtK3LKS4 vmm5SGojZUU2n8IsI1KJTRsVQW5GKNuxLpg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekfedggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Dec 2023 12:34:47 -0500 (EST) Message-ID: <5c07a663-c0f0-91dd-2484-325ec3b6fa8c@gutov.dev> Date: Thu, 7 Dec 2023 19:34:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Juri Linkov References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> <86msunbegc.fsf@mail.linkov.net> <2db0d197-cbc7-6946-dfaf-ba7160a8b0ab@gutov.dev> <86y1e6gk2d.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86y1e6gk2d.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 07/12/2023 19:22, Juri Linkov wrote: >>>> + (unless (get command 'project-switch-with-default-directory) >>>> + (map-keymap >>>> + (lambda (_evt cmd) (if (eq cmd command) (setq found t))) >>>> + project-prefix-map)) >>>> (if found >>>> (let ((project-current-directory-override root)) >>>> (call-interactively command)) >>> Why not let-bind both variables for all commands: >>> 'project-current-directory-override' and 'default-directory'? >>> Then project commands will pick up the first: >>> (or project-current-directory-override default-directory) >>> And non-project commands will just ignore >>> 'project-current-directory-override'. >> I think that would still regress bug#58784. >> >> And project-current-directory-override was really only added to benefit >> such rare cases. > So the only reason to distinguish project commands from non-project commands > is that 'project-buffers' uses (buffer-local-value 'default-directory buf)? > Then wouldn't it be easier to exclude from setting default-directory > all commands that use 'project-buffers'? Using which method, though? From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 08 02:48:31 2023 Received: (at 67171) by debbugs.gnu.org; 8 Dec 2023 07:48:31 +0000 Received: from localhost ([127.0.0.1]:43718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBVb4-0002CH-Oe for submit@debbugs.gnu.org; Fri, 08 Dec 2023 02:48:31 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:56049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBVaz-0002BZ-5Y for 67171@debbugs.gnu.org; Fri, 08 Dec 2023 02:48:28 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id CD43AC0002; Fri, 8 Dec 2023 07:48:04 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: <5c07a663-c0f0-91dd-2484-325ec3b6fa8c@gutov.dev> (Dmitry Gutov's message of "Thu, 7 Dec 2023 19:34:44 +0200") Organization: LINKOV.NET References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> <86msunbegc.fsf@mail.linkov.net> <2db0d197-cbc7-6946-dfaf-ba7160a8b0ab@gutov.dev> <86y1e6gk2d.fsf@mail.linkov.net> <5c07a663-c0f0-91dd-2484-325ec3b6fa8c@gutov.dev> Date: Fri, 08 Dec 2023 09:40:19 +0200 Message-ID: <86fs0db0rg.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>>>> + (unless (get command 'project-switch-with-default-directory) >>>>> + (map-keymap >>>>> + (lambda (_evt cmd) (if (eq cmd command) (setq found t))) >>>>> + project-prefix-map)) >>>>> (if found >>>>> (let ((project-current-directory-override root)) >>>>> (call-interactively command)) >>>> Why not let-bind both variables for all commands: >>>> 'project-current-directory-override' and 'default-directory'? >>>> Then project commands will pick up the first: >>>> (or project-current-directory-override default-directory) >>>> And non-project commands will just ignore >>>> 'project-current-directory-override'. >>> I think that would still regress bug#58784. >>> >>> And project-current-directory-override was really only added to benefit >>> such rare cases. >> So the only reason to distinguish project commands from non-project commands >> is that 'project-buffers' uses (buffer-local-value 'default-directory buf)? >> Then wouldn't it be easier to exclude from setting default-directory >> all commands that use 'project-buffers'? > > Using which method, though? Probably by a command symbol property, although I don't quite like such solution. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 08 15:37:56 2023 Received: (at 67171) by debbugs.gnu.org; 8 Dec 2023 20:37:56 +0000 Received: from localhost ([127.0.0.1]:46297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBhbf-00008V-JH for submit@debbugs.gnu.org; Fri, 08 Dec 2023 15:37:56 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:41321) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBhbd-000081-RY for 67171@debbugs.gnu.org; Fri, 08 Dec 2023 15:37:55 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id DFD3C5C00DC; Fri, 8 Dec 2023 15:37:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 08 Dec 2023 15:37:34 -0500 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:sender:subject:subject:to:to; s=fm3; t= 1702067854; x=1702154254; bh=UusAnyHBRph2yR6d27ZGVkt0CkDM4f6XVb9 LhYUkrog=; b=fXREBJ0nMiysLVAl6NekQb6H4MoF6kO9jwdKrXlSuA7HxP/mN/P A107LO4c0nzmAxanjgD+i5LoETizNtcWXLWm3paiP/tSpSVZxSOUTCOiU1BW1UC1 mm374xh7QeggG8Ce1TvQuILXyYU+z3HE5u6bJ0HOToPEk48Bawu1GgGlqAsEeZ1N 0glSCLyPHYxk09de2oa0KWlh8VOkHh0BLjpLq/eOFNsB336Lwn+tV8dQYHlf0Rct fk2HIxGVRRhgJQX+RMMFRLiIXGpP+zpQDn0jeOhtmkN/u6ekJ5QcjEqp++5XOk9H r+O03gr8MjnTnmrVrVRh4SijHVY4h+ll04Q== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1702067854; x=1702154254; bh=UusAnyHBRph2yR6d27ZGVkt0CkDM4f6XVb9 LhYUkrog=; b=gSn3mwwDSVsAC+sbZxbjcGcnensQ35/iFOuNzwDHyyYnvvrn4CK /ClksdVNrbpY2r6xM46d6qiXsvCgwakmh4W9M2YCOMG1likhWKGmHAzvhOQJpNK0 xa2PTnrDtxD+2n8P42+4/I8W3y56pXkjeeg05hChxZ2juwGw/c2cY35yksLEjn0/ 8flypzHN5OJ8dYvVaTrEEDz3HO+2QjTns6wu32xB+bL4iz4rObdajgu8v7u3aCzx vK+AabPNNI7goe6Tx6uBMHM/J+hmgdxS2wUgimkmZrRcWM9ueAvIXTpk3z3HArGO tojO5jkxCrIkRgx48FRUUTkuJAp6nSHElRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekiedgudegtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Dec 2023 15:37:32 -0500 (EST) Message-ID: <3fa3aada-601d-1071-fb0e-c5b94db098b0@gutov.dev> Date: Fri, 8 Dec 2023 22:37:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Content-Language: en-US To: Sean Whitton References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> <87zfyne5ac.fsf@melete.silentflame.com> <87zfym2r48.fsf@zephyr.silentflame.com> From: Dmitry Gutov In-Reply-To: <87zfym2r48.fsf@zephyr.silentflame.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67171 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 07/12/2023 13:23, Sean Whitton wrote: > Hello, > > On Thu 07 Dec 2023 at 02:10am +02, Dmitry Gutov wrote: > >> On 06/12/2023 17:09, Sean Whitton wrote: >> >>>> Combined with >>>> >>>> (put 'vc-print-root-log 'project-switch-with-default-directory t) >>>> >>>> somewhere in your init script. >>>> >>>> The alternative would be tagging all project-related commands. Even if we also >>>> check for the 'project-' prefix in command's name, the user-defined commands >>>> using the project API will be affected (I don't know for how many it would be >>>> a problem, but still). >>> This solution makes sense. We definitely want the user to have a way to >>> tag additional commands. But couldn't we pre-tag some, like this one, >>> for example? It is difficult to think of wanting to not have this one >>> tagged. And the user could always remove the tag in their init. >> That would be a half-measure still. And why this command but not others? And >> if others too, then which ones? >> >> It might seem natural to you, but it never occurred to add vc-print-root-log >> to project-prefix-map to me. What other commands would not occur to us both >> but would to others? >> >> Would it make sense to tag all VC commands? Or just consider the 'vc-' prefix >> as a negative? >> >> To consider the "alternative" approach once more, we could recognize the >> 'project-' commands as the ones that should use >> project-current-directory-override. But the rest would use default-directory, >> unless they have a property 'project-related' or something. That would exclude >> user-defined commands in the beginning, but then again, the difference between >> binding project-current-directory-override and default-directory might matter >> only to a small fraction of them. > I think the half-measure is okay, for it can become a fuller measure > over time. Let's not do anything blanket for all vc- or project- > commands, but just provide the facility, and pre-tag commands as we > realise it couldn't make sense not to want the facility for those. Sorry, but I still don't see how vc-print-root-log is different from many others (vc-print-* family of commands, or rgrep, or... commands like run-python (ensuring that it runs in a specific dir might mean the correct venv and python version), or find-dired, or etc. So if we tag vc-print-root-log in-tree, it seems like we'd need to add properties for all of the above, and more (also in-tree). I have now pushed the patch with the opposite solution to master. Its saving grace is that, like Juri also noted, most project-related commands wouldn't require this property to be set to function adequately. The ones that need the original value of default-directory in the current buffer should be in strict minority. Please check that it works for you, and for any further problems. This is now in master: diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a81bb63fba4..7789243cb00 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1841,10 +1841,12 @@ project-execute-extended-command ;;;###autoload (defun project-any-command (&optional overriding-map prompt-format) "Run the next command in the current project. -If the command is in `project-prefix-map', it gets passed that -info with `project-current-directory-override'. Otherwise, -`default-directory' is temporarily set to the current project's -root. + +If the command name starts with `project-', or its symbol has +property `project-related', it gets passed the project to use +with the variable `project-current-directory-override'. +Otherwise, `default-directory' is temporarily set to the current +project's root. If OVERRIDING-MAP is non-nil, it will be used as `overriding-local-map' to provide shorter bindings from that map @@ -1856,15 +1858,11 @@ project-any-command (key-binding (read-key-sequence (format prompt-format (project-root pr))) t))) - (root (project-root pr)) - found) + (root (project-root pr))) (when command - ;; We could also check the command name against "\\`project-", - ;; and/or (get command 'project-command). - (map-keymap - (lambda (_evt cmd) (if (eq cmd command) (setq found t))) - project-prefix-map) - (if found + (if (when (symbolp command) + (or (string-prefix-p "project-" (symbol-name command)) + (get command 'project-command))) (let ((project-current-directory-override root)) (call-interactively command)) (let ((default-directory root)) From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 08 16:29:32 2023 Received: (at 67171-done) by debbugs.gnu.org; 8 Dec 2023 21:29:32 +0000 Received: from localhost ([127.0.0.1]:46352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBiPc-0005Cu-0t for submit@debbugs.gnu.org; Fri, 08 Dec 2023 16:29:32 -0500 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:45657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBiPa-0005CN-KR for 67171-done@debbugs.gnu.org; Fri, 08 Dec 2023 16:29:31 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id BCA0B3200319; Fri, 8 Dec 2023 16:29:10 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 08 Dec 2023 16:29:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1702070950; x= 1702157350; bh=qpGxT7MvXNE989kf6zkWSsZ5CsFAx9265LaPCvjENCU=; b=g Obc3ZdOjFdK/7nx1jeuE3062zZoGT5xw2bcVjCI43VbymnVIGHkGIf3Kexjni/yT j0hg59JWfMDtUcEgIq8uw1hX9mMgNWivJwva9y1FumN4waXo6B6Tf047k6XhrLjF RciT8iLey9fdy5kbinJ8CFsjExck2PTrelYLVRfIWuJRfyOGQN5f8i6oMNAt36Yk ejnQ6t1qltDetZYKbb+6sQu+0LiAAM7zZ/XCeMFGflAEqUrg7MZNQtGe7G0k8wWK nof7v5d22x/Y/6Lay3GMoAj5Jzi3NISYpuQdarzA6LAT/OVEmWG4RIIOfsOeEyhJ EabqTBhdCnEWBqoI1R54g== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1702070950; x=1702157350; bh=qpGxT7MvXNE98 9kf6zkWSsZ5CsFAx9265LaPCvjENCU=; b=xU8ulmoVL6fbAqRa+7+MQ5FIEB0iD d6qfxuPHhrrHxHmatCCVEA8Sn2M6aRh6o3XdAn7OKOrG4MFz1EThqqpmkJnw2Hpx R0/7ODr3QfsThb90toO5nTEIGTNm2Or+l1eIGAZsIpRYMyAFgTXmMgH0ms9U1tIs SU33ZZZ6J259FVBKrnpYKkIZ+ut0uMtMAolGEsR8VC/NE9Ie111vikePAmgracBA /3QznxKg4nGze1jBr30DP5jbkZOpje/A821x6cGxvi0RKzIcqKqckNmQpF8dMAsn 0XQYulHbw6XgaZcP8GyevK1MuX9zYSvFlHdngrm8H1C/GqAyF1sZoWemw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekiedgudehudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufgjfhffkfgfgggtsehttddttddtredtnecuhfhrohhmpefuvggr nhcuhghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg eqnecuggftrfgrthhtvghrnheptdffvdffueeluedvteekvdevhefghedvgeevgffhvedu keeggeelveegjeekteeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Dec 2023 16:29:09 -0500 (EST) Received: by zephyr.silentflame.com (Postfix, from userid 1000) id 027D0940F6B; Fri, 8 Dec 2023 21:29:08 +0000 (GMT) From: Sean Whitton To: Dmitry Gutov Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command In-Reply-To: <3fa3aada-601d-1071-fb0e-c5b94db098b0@gutov.dev> (Dmitry Gutov's message of "Fri, 8 Dec 2023 22:37:29 +0200") References: <87y1f0cwbj.fsf@melete.silentflame.com> <874jgwff35.fsf@melete.silentflame.com> <90011c72-b18f-5868-2430-66eee97f454e@gutov.dev> <87zfyne5ac.fsf@melete.silentflame.com> <87zfym2r48.fsf@zephyr.silentflame.com> <3fa3aada-601d-1071-fb0e-c5b94db098b0@gutov.dev> Date: Fri, 08 Dec 2023 21:29:08 +0000 Message-ID: <875y187597.fsf@zephyr.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67171-done Cc: sbaugh@catern.com, 67171-done@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, On Fri 08 Dec 2023 at 10:37pm +02, Dmitry Gutov wrote: > I have now pushed the patch with the opposite solution to master. > > Its saving grace is that, like Juri also noted, most project-related commands > wouldn't require this property to be set to function adequately. The ones that > need the original value of default-directory in the current buffer should be > in strict minority. > > Please check that it works for you, and for any further problems. It certainly solves #67171. I wasn't part of the earlier discussion, so thank you very much for figuring out a solution that would seem to cover all these use cases. -- Sean Whitton From unknown Sat Aug 16 11:41:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 06 Jan 2024 12:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator