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: Wed, 23 Aug 2023 21:25:58 +0300 Message-ID: <6f19838d-b7c8-4047-6532-37adc1701812@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> <861qfty6ul.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="19344"; 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 , 63829@debbugs.gnu.org, sbaugh@catern.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 23 20:27:13 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 1qYsZT-0004la-GD for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Aug 2023 20:27:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYsZJ-0001tF-El; Wed, 23 Aug 2023 14:27: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 1qYsZH-0001sN-3G for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 14:26:59 -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 1qYsZG-000838-R0 for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 14:26:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYsZK-0006dW-Ak for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 14:27: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, 23 Aug 2023 18:27:02 +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.169281517525455 (code B ref 63829); Wed, 23 Aug 2023 18:27:02 +0000 Original-Received: (at 63829) by debbugs.gnu.org; 23 Aug 2023 18:26:15 +0000 Original-Received: from localhost ([127.0.0.1]:35180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYsYZ-0006cU-3R for submit@debbugs.gnu.org; Wed, 23 Aug 2023 14:26:15 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYsYU-0006cD-Np for 63829@debbugs.gnu.org; Wed, 23 Aug 2023 14:26:13 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B9F315C005F; Wed, 23 Aug 2023 14:26:01 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 23 Aug 2023 14:26:01 -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= 1692815161; x=1692901561; bh=1+fnpw2qRDrD5Q/bt94ClmW+XWKjHqzvnHp 0c+zC0jc=; b=CTBByg7UQ7e7IrGp5iwa3fuuTgVdMB+yhua67uW3Q+DZpFbB5Oq /sZ0tvp8HZPoCLROY3taBV/sNiVs+8JAeGEORhJHDc1SMfRSutLfSUtVf8eH22tz yr+SUY5f3BBANSYS1H/GswXdzmaQt34+pwqjdc8a2o6ZjJHGX38aiw6LEI1LsvD8 f/yY/VYTa9PWOPKaFwEW8DMo6V1ZO6T1TXlKLyMme7X6BcKNhGSjQowsEW83ZsLK m4tnhoDJRTZHFVHFiybtJF7bRemglTPQD8vmG5VvdJ9nONPmimoRl4Emaruolu8C 3qPkWxPOc3TBHBuXtGnUJNm55JljNUStRZQ== 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= 1692815161; x=1692901561; bh=1+fnpw2qRDrD5Q/bt94ClmW+XWKjHqzvnHp 0c+zC0jc=; b=J9LeMVE1YaKYSactA6zeu4xCX5hIjqbufs4JAckyGG6F3//VuZq o017P3vqrAFwni7zjmQ/POcW4Y3Ge/67t62xF7kS35uqrIMy1vyND6R2oVfYRwCj cdievAIhA4RXz8bLJYpVE32dka0NCq1ymboDrPcXil6xNVf5mcjQlsD9FJLWTxnQ cfRcAw8YWRqZ6EbJW71GIKuEa4z12lmz++3TV0qWOdoKw4LyNdzTLVEJ5boZ9n8S dvJbSIAj1w5Qdro+Kt+rVQ76c92HSr0cCIyVXTVKnEUNR83B5ororJX1Df9S39iU TcgwN2pux7wjyyobR5vffNLEHv+DxOwlyqA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddvgedguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Aug 2023 14:26:00 -0400 (EDT) Content-Language: en-US In-Reply-To: <861qfty6ul.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:268269 Archived-At: On 23/08/2023 20:52, Juri Linkov wrote: >> - The new option renamed to project-file-history-behavior with values t or >> 'relativize. I thought about removing it, but after all, the change is >> a bit exotic, so there's bound to be people who would want to disable >> it. And the new name is also more extensible (extra behaviors I could >> think of by now: 'relativize-when-exists or 'separate -- the latter could >> mean to use separate history var other than file-name-history). No hurry >> to implement any of those, though. >> - project-or-external-find-file needs some special handling of the >> relativization when external file names are chosen. Better solutions >> welcome. >> - Announcement in NEWS. :-) > > A typo in NEWS? 'relative' -> 'relativize' Fixed, thanks. > Also to reduce confusion for everyone who will look at it, > better to rename the property to 'project-root' in: > > (propertize file 'project (project-root project)))) It seemed shorter and just as obvious when looking at the propertized value. But if everyone thinks the change should be made, I don't mind. > PS: The docstring mentions the limitation: "This only affects > history entries added by earlier calls to `project-find-file'". > There is no way to remove this limitation? Maybe some clever way > to match every file name from the history against the list > of all known project roots to find the root on the file name > without property. This will also work when the file history > is restored from the desktop file or by savehist.el. That is doable, at the cost of having imprecise results (and some odd-looking history entries from time to time). Is that cost low enough?