all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 55879@debbugs.gnu.org, mardani29@yahoo.es
Subject: bug#55879: 29.0.50; Missing ALL argument in find-sibling-file
Date: Fri, 10 Jun 2022 13:57:04 +0300	[thread overview]
Message-ID: <83v8t8zszj.fsf@gnu.org> (raw)
In-Reply-To: <86bkv1dj8r.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 10 Jun 2022 10:55:28 +0300)

> From: Juri Linkov <juri@linkov.net>
> Cc: Daniel Martín <mardani29@yahoo.es>,
>   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.





  reply	other threads:[~2022-06-10 10:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1r13xbk8d.fsf.ref@yahoo.es>
2022-06-09 21:27 ` bug#55879: 29.0.50; Missing ALL argument in find-sibling-file Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-10  5:46   ` Eli Zaretskii
2022-06-10  7:55     ` Juri Linkov
2022-06-10 10:57       ` Eli Zaretskii [this message]
2022-06-10 16:39         ` Juri Linkov
2022-06-10  9:49   ` Lars Ingebrigtsen
2022-06-10 16:18     ` Jose A Ortega Ruiz
2022-06-11 10:58       ` Lars Ingebrigtsen
2022-06-11 13:00         ` Jose A Ortega Ruiz
2022-06-11 16:09           ` Lars Ingebrigtsen
2022-06-11 21:23             ` Jose A Ortega Ruiz
2022-06-12 10:10               ` Lars Ingebrigtsen
2022-06-13  1:21                 ` Jose A Ortega Ruiz
2022-06-11 23:53             ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83v8t8zszj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=55879@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=mardani29@yahoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.