From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#63648: 29.0.90; project.el: with switch-use-entire-map, switch-project errors on non-project commands Date: Sat, 21 Oct 2023 13:27:07 +0000 (UTC) Message-ID: <87bkcst8b8.fsf@catern.com> References: <86h6of66o3.fsf@mail.linkov.net> <86wmxb2qvh.fsf@mail.linkov.net> <8634zyjt0k.fsf@mail.linkov.net> <8d1fb7ac-5c82-0ec2-8ae2-d09c131ec165@gutov.dev> <86edj6hyem.fsf@mail.linkov.net> <8634zitwoy.fsf@mail.linkov.net> <50d46d30-a796-b855-0d4c-690d6cb3d15b@gutov.dev> <86il88x9cy.fsf@mail.linkov.net> <4367c45c-95b3-6a29-4ba3-068a3c748452@gutov.dev> <2e34e515-a921-a969-0915-bea94c745f8b@gutov.dev> <868r9258oi.fsf@mail.linkov.net> <86edishisp.fsf@mail.linkov.net> <6fc81cbf-a21f-c5b4-aa56-e8518b8570d7@gutov.dev> <86msxgatuy.fsf@mail.linkov.net> <86y1gynr2u.fsf@mail.linkov.net> <7c72fd8c-c3f6-a974-8a4b-a081f7a9fe1a@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10373"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , 63648@debbugs.gnu.org, Juri Linkov To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 21 15:27:57 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 1quC1E-0002UB-D5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Oct 2023 15:27:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quC0u-0007V2-MU; Sat, 21 Oct 2023 09:27:36 -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 1quC0s-0007UP-Np for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 09:27:34 -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 1quC0s-0002Ol-FM for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 09:27:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quC1K-0000Jy-77 for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 09:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Oct 2023 13:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63648 X-GNU-PR-Package: emacs Original-Received: via spool by 63648-submit@debbugs.gnu.org id=B63648.16978948651204 (code B ref 63648); Sat, 21 Oct 2023 13:28:02 +0000 Original-Received: (at 63648) by debbugs.gnu.org; 21 Oct 2023 13:27:45 +0000 Original-Received: from localhost ([127.0.0.1]:42573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quC12-0000JM-Hr for submit@debbugs.gnu.org; Sat, 21 Oct 2023 09:27:44 -0400 Original-Received: from s.wrqvwxzv.outbound-mail.sendgrid.net ([149.72.154.232]:51142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quC0z-0000J5-SF for 63648@debbugs.gnu.org; Sat, 21 Oct 2023 09:27:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=rSj9DVbTEwEVmCo+5KLYDi/gJu2/7tvWQK3wwi8AerE=; b=UC6Z0iFnfuzXW8HzbNnYw1rFLYulJLcqdhshT5s9VnjLacDxNyXMJpcipoo4bULBfe2g Qr+u1jcuOcwPcuPPRrQs/CiiUF4KeBv+ekiIvN47G1juBxAG4w7o9XB2A79mPk3amAe1Nq B4wj99Bs8IHXS83b12OQ1FI1crtUGgQVS/gA+6gYgdrl7gCkvFUS8OZtAmYGZmF8cq41pr YxRxtJeCsgK22nlVJcMr27Q+yec5+ftLlaTe+Kh4bp5VhLguISs/E0E5MFSdvExkudgEFB Llxs4CFVZLR+CtPhrFljz21plBtLIFqn+KPiLSuV5zjZoBq6IPlRSwEx8/wDvn3g== Original-Received: by filterdrecv-656b5b4c75-nx6ft with SMTP id filterdrecv-656b5b4c75-nx6ft-1-6533D1AB-25 2023-10-21 13:27:07.886301942 +0000 UTC m=+326839.375197622 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-4 (SG) with ESMTP id aGXu0JG2StCZ4ewz_0kMNg Sat, 21 Oct 2023 13:27:07.806 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=gutov.dev Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 6D5386360E; Sat, 21 Oct 2023 09:27:07 -0400 (EDT) In-Reply-To: <7c72fd8c-c3f6-a974-8a4b-a081f7a9fe1a@gutov.dev> (Dmitry Gutov's message of "Thu, 19 Oct 2023 03:42:24 +0300") X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbIM7oQE7C/AE7YQcqFkxG7YT86uwHYLFmFM5WMrQqv0AJGWIk677rYSKvGpFPbXdKNxQh7fDNKgkpxbqdpA7058PkYV+MTsTafweaOFfgIWcy2JvJjLEb7mDQPl1D5Ykl+mboMWcQE14reVDwCbLThJw6FbWKsbh7yrvRyq6kTmzA== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== 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:272898 Archived-At: Dmitry Gutov writes: > Hi Juri, > > On 22/09/2023 18:52, Juri Linkov wrote: >>>> Probably. Would you like to propose one? So that I have something to >>>> compare to, and have something specific to put to the vote as well. >>> >>> Ok, something like this: >> Here is a more tested patch. It supports these cases: >> (setq project-switch-use-entire-map t) >> C-x p p C-b - should not include current buffer in the list of >> another project (bug#58784) >> C-x p p f M-n - should fetch the right default file name (bug#58784, bug#63829) >> C-u C-x p p f emoji TAB - should include ignored emoji-labels.el (bug#63648) >> C-x p p C-x d - should visit another project's root (bug#63648) >> The same with frames: >> C-x 5 p p C-b >> C-x 5 p p f M-n >> C-u C-x 5 p p f emoji TAB - should not show completions in another frame (bug#65558) >> C-x 5 p p C-x d > > Thank you. Especially for the list. > > But I think we still haven't reached a decision whether the "loop > until correct key is pressed" behavior is useful. > > I tried to think how to fit the above requirements into the existing > model, and it seems to require a new command, and an additional key > being pressed sometimes, for explicitness. > > The attached patch also includes your fix for bug#65558, which seems > orthogonal to our dilemma, and could probably be installed > separately. It could be dry-ed up a little, though. > > Anyway, with the attached counter-proposal, the list looks like this: > > C-x p p C-b - works when project-switch-use-entire-map=t > C-x p p f M-n - always works > C-u C-x p p f - same > C-x p p C-x d - the key sequence is 'C-x p p o C-x d' > > With frames: > > C-x 5 p p C-b - works when project-switch-use-entire-map=t > C-x 5 p p f M-n - always works > C-u C-x 5 p p f emoji TAB - same (thanks to your fix, included) > C-x 5 p p C-x d - the key sequence is 'C-x 5 C-x p p o C-x d' > > The user could add project-list-buffers (or project-switch-to-buffer) > to project-switch-commands, though, and then > project-switch-use-entire-map won't be needed. Either way's fine. > > To sum up, that does require pressing an extra key to use commands > outside of project-prefix-map, but OTOH that key is shown right in the > commands menu. And one doesn't have to (setq > project-switch-use-entire-map t) to use it, though that doesn't hurt > either. Two thoughts: 1. Maybe C-x p o should also exist, which runs the subsequent command in project-root. (Although I think it would be better if C-x p magically let you type any binding after C-x p, and the command would run in project-root, as I pondered much earlier in this thread. But that's a lot harder...) 2. Maybe C-x p p should have both `o` (on by default even without project-switch-use-entire-map) and the no-extra-key version (needs to be explicitly turned on, possibly by project-switch-use-entire-map) Although, I plan to turn the no-extra-key version on for all my users anyway. The one extra key is a real cost if you're doing this frequently.