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, 24 May 2023 04:14:05 +0300 Message-ID: <482a1ebc-165c-a0a4-98c0-5c404d1b1d0d@gutov.dev> References: <86wn10e1wl.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="24034"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cc: 63648@debbugs.gnu.org To: Juri Linkov , Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 24 03:16:20 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 1q1d6x-00065F-IH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 May 2023 03:16:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1d5j-00005S-MP; Tue, 23 May 2023 21:15:03 -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 1q1d5i-00005A-Tu for bug-gnu-emacs@gnu.org; Tue, 23 May 2023 21:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1d5i-0001m7-Kp for bug-gnu-emacs@gnu.org; Tue, 23 May 2023 21:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q1d5i-0001A2-H7 for bug-gnu-emacs@gnu.org; Tue, 23 May 2023 21:15: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: Wed, 24 May 2023 01:15: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.16848908544373 (code B ref 63648); Wed, 24 May 2023 01:15:02 +0000 Original-Received: (at 63648) by debbugs.gnu.org; 24 May 2023 01:14:14 +0000 Original-Received: from localhost ([127.0.0.1]:40706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1d4w-00018T-A5 for submit@debbugs.gnu.org; Tue, 23 May 2023 21:14:14 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1d4v-00018G-8t for 63648@debbugs.gnu.org; Tue, 23 May 2023 21:14:13 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 2811F5C00F9; Tue, 23 May 2023 21:14:08 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 23 May 2023 21:14:08 -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= 1684890848; x=1684977248; bh=5BUYO3tSDexgpcSf2riTBqgc71epbiHuRvA 7vMuCrko=; b=efRS01dUwEZ9ZU8HoKBH3/zr2UVGKACr8Oh2WyomV9ri8NL6TVf IOOvi4ZDnTPYbeCs2GYilbTMXN4x4HoVBTTTHsUC5wgzyeslkV4lSswwfBbxyfGu dVX3jgVm/oFn9A69ozTxdG9yYO/pSHVHKWgaZ4PqdJhviY+JKtVmJndDx+2Q5J3Y mP5IRxLDvvmzxB4nHOlod7sxZuVyQBGlknBmQeZxueCq7PYXiKenV+Aw6trQ5pPr lEqB+g3WedSWLlLTtG5UvxNLBu2vlBf5fuDeDf7NnX1T8uqvx/U6rGbAOrYhMaM7 4Go2ygKO5T3+tN0fPf8gzEy0lt4lWy7I9yg== 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= 1684890848; x=1684977248; bh=5BUYO3tSDexgpcSf2riTBqgc71epbiHuRvA 7vMuCrko=; b=U40nSq9e7nyJkmQh0qigHITlQum0V1C53qMNEqsInpPwSMUl5Yp yqDYhC4bjL1zHgeeR6IZ/2t/d3l3o17aZKBIlccwOqKgnO3B1Hg6Ib5BAGTGGaef wteM/TpDtsnIpB7jCYoTKauZNptTzTWFSlohgvdFJkheAoSs9CUSMHyQEmZIp3AT I/V58nwkEyFNPN4FGAyhonnpiPBK7APtzsdoLUAxczk0cwBJ1nNX6QW7h98cC3ex 686LeeTwLK9Fsd2dRNTR7vij6af+wE3q6RgtwVD+gvCPwOv46ePrezUOEl1Yf7XO jq46UgY6bTXh6KbUDxuzrJiDZuRmV6vAlNg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejgedggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 May 2023 21:14:06 -0400 (EDT) Content-Language: en-US In-Reply-To: <86wn10e1wl.fsf@mail.linkov.net> 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:262264 Archived-At: On 22/05/2023 20:51, Juri Linkov wrote: >> 1. (setq project-switch-use-entire-map t) >> 2. C-x p p some/project RET >> 3. At the prompt, C-x C-j >> 4. Errors with: >> project-switch-project: Wrong type argument: commandp, 1 >> >> Desired behavior: commands should run with default-directory of the >> project-root. So C-x C-j should open dired in the project root. >> >> I specifically ran into this when doing >> C-x p p some/project RET C-x v + >> >> because I wanted to immediately pull that project. Intuitively it made >> sense to me that that should work, it would be nice if it did actually >> work. > This should be possible to implement by using 'set-transient-map'. > >> (Tangential further thought: I wonder if we could make C-x p work as a >> prefix for all commands automatically, so for example C-x p C-x C-j >> would open the project root, C-x p M-& would run a shell command in the >> root, etc. That would be neat.) > IOW, like 'C-x p p' but without asking for another project. Doable as well. That sounds like a cool potential addition, just we all need to keep in mind that not every command will be 100% compatible with the approach. One example is the bug#58784 where changing default-directory made project-switch-to-buffer behave incorrectly. Maybe there are some less subtle examples as well.