From: Dmitry Gutov <dmitry@gutov.dev>
To: Sean Whitton <spwhitton@spwhitton.name>
Cc: 67171@debbugs.gnu.org, sbaugh@catern.com, juri@linkov.net
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 [thread overview]
Message-ID: <ae9e63a1-9138-f98d-af18-888c1ad2bcbd@gutov.dev> (raw)
In-Reply-To: <87a5r4bim6.fsf@melete.silentflame.com>
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.
next prev parent reply other threads:[~2023-11-23 22:30 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 [this message]
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae9e63a1-9138-f98d-af18-888c1ad2bcbd@gutov.dev \
--to=dmitry@gutov.dev \
--cc=67171@debbugs.gnu.org \
--cc=juri@linkov.net \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).