From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Date: Thu, 07 Dec 2023 19:22:10 +0200 Organization: LINKOV.NET Message-ID: <86y1e6gk2d.fsf@mail.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28768"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, Sean Whitton To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 07 18:35:12 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 1rBIHI-0007Js-FD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Dec 2023 18:35:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBIGz-0007LZ-R3; Thu, 07 Dec 2023 12:34:53 -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 1rBIGw-0007KM-A6 for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 12:34:50 -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 1rBIGv-0003bd-UU for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 12:34:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBIH8-0001ek-Bm for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 12:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Dec 2023 17:35:02 +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.17019704646275 (code B ref 67171); Thu, 07 Dec 2023 17:35:02 +0000 Original-Received: (at 67171) by debbugs.gnu.org; 7 Dec 2023 17:34:24 +0000 Original-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 Original-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 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 7766F1BF207; Thu, 7 Dec 2023 17:34:01 +0000 (UTC) In-Reply-To: <2db0d197-cbc7-6946-dfaf-ba7160a8b0ab@gutov.dev> (Dmitry Gutov's message of "Thu, 7 Dec 2023 02:01:39 +0200") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275688 Archived-At: >>> + (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'?