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: Tue, 29 Aug 2023 23:40:19 +0300 Message-ID: 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: multipart/mixed; boundary="------------0UHUOdqSmTCyD0GQ89kCHUbR" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13633"; 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 To: Juri Linkov , Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 29 22:45:47 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 1qb5as-0003JH-7p for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Aug 2023 22:45:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qb5al-0008ON-Pd; Tue, 29 Aug 2023 16:45:39 -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 1qb5WD-0007oK-Il for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 16:40:58 -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 1qb5WA-0006Qq-Jg for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 16:40:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qb5WH-0007Sb-Mn for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 16:41:01 -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 20:41: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.169334164028643 (code B ref 63648); Tue, 29 Aug 2023 20:41:01 +0000 Original-Received: (at 63648) by debbugs.gnu.org; 29 Aug 2023 20:40:40 +0000 Original-Received: from localhost ([127.0.0.1]:51686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb5Vw-0007Rv-9C for submit@debbugs.gnu.org; Tue, 29 Aug 2023 16:40:40 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:58489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb5Vr-0007Rd-Hm for 63648@debbugs.gnu.org; Tue, 29 Aug 2023 16:40:38 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 2F1A83200938; Tue, 29 Aug 2023 16:40:22 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 29 Aug 2023 16:40:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc: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=1693341621; x=1693428021; bh=UR ZvWw4loq48ktZl7O81mQO+WfDi8KJJLjVtOb053eA=; b=eB70/u+DltduLMyPEX 5E75k6uGDJtmdQECqEitn2TkaFHdYjp+3sEQMYifCpPuGn/WSIIlQYRaEKqsIHZu CSC8ZfIHXSGPvP2kvhTqIqaqNZQ5jPqC6RaKdvCwcvgsOKKgyIW7azYd/Q7M+0LJ SEpGi00tou2YIfWLGyTAmeDKJhAQxmWvc/h9ZOZmFMM2zjQ79t3lkJMnSy4b3T4N wr7K/YaGu3zLiFRwfPhMKqzxtVv6ZqtrtYXefRQtRt/4jHBr6zCEDz0zCeq3VqUV gDZigBZPLty33LS3QoVQ270A78Emz7FE2IGWmVdG5tCoV5G1t6UUtFRm7w8qGzc3 xXRA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=1693341621; x=1693428021; bh=URZvWw4loq48k tZl7O81mQO+WfDi8KJJLjVtOb053eA=; b=lLZ5m+o6ewdyKnnmpfGQWsmFzS/6B /L77OtGi2NZ9O1JV3X7RZLEP0t1SQGZgtVD2P6Xzqvg4XVjymBWSX2Q5YNjMUBkv Ot8yK+H3EnESPM77YXrh4gTpeFzXVzk81yrdwmWWUi+UfKbiiAmSr8aveNupeFuJ g7AuBf5IG474Pg8bXLomgciIA+tDOVaeaWydX2nMhdRPaZ4fFzcODzab8jDuPJdl 74TdTc2n1puyQHq0ja3c/m/zakmHaIIVO2b0dFtM+b83sBg/edv91/rXUQiL06Ge EoKruSAXbq+WzU7m7AJLWSOHmsDztI2mJZOOuQiXFyPTafnMKxUZbAAxw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudefiedgudehvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpegtkfffgggfhffuvfevfhgjsehmtderredtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfeuieefvdehuddthfejueegfeethffhueetjedtiedvvefgjeefgedtleej feefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Aug 2023 16:40:20 -0400 (EDT) Content-Language: en-US In-Reply-To: <86msyhwrrg.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:268677 Archived-At: This is a multi-part message in MIME format. --------------0UHUOdqSmTCyD0GQ89kCHUbR Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sorry for the possible duplicate, but it seems this message didn't reach the bug tracker, or other recipients. Resending contents below. On 23/08/2023 20:54, Juri Linkov wrote: > There is no code where to bind a dynamic variable, because its value > should be available for the next command in the command loop. > If you agree there is no other way to implement this than next-default-directory, > then I could bring up the discussion on emacs-devel. Before we dive into all that, why not try advice on 'command-execute'? For the PoC code at least. It's in Lisp since 2013. The comment in its body does say "Called directly from the C code", but I'm not sure if that has any direct implications for us. This attached piece of code implements the project-switch-project as you outlined. Does it work well for you/others? Careful when testing or modifying: a typo can break the command loop (and thus the session). To me it seems a little too bare-bones, lacking the instructive hints project-switch-project currently has. --------------0UHUOdqSmTCyD0GQ89kCHUbR Content-Type: text/x-emacs-lisp; charset=UTF-8; name="next-dd.el" Content-Disposition: attachment; filename="next-dd.el" Content-Transfer-Encoding: base64 KGRlZnZhciBwcm9qZWN0LS1uZXh0LWRkIG5pbCkKCihkZWZ1biBwcm9qZWN0LS13aXRoLW5l eHQtZGQgKGZ1biAmcmVzdCBhcmdzKQogIChhZHZpY2UtcmVtb3ZlICdjb21tYW5kLWV4ZWN1 dGUgIydwcm9qZWN0LS13aXRoLW5leHQtZGQpCiAgKGxldCAoKGRlZmF1bHQtZGlyZWN0b3J5 IHByb2plY3QtLW5leHQtZGQpKQogICAgKGFwcGx5IGZ1biBhcmdzKSkpCgooZGVmdW4gcHJv amVjdC1zd2l0Y2gtcHJvamVjdCAoZGlyKQogIChpbnRlcmFjdGl2ZSAobGlzdCAoZnVuY2Fs bCBwcm9qZWN0LXByb21wdGVyKSkpCiAgKHNldHEgcHJvamVjdC0tbmV4dC1kZCBkaXIpCiAg KGFkdmljZS1hZGQgJ2NvbW1hbmQtZXhlY3V0ZSA6YXJvdW5kICMncHJvamVjdC0td2l0aC1u ZXh0LWRkKSkK --------------0UHUOdqSmTCyD0GQ89kCHUbR--