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#55879: 29.0.50; Missing ALL argument in find-sibling-file Date: Fri, 10 Jun 2022 10:55:28 +0300 Organization: LINKOV.NET Message-ID: <86bkv1dj8r.fsf@mail.linkov.net> References: <83fskd136l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9995"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 55879@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 10 12:18:01 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 1nzbiK-0002JH-Pp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 12:18:00 +0200 Original-Received: from localhost ([::1]:41136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzbiJ-0005Ok-2d for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 06:17:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzaGO-0007Sd-T7 for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 04:45:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54766) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzaGN-0004YS-HX for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 04:45:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzaGN-0003YJ-GR for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 04:45:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jun 2022 08:45:03 +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.165485068613592 (code B ref 55879); Fri, 10 Jun 2022 08:45:03 +0000 Original-Received: (at 55879) by debbugs.gnu.org; 10 Jun 2022 08:44:46 +0000 Original-Received: from localhost ([127.0.0.1]:48659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzaG6-0003X4-2f for submit@debbugs.gnu.org; Fri, 10 Jun 2022 04:44:46 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:53269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzaFu-0003WQ-LZ for 55879@debbugs.gnu.org; Fri, 10 Jun 2022 04:44:36 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 2725E100011; Fri, 10 Jun 2022 08:44:26 +0000 (UTC) In-Reply-To: <83fskd136l.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 10 Jun 2022 08:46:10 +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:234201 Archived-At: >> 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. Can ff-find-related-file do the same?