From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#69584: 29.2.50; project-find-functions should have access to maybe-prompt Date: Tue, 02 Apr 2024 13:54:03 -0400 Message-ID: References: <65b29bab-3149-49e3-a6ae-6c0c1485e6f2@gutov.dev> <875xxmjoc9.fsf@catern.com> <34e15612-77bc-4a67-b493-e00c97d1155e@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="6344"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: sbaugh@catern.com, 69584@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 02 19:55:28 2024 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 1rriM3-0001M9-SC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Apr 2024 19:55:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rriLc-00015Z-F1; Tue, 02 Apr 2024 13:55:00 -0400 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 1rriLb-00015K-O5 for bug-gnu-emacs@gnu.org; Tue, 02 Apr 2024 13:54:59 -0400 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 1rriLb-0000b5-Ce for bug-gnu-emacs@gnu.org; Tue, 02 Apr 2024 13:54:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rriLf-0001pL-6a for bug-gnu-emacs@gnu.org; Tue, 02 Apr 2024 13:55:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Apr 2024 17:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69584 X-GNU-PR-Package: emacs Original-Received: via spool by 69584-submit@debbugs.gnu.org id=B69584.17120804596723 (code B ref 69584); Tue, 02 Apr 2024 17:55:03 +0000 Original-Received: (at 69584) by debbugs.gnu.org; 2 Apr 2024 17:54:19 +0000 Original-Received: from localhost ([127.0.0.1]:56184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rriKv-0001k3-4s for submit@debbugs.gnu.org; Tue, 02 Apr 2024 13:54:18 -0400 Original-Received: from mxout1.mail.janestreet.com ([38.105.200.78]:54979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rriKr-0001jA-Sc for 69584@debbugs.gnu.org; Tue, 02 Apr 2024 13:54:15 -0400 In-Reply-To: (Spencer Baugh's message of "Fri, 22 Mar 2024 09:05:40 -0400") DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1712080444; bh=IBxEK3B546gPOu8wOtY4ASgzpsg8KsadLGyjZMutwx0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=FxKfjKHZIfJjIwq6DsYb3zRWrEVQaiDdg2Do1BeOtEr8mzvJneOdEzKWBWrSN3dfW RSU8RVhMOucH1VFNUTZKWzxvccglmQ+g7oB/cH569FmP+zeRKlAQrH5kZc1xrGs3t8 TeCi3AWEo3oH8qqvLjjfBs9i8sfLZKAQMQpR2OyuhHGOulPX423bFykbyEM4HNOD0k pnnaQeuNeIzolUKKTSymz6MAFfWrc5ayDaRdSvNN2DwtwNDQcUU8fkfuy5V9aPigLy 2WvVX2S5mwmV0r7nFdKPhekeoZSA+17fl0XXP9l0N1UKF2+0HW6k7ufnU7jP8BTRsX QPfV9rhy3TbbQ== 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:282537 Archived-At: Spencer Baugh 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?