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 19:39:24 +0300 Organization: LINKOV.NET Message-ID: <86v8t8blnf.fsf@mail.linkov.net> References: <83fskd136l.fsf@gnu.org> <86bkv1dj8r.fsf@mail.linkov.net> <83v8t8zszj.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="23465"; 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, mardani29@yahoo.es To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 10 18:45:57 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 1nzhlj-0005sp-QK for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 18:45:55 +0200 Original-Received: from localhost ([::1]:40954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzhli-0001kh-Bv for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 12:45:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzhkt-0000o9-Qs for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 12:45:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzhkt-0004NW-Hy for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 12:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzhkt-0003yq-Gd for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 12: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 16: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.165487949315239 (code B ref 55879); Fri, 10 Jun 2022 16:45:03 +0000 Original-Received: (at 55879) by debbugs.gnu.org; 10 Jun 2022 16:44:53 +0000 Original-Received: from localhost ([127.0.0.1]:51126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzhkj-0003xj-Gr for submit@debbugs.gnu.org; Fri, 10 Jun 2022 12:44:53 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:49989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzhke-0003xD-VZ for 55879@debbugs.gnu.org; Fri, 10 Jun 2022 12:44:49 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id B5A221BF206; Fri, 10 Jun 2022 16:44:40 +0000 (UTC) In-Reply-To: <83v8t8zszj.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 10 Jun 2022 13:57:04 +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:234234 Archived-At: >> 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. Cycling is visiting siblings in the defined order such as dir1 -> dir2 -> dir3 -> dir1 -> ... > 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. find-sibling-file supports more than 2 siblings, i.e. triplets and more. >> 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. I have no opinion about extending find-file.el, but when looking at it, it strikes as too complicated, so extending will make it complicated even more.