From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov 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: Wed, 30 Aug 2023 01:32:42 +0300 Message-ID: <1e2d9a65-16bb-3f2f-dfbc-5e043f93b78e@gutov.dev> References: <86wn10e1wl.fsf@mail.linkov.net> <482a1ebc-165c-a0a4-98c0-5c404d1b1d0d@gutov.dev> <86jzwyxnxb.fsf@mail.linkov.net> <86o7m91z22.fsf@mail.linkov.net> <86pm6py6k4.fsf@mail.linkov.net> <86bki9y68h.fsf@mail.linkov.net> <86cz2f7bvo.fsf@mail.linkov.net> <86353axu48.fsf@mail.linkov.net> <87o7jfi00b.fsf@catern.com> <86msyhwrrg.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32784"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: sbaugh@catern.com, 63648@debbugs.gnu.org, Juri Linkov To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 30 00:41:46 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 1qb7P7-0008KK-Ma for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Aug 2023 00:41:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qb7Op-00046J-Su; Tue, 29 Aug 2023 18:41:27 -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 1qb7HX-0003Bo-Cm for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 18:33:55 -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 1qb7HX-0000eU-4h for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 18:33:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qb7He-000240-0P for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 18:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Aug 2023 22:34:01 +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.16933483857869 (code B ref 63648); Tue, 29 Aug 2023 22:34:01 +0000 Original-Received: (at 63648) by debbugs.gnu.org; 29 Aug 2023 22:33:05 +0000 Original-Received: from localhost ([127.0.0.1]:51766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb7Gi-00022r-MH for submit@debbugs.gnu.org; Tue, 29 Aug 2023 18:33:04 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:33127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb7Gd-00022J-HB for 63648@debbugs.gnu.org; Tue, 29 Aug 2023 18:33:03 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id ED7BB3200258; Tue, 29 Aug 2023 18:32:45 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 29 Aug 2023 18:32:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1693348365; x=1693434765; bh=RC9Q5gpk+3UGBt6i93hLr5jSgLJoEUdIS2j tNHePHh0=; b=Ez6nteh7gzuhlC4fQBil9Oagh/xcumWTQnTYb5bzRtlBXWNyRFq i8V82Nt4QUObKgczqDs9doGteIWxwEwzdjoa3g3JoYrLCzlN40Uwq1nNsKogsDR8 x9iw0PihD9YdxRrGpZkPgmbcuixbiVJksrar+tooShaHPRel2+OdDlGxW0J0m82V MXMrH6QFUBFclvXACVsVdUY5ejRN9D9NRT+/ofOkeoeS/FuoGFGb0hk30+x6Nh2q AfcRFTT+vSFTz9PqHFepcxcaDhlbFfyZO9uUTi2jp7JvEXHXz265ExFocyLsd0g0 wjuKQhhByaXI/316icN6zpZwL0BR4+jrxlQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1693348365; x=1693434765; bh=RC9Q5gpk+3UGBt6i93hLr5jSgLJoEUdIS2j tNHePHh0=; b=C1lXNPRQZs3o4KzH36hMkmlH9Ymah0cfq539PJvdbK498Gs7HB/ C70cnm23sMj648fSiivw5zumfz6KHWyexurOgLWbhC4yxuCeX1NU0rTfC8hpE/8W Ge/LE0b2iSslhXshFlRs7NoQQlKYbt+BZ1BPfKXu95RBDfBZHabVDRcP3Ag04CLU iQBQOukRTv+rd4uBtrgE14tM1IOK7dcxJe+Oz233+vzD8Tzh73cJSY6v9Nq+7T5l 4YfxSwweITXpKm2eaAq2G2Bjt3t1X9VKNR9Bp1hh1OBlceZA35AUx0sfRLjCH1Gf jtT0Iu/a6lBBz9K9FvKSWQuK9PD4jLi08WQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudefjedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Aug 2023 18:32:44 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:268680 Archived-At: On 30/08/2023 00:47, Spencer Baugh wrote: > Nice! > > One thing at least to make it not quite so bare-bones is: > > (defun project-switch-project (dir) > (interactive (list (funcall project-prompter))) > (setq project--next-dd dir) > (advice-add 'command-execute :around #'project--with-next-dd) > (message "Run next command in project %s..." (project-name (project-current nil dir)))) > > which matches other-window-prefix. Definitely an improvement, but still -- any such message is likely soon overridden by the prefix echo (e.g. "C-x p-"). > Will try running with this for a while and see how it goes. (I'm > already missing the short form of project-find-files, but maybe I'll get > used to it... or maybe we should remap C-x C-f to project-find-files > while in this prefix, or something wacky like that) It could also use set-transient-map to set up a given map (e.g. one with the fast keys), and for the rest fall back to global commands. Note that our current project-switch-project impl could also be augmented to do that. Anyway, please test it out and see how you like it, and whatever improvements come to mind. In either case, we can add a new command (rather than replacing project-switch-project). E.g. call it project-switch-for-next-command.