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#63829: 29.0.90; project-find-file's future history breaks with common-parent-directory Date: Mon, 21 Aug 2023 04:51:33 +0300 Message-ID: <24706934-8acd-2047-7db9-11b7d34ddd0e@gutov.dev> References: <16b64d95-35e9-ef94-2c54-17b670111f0f@gutov.dev> <86h6rnw7gm.fsf@mail.linkov.net> <3e404df1-b3a9-f9e3-4270-f42df8b704c7@gutov.dev> <87a5uti6mo.fsf@catern.com> <73a695f3-7c6a-0e50-41dd-61f8269f6ecf@gutov.dev> <875y5fitiq.fsf@catern.com> <208300a3-25e1-d057-11ac-179e52b8f547@gutov.dev> <871qfzi6mz.fsf@catern.com> 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="23121"; 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: Spencer Baugh , Juri Linkov , 63829@debbugs.gnu.org To: sbaugh@catern.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 21 03:52:17 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 1qXu5Y-0005nC-8J for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Aug 2023 03:52:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXu5J-00076S-J3; Sun, 20 Aug 2023 21:52:01 -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 1qXu5I-00076B-EO for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 21:52:00 -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 1qXu5I-0005oR-5x for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 21:52:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXu5K-0000ad-0o for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 21:52: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: Mon, 21 Aug 2023 01:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63829 X-GNU-PR-Package: emacs Original-Received: via spool by 63829-submit@debbugs.gnu.org id=B63829.16925827072237 (code B ref 63829); Mon, 21 Aug 2023 01:52:01 +0000 Original-Received: (at 63829) by debbugs.gnu.org; 21 Aug 2023 01:51:47 +0000 Original-Received: from localhost ([127.0.0.1]:55113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXu55-0000a0-1K for submit@debbugs.gnu.org; Sun, 20 Aug 2023 21:51:47 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:37919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXu53-0000Zn-Do for 63829@debbugs.gnu.org; Sun, 20 Aug 2023 21:51:46 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 4ADFA32000E5; Sun, 20 Aug 2023 21:51:37 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 20 Aug 2023 21:51:37 -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=fm2; t= 1692582696; x=1692669096; bh=/zB84CY+7Y5kZgTVwmOKKfE7P/LwbK2QU/R bSbVyfiw=; b=JfMu1nDwTGa1KnzyCyRxAH0xPzM2zGW/X4VaLk2B/2YAuVPjcrW klgmYa7xxRyZvtnAFsMRF6FiqzJuBfbiCieWl3ovWyiOqFMsGcdPCaMUhcGGokNy r8qyBDWpMiyCRAeo79n/MZihDSVTCJ9wtno/mYKIxIGHHLYVbXLIqeoNQH6QNQLw a7qIdCOWQ9Q7ce7NxIMAfVlwt8RjfYO5qalnjJyjuCYY3qyxJ9MXPyFpzTNuZx5E 7N0NCw4W04zZKqNrcrT8zkg+2laYX3cyWMrZLPXbp4k5nUcm5a931DfDb2mbROgj d1aMauW+jKqkm4rP6qWwXV13Jn3afU0cd4Q== 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= 1692582696; x=1692669096; bh=/zB84CY+7Y5kZgTVwmOKKfE7P/LwbK2QU/R bSbVyfiw=; b=o/ePNapuGgnU0r4dGIso0vpdUcFFzVRGSqF8zH4k2KKHkFhc9ec jdH4j8KgCTFn2UR5/o2IrZP8DFmOv5djUdMtvLakUbdd6K38pjAYYFMI48hxh1+z UhUoaWtQQXb/bBYPCssjQrNk24HxMDzeSxpVCwxW1ZiayeOHeTZD5eKZY+lQX8LA CVJ/406H1vkWav+rRjAH7ZlBv0qG6OX5vloaMuwu7fIDuIwI8BB4DyUwgQjcl+RS HEhpgmh+oRShXuBWn33aJoGTT2NoRzi55USiev8YN+nZMD4qw5M4VEjSo5IT+/hu yMQJ07zaK6koynGEEgIhc6tKna+wGqL2t7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddukedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 20 Aug 2023 21:51:35 -0400 (EDT) Content-Language: en-US In-Reply-To: <871qfzi6mz.fsf@catern.com> 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:268053 Archived-At: On 19/08/2023 15:00, sbaugh@catern.com wrote: >> Regarding project-file-name-history-relativize, I wanted to ask about >> a shorter name, but... it seems like there aren't many to be had. >> >> Also originally I wanted to just enable the feature and then see what >> actual modifications people will want. Perhaps some will ask for >> find-file and project-find-file histories to be totally separate >> instead? Or maybe not. > > Sure, if it's something you think is reasonable to enable by default > that's totally fine for me. I'm being a tad skittish about it because once we add the var, it will likely have to stay around for a long time. And a long name is both unwieldy and less prone to extensibility. One of the ways to make it shorter, is to thing around different non-intersecting behaviors that could be enabled by it. If e.g. it could have values "default" (don't do anything) and "relativize" (and ... "relativize existing"? as Juri brought up), then the var could be called project-file-history-behavior with values t, 'relativize and 'relativize-existing. Or something like that. We could still drop the option for now and enable the new behavior by default, unless somebody objects. > A modification that makes some sense to me (although it's hard) is > actually to merge find-file and project-find-file history *more*. Right > now a path in the history can only be adjusted for the current project > if it was originally added to the history by project-find-file. It > might be nice if the adjustment worked for paths added by find-file too, > although that is tricky to do efficiently since they don't (yet?) have > the project embedded in them with a text property. I don't know, it seems like we'd do extra work up front, going through file-name-history, while most people won't take advantage of it. If we could do that lazily (with a generator function of some sort), that would of course be preferable. As it is, though, one could just run a small script once, and convert all the entries to use later. What's the scenario when this doesn't work? People using 'find-file' to quickly jump to a file in the same dir and then wanting to use it in history during project-find-file in another project?