From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55879: 29.0.50; Missing ALL argument in find-sibling-file Date: Fri, 10 Jun 2022 13:57:04 +0300 Message-ID: <83v8t8zszj.fsf@gnu.org> References: <83fskd136l.fsf@gnu.org> <86bkv1dj8r.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19051"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55879@debbugs.gnu.org, mardani29@yahoo.es To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 10 13:22:09 2022 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 1nzciO-0004mY-IS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 13:22:08 +0200 Original-Received: from localhost ([::1]:36232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzciN-0000U6-En for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 07:22:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzcL4-0001dF-4D for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 06:58:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzcL3-0001wG-Qs for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 06:58:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzcL3-000150-Px for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 06:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jun 2022 10:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55879 X-GNU-PR-Package: emacs Original-Received: via spool by 55879-submit@debbugs.gnu.org id=B55879.16548586344097 (code B ref 55879); Fri, 10 Jun 2022 10:58:01 +0000 Original-Received: (at 55879) by debbugs.gnu.org; 10 Jun 2022 10:57:14 +0000 Original-Received: from localhost ([127.0.0.1]:48965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzcKH-000141-VH for submit@debbugs.gnu.org; Fri, 10 Jun 2022 06:57:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzcKG-00013f-Br for 55879@debbugs.gnu.org; Fri, 10 Jun 2022 06:57:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzcKB-0001g8-02; Fri, 10 Jun 2022 06:57:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=MiFWfFetIbhgVA0JaY+IqU0MXr9pz6wnaQtAF7moatw=; b=ghNJgF/2p0/KRT64q3bO 7UhCYKy00Z8WFXhHkAwcpkJhFw8LtWazjt1m+9uMzbF69Xo7Kza6Td36ShqvrP62LQtcCRtepPVm2 kB9QYe4BNMGBX+SWl+fmrsNacMaj1jnF0gXbaQSy+8e3D43jwYqTP0Z0k5Ot5knQ3ZBvG/vG8tyKD LeOOd+/9b3jlT7zOjiODO1UfS3Glpbuc2p+N+xVZ9Xhs4CfKtB4sNcpiz7ZW5jcC6PVHWtoZgjRHX 4kAP0ueEbKanlaSfdZ3Wit9+QhFBFLVmZX5eueGoUf3H0nkj8Jwve+ZweoRFMZ2bvK2BMX3IQ5ted UgAg5bIgvm5hdQ==; Original-Received: from [87.69.77.57] (port=2652 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzcK9-00067P-GE; Fri, 10 Jun 2022 06:57:06 -0400 In-Reply-To: <86bkv1dj8r.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 10 Jun 2022 10:55:28 +0300) 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" Xref: news.gmane.io gmane.emacs.bugs:234217 Archived-At: > From: Juri Linkov > Cc: Daniel Martín , > 55879@debbugs.gnu.org > Date: Fri, 10 Jun 2022 10:55:28 +0300 > > >> Also, the Info documentation could reference ff-find-related-file when > >> it gives the example of going from the source file to the header file in > >> C files. > > > > I still think we should have extended ff-find-related-file instead of > > introducing a completely new facility with an incompatible UI. > > I started to use find-sibling-file and noticed that it's quite powerful > despite its simplicity. For example, with such configuration: > > dir1/.dir-locals-2.el: > ((nil . ((find-sibling-rules . (("src/[^/]+/\\(.*\\)\\'" > "src/dir2/\\1\\'")))))) > dir2/.dir-locals-2.el: > ((nil . ((find-sibling-rules . (("src/[^/]+/\\(.*\\)\\'" > "src/dir3/\\1\\'")))))) > dir3/.dir-locals-2.el: > ((nil . ((find-sibling-rules . (("src/[^/]+/\\(.*\\)\\'" > "src/dir1/\\1\\'")))))) > > it allows cycling between sibling files of three source trees > in the predefined order. I don't think I understand what "cycling" means in this context, let alone why it would make sense. If file A has a "related" file B, then file B should have file A as its related file, and any feature similar to these two should support this concept. If this concept is supported, then you can get from any file to any of its "siblings", in any order you like. > Can ff-find-related-file do the same? ff-find-related-file separates the directories to look in from the rules for basenames of the files, but other than that, these two features are equivalent. And please note that I said "extended", i.e. if ff-find-related-file doesn't support some use case, it should be extended to do so. I expect the extension to be simple enough, given the infrastructure that already exists.