From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov 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 10:06:35 +0300 Organization: LINKOV.NET Message-ID: <86ttssan7o.fsf@mail.linkov.net> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5699"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: Spencer Baugh , 63829@debbugs.gnu.org, sbaugh@catern.com To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 21 09:26:10 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 1qXzIf-0001HH-QU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Aug 2023 09:26:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXzIX-00049J-PJ; Mon, 21 Aug 2023 03:26: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 1qXzIW-00047B-Bk for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2023 03:26: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 1qXzIW-000384-2t for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2023 03:26:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXzIY-0001Ng-49 for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2023 03:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Aug 2023 07:26: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.16926027305247 (code B ref 63829); Mon, 21 Aug 2023 07:26:02 +0000 Original-Received: (at 63829) by debbugs.gnu.org; 21 Aug 2023 07:25:30 +0000 Original-Received: from localhost ([127.0.0.1]:55362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXzI1-0001MX-LY for submit@debbugs.gnu.org; Mon, 21 Aug 2023 03:25:29 -0400 Original-Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]:57925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXzHz-0001Ly-82 for 63829@debbugs.gnu.org; Mon, 21 Aug 2023 03:25:27 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 3D44720003; Mon, 21 Aug 2023 07:25:17 +0000 (UTC) In-Reply-To: <96d3e02d-324b-7cd3-b271-3b67153ada16@gutov.dev> (Dmitry Gutov's message of "Mon, 21 Aug 2023 04:43:56 +0300") X-GND-Sasl: juri@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:268063 Archived-At: >>> +(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.