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 03:37:23 +0300 Message-ID: <0534118b-0ba1-1279-7bcf-4cdc7a3b5606@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> <86a5ulls6z.fsf@mail.linkov.net> <96d3e02d-324b-7cd3-b271-3b67153ada16@gutov.dev> <86ttssan7o.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="37612"; 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 02:38: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 1qYbt2-0009Yg-FL for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Aug 2023 02:38:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYbso-0004o0-CL; Tue, 22 Aug 2023 20:38:02 -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 1qYbsm-0004m7-EK for bug-gnu-emacs@gnu.org; Tue, 22 Aug 2023 20:38: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 1qYbsl-0001te-2f for bug-gnu-emacs@gnu.org; Tue, 22 Aug 2023 20:38:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYbso-0008Th-3o for bug-gnu-emacs@gnu.org; Tue, 22 Aug 2023 20:38: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 00:38: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.169275105732552 (code B ref 63829); Wed, 23 Aug 2023 00:38:02 +0000 Original-Received: (at 63829) by debbugs.gnu.org; 23 Aug 2023 00:37:37 +0000 Original-Received: from localhost ([127.0.0.1]:60667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYbsO-0008Sx-NO for submit@debbugs.gnu.org; Tue, 22 Aug 2023 20:37:37 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:33981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYbsM-0008Si-D4 for 63829@debbugs.gnu.org; Tue, 22 Aug 2023 20:37:35 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 299B15C01EB; Tue, 22 Aug 2023 20:37:26 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 22 Aug 2023 20:37:26 -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= 1692751046; x=1692837446; bh=9GILqBF1+5RlolnXuWOE7WWbSNeYNSojhwc OPzXCbIQ=; b=TORgpRXuqk8e3k6IiAoU9fsM1KqHbdnOaZbrsJKrt4SN6sf8SFp 50GsfHvNezZmtjo5qiAD3XZVl/yDrNanU4WxYBFuPIfKtg4odXg/oC57kG5E/ry+ sAI3spit4tJbYyWFTSJjiRi2Q05xHihUpxuZGw/6NNqPXNCd4XGIBBkAsXXSNlGq Uy1yrFW6Tkqmc+Uf9DoeoFkFT3Zp8NbYcLqaLwcdVffwg59I/fRtdam8hkfseSLr FKGXStM/Mn55h5V7Keh/8AJuBl2xwkw5VgHK5+zVeZ7KBoCWLmnartlpzTjN361g M8EmmZyzQUHmPk9fBt/eLCw+yEa/w0WJxxQ== 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= 1692751046; x=1692837446; bh=9GILqBF1+5RlolnXuWOE7WWbSNeYNSojhwc OPzXCbIQ=; b=qpUwpFiHEZnSIDnB/gEp1yAonAt0wUQmzErPoo3GFvgc6SBw4w1 7MzEEmDHcUqaDR78asn/PlnS/JZ7WnA9qTeg2/apsVf7lsQfEa41Kim6sRdlZkLd 76/LxutRbi7omc7fvnChJ9UMKTUDnEKKrssxxE4IP0kJlRZTgK2fJ3xdVoAToir4 +3Wz/9tb+1/G2NUrRqHgF94Vs6ltccyukggvYmiqLIomCXqM+82kXbOjkGrrBJ7s FOOAzUxGbzrACYePZiDEIlRUJS9wG9LKQKfktNSKBlx1YbBWbhCaJvw6ryIEGLy3 xqYwjZ9vLelGrfPFpbkNnl1aq0Kg+wKd/Sg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddvvddgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 22 Aug 2023 20:37:24 -0400 (EDT) Content-Language: en-US In-Reply-To: <86ttssan7o.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:268197 Archived-At: On 21/08/2023 10:06, Juri Linkov wrote: >>>> +(defcustom project-file-name-history-relativize nil >>>> + "If non-nil, paths in `file-name-history' are adjusted for the current project. >>>> + >>> Instead of, or in addition to 'project-file-name-history-relativize', >>> another option may be needed to define whether to check the >>> existence of the constructed file name. This could help >>> to filter out irrelevant file names constructed from >>> different projects. >> >> It could indeed. But it could also prevent the user from easily creating >> a new file with the name from a "sister" project. > > It would be unfortunate to lose this useful feature. > >> We've discussed this before in this thread, including the idea of some >> predicate checking the projects for compatibility, etc. What behavior would >> you actually choose yourself? > > I guess introducing a notion of "sibling projects" is unavoiable > to exclude such situations where relative file names from one project > are proposed in an unrelated project: > > Find file in /project/root/: relative/filename/from/unrelated/project > > Then one possibility is to add an option to define sibling projects. > Like 'find-sibling-rules', but maybe simply to contain alists of > sibling projects. Or projects in 'project--list' could have > a new property 'group' where a project belongs to. > > Then sibling projects could share the common file history. > > And a new command e.g. 'project-find-sibling-file' could > jump to a sibling project file immediately in case of > two sibling projects, or ask to select with completion > for more projects. That would require a new generic (project-sibling-projects) and a proper description of what a "sibling" project is supposed to be. And probably still not going to work for VC-aware backend OOTB (it'll require some backend specific hook for the users to define that logic). Sounds a little complicated, so given that one can still reach almost the same functionality through history completion ('C-x p p ... RET f C-n RET'), maybe it's a bit of an overkill? I'm open to further arguments, though.