From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Date: Fri, 24 Nov 2023 00:30:43 +0200 Message-ID: References: <87y1f0cwbj.fsf@melete.silentflame.com> <87a5r4bim6.fsf@melete.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1245"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net To: Sean Whitton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 23 23:31:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r6IED-0000As-AV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Nov 2023 23:31:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6IDt-0007cm-OZ; Thu, 23 Nov 2023 17:31:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6IDq-0007cN-Bl for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2023 17:30:59 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6IDp-0003am-Mq for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2023 17:30:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6IDt-0002eg-Nt for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2023 17:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Nov 2023 22:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67171 X-GNU-PR-Package: emacs Original-Received: via spool by 67171-submit@debbugs.gnu.org id=B67171.170077865710196 (code B ref 67171); Thu, 23 Nov 2023 22:31:01 +0000 Original-Received: (at 67171) by debbugs.gnu.org; 23 Nov 2023 22:30:57 +0000 Original-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 Original-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 Original-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) Original-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 Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 17:30:44 -0500 (EST) Content-Language: en-US In-Reply-To: <87a5r4bim6.fsf@melete.silentflame.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274837 Archived-At: 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.