all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 67171@debbugs.gnu.org, sbaugh@catern.com,
	Sean Whitton <spwhitton@spwhitton.name>
Subject: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command
Date: Fri, 08 Dec 2023 09:40:19 +0200	[thread overview]
Message-ID: <86fs0db0rg.fsf@mail.linkov.net> (raw)
In-Reply-To: <5c07a663-c0f0-91dd-2484-325ec3b6fa8c@gutov.dev> (Dmitry Gutov's message of "Thu, 7 Dec 2023 19:34:44 +0200")

>>>>> +      (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.





      reply	other threads:[~2023-12-08  7:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 13:13 bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command Sean Whitton
2023-11-20  2:17 ` Dmitry Gutov
2023-11-23 15:21   ` Sean Whitton
2023-11-23 17:20     ` Juri Linkov
2023-11-23 22:21       ` Dmitry Gutov
2023-11-24  7:46         ` Juri Linkov
2023-11-24 12:27           ` Dmitry Gutov
2023-11-25 18:39             ` Juri Linkov
2023-11-25 19:07               ` Dmitry Gutov
2023-11-25 19:10                 ` Juri Linkov
2023-11-25 19:13                   ` Dmitry Gutov
2023-11-25 19:13               ` Eli Zaretskii
2023-11-27  7:39                 ` Juri Linkov
2023-11-23 22:30     ` Dmitry Gutov
2023-12-05 22:40   ` Sean Whitton
2023-12-06  0:26     ` Dmitry Gutov
2023-12-06 15:09       ` Sean Whitton
2023-12-07  0:10         ` Dmitry Gutov
2023-12-07 11:23           ` Sean Whitton
2023-12-08 20:37             ` Dmitry Gutov
2023-12-08 21:29               ` Sean Whitton
2023-12-06 17:10       ` Juri Linkov
2023-12-07  0:01         ` Dmitry Gutov
2023-12-07 17:22           ` Juri Linkov
2023-12-07 17:34             ` Dmitry Gutov
2023-12-08  7:40               ` Juri Linkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86fs0db0rg.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=67171@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=sbaugh@catern.com \
    --cc=spwhitton@spwhitton.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.