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: Sat, 3 Jun 2023 16:48:55 +0300 Message-ID: <9406d283-967a-85c6-d8db-5b9c9912a46f@gutov.dev> References: <83r0qubbtk.fsf@gnu.org> <2790cb95-cfc8-40ee-2a89-d9effe2c2060@gutov.dev> <83o7lw90ev.fsf@gnu.org> 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="15673"; 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: sbaugh@janestreet.com, 63829@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 03 15:50:12 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 1q5Rdz-0003qi-4Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Jun 2023 15:50:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5Rdt-0008G7-DQ; Sat, 03 Jun 2023 09:50:05 -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 1q5Rdq-0008Bl-1o for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 09:50: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 1q5Rdp-0008VU-MQ for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 09:50:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5Rdp-00038Q-IF for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 09:50: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: Sat, 03 Jun 2023 13:50: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.168580014711979 (code B ref 63829); Sat, 03 Jun 2023 13:50:01 +0000 Original-Received: (at 63829) by debbugs.gnu.org; 3 Jun 2023 13:49:07 +0000 Original-Received: from localhost ([127.0.0.1]:41907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5Rcw-000378-KW for submit@debbugs.gnu.org; Sat, 03 Jun 2023 09:49:07 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:53231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5Rct-00036W-PE for 63829@debbugs.gnu.org; Sat, 03 Jun 2023 09:49:05 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 953FB5C018A; Sat, 3 Jun 2023 09:48:58 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 03 Jun 2023 09:48:58 -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= 1685800138; x=1685886538; bh=MqbgvtuvYosDSwPcO7t3g2cpiLjuHFCz2+H EhRBO+5g=; b=CzTehn//FKfOIDVmy8KwyjVHgNqpOzV3iOS/6Rru10mUSiE56DM LfBlmoN5h2tynyt4SeLKz3i0di6ASrGPsHfTcGkBmSrDoLC0C/kb7SCJDOWLi1ha DU62K5FFqo3zqjVxj50IR0N6zt7V5C3cxfLILnnofceMotQ+47Pd5b662wk8QBia agZx0O8jmXpHWBnUpDRORJ0cHgNgoenx8U7oj7uPARDqxOzpCBSdwX6wEnjUc85o HTpRvGOGIrnGW6hu5+e/PTeZhgHGiWQJ5eHsA2caOC3yQZ9JeMCjHGj9tfL0GhQ5 s5c013k7MqyPc/deh+UJJ+n/foD/1lRNKgg== 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= 1685800138; x=1685886538; bh=MqbgvtuvYosDSwPcO7t3g2cpiLjuHFCz2+H EhRBO+5g=; b=LPIdiXj7CFvFVm5gdDoUBbnSjU7qm5VJ5P9tNTgcbxjGd9LFu8C GSzxu7pmCvEq+sIzQgrA5iwO1wCBWnMCWO3Bl5JYZj3KNdyk8ESjbLAdu7FpZd2L y8/BJDpaFAzH0uE9sdY4XGdB/8LI3cHEropYk9Mq9CIYGwueTVZ85TbQCAmPkvdD aK4Rrdu6BJNssSK2llK7CPTCfFH2HdF9KuwsA/VF0H6pOvw+enDNrZQX3jxuCs56 0W4gXXrwBsEpp7OK6hoR76rBRmKb/KUOQLZu3iam4Ki3B5BZaO6ZIBCTz4cLvAJU P/hGYIG1S46HB1tuQ1OCKaWb0f33iqBSliQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelhedgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 3 Jun 2023 09:48:57 -0400 (EDT) Content-Language: en-US In-Reply-To: <83o7lw90ev.fsf@gnu.org> 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:262840 Archived-At: On 03/06/2023 15:48, Eli Zaretskii wrote: >> Do you like the patch I posted? It could be considered somewhere in that >> direction. > > I don't know enough about the details to have opinion of any > importance. But if the change goes in the direction I thought we > should go, then that's good. > >> Should it go to emacs-29 or master? > > Unless this is a bad problem, I'd prefer that the change goes to > master. Maybe it's not too serious, given that it requires the user to invoke "future history" (not everybody knows of it), and for the project to have all files in one subdirectory. >>>> (As a separate point: I ran into this while adding a feature for >>>> switching between projects with similar directory structures. I want to >>>> include the relative path in the starting project in the "future >>>> history", so that when you have a file in projectA open, you can switch >>>> to the same file in projectB with C-x p p f M-n RET. For example, >>>> switching between the same file in multiple clones of Emacs. But sadly >>>> the future history doesn't work properly right now even in a single >>>> project) >>> >>> Once again, this should work by using the right value of >>> default-directory; having relative filenames in the history up front >>> is not TRT. Relative file names in Emacs are always interpreted >>> relatively to default-directory, so if you start using relative names >>> disregarding default-directory, you will eventually run into trouble, >>> as various file-related primitives will fail with ENOENT. >> >> The problem here is that is a different/new scenario where Spencer wants >> to have a file name from one project be applied to another project. It >> seems like using absolute names would rather go in the opposite direction. > > If some command wants to produce file names in a different directory, > then that command should do something like > > (expand-file-name (file-name-nondirectory FILENAME) NEW-DIRECTORY) > > The code which produces the original FILENAME should still produce an > absolute file name (or record its directory in some other way); it > should not know/assume anything about potential uses of that file > name. Sounds like Spencer's last patch. It's not too great that we'll make project-find-file aware of project-current-directory-override, though.