From: Spencer Baugh <sbaugh@janestreet.com>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: sbaugh@catern.com, 69584@debbugs.gnu.org
Subject: bug#69584: 29.2.50; project-find-functions should have access to maybe-prompt
Date: Tue, 02 Apr 2024 13:54:03 -0400 [thread overview]
Message-ID: <ierbk6rfy6c.fsf@janestreet.com> (raw)
In-Reply-To: <iermsqqpgbf.fsf@janestreet.com> (Spencer Baugh's message of "Fri, 22 Mar 2024 09:05:40 -0400")
Spencer Baugh <sbaugh@janestreet.com> writes:
> So when you open up a branch overview, you'll usually assume there's a
> local copy, and so your first action will probably some command which
> uses project-current. But if there's no working copy, then you'll get
> dropped to a prompt to choose a project, instead of (say) a
> project-find-file prompt, which you might not immediately notice, which
> is confusing, and you'll have to C-g out of it, and then run some other
> command to create the working copy. All that is a hassle.
Oh, I've thought of a different resolution to this which may be better.
When project-current fails to find a project in default-directory, if
maybe-prompt=t, project-current will run project-prompter.
So I can just have a buffer-local project-prompter in the branch
overview buffer. And that project-prompter knows it's in a branch
overview buffer, and can prompt "Would you like to make a working copy
for [some branch]?".
That's elegant and doesn't change the semantics of project-current at
all: project-prompter already can return an arbitrary directory.
Except... I suppose this would make project-switch-project behave worse,
because hitting C-x p p in a branch overview buffer would now prompt to
create a working copy for that branch, when what you probably want to do
is switch to a different project entirely.
I guess there are two use cases for project-prompter: one is "fallback
for project-current" and the other is "switch to a different project".
Maybe we could support them being different?
next prev parent reply other threads:[~2024-04-02 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 14:23 bug#69584: 29.2.50; project-find-functions should have access to maybe-prompt Spencer Baugh
2024-03-15 1:41 ` Dmitry Gutov
2024-03-16 13:31 ` sbaugh
2024-03-18 21:59 ` Dmitry Gutov
2024-03-22 13:05 ` Spencer Baugh
2024-03-28 3:44 ` Dmitry Gutov
2024-04-04 14:29 ` Spencer Baugh
2024-04-05 0:33 ` Dmitry Gutov
2024-04-02 17:54 ` Spencer Baugh [this message]
2024-04-02 23:10 ` Dmitry Gutov
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=ierbk6rfy6c.fsf@janestreet.com \
--to=sbaugh@janestreet.com \
--cc=69584@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
--cc=sbaugh@catern.com \
/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).