Subject: Re: bug#55879: 29.0.50; Missing ALL argument in find-sibling-file

From: Daniel Martín <[email-masked]>
Date: Sun, 12 Jun 2022 01:53:31 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> Jose A Ortega Ruiz <[email-masked]> writes:
>
>> I was thinking of reusing the sibling files mechanism programmatically,
>> outside the mere "find a single file" scenario.  For instance, i have a
>> few functions that associate a list of note org files to a single pdf,
>> and i might want to display them all (perhaps in other window), or add
>> text to one of them (with the decision of which one taken
>> programmatically, depending on context)... For cases like that, i would
>> start with the result of obtaining the list of siblings inside my
>> commands, and find-sibling-file--search looked like the function doing
>> that.
>
> find-sibling-file--search is there to find matches in the
> `find-sibling-rules' variable, which is a user option, and returns
> values in an order that's appropriate for the commmand.  It sounds like
> you want something slightly different, really -- pass in the rules,
> perhaps?  But I'm not sure that really makes that much sense, either,
> because associating org files with a pdf sounds like something you'd
> want a data file for, really...

I think decoupling the computation of the list of siblings for a given
file and the action to perform on them (find-file for now) may be a good
idea.  That would offer programmatic access to extensions or user
customizations that want to do things to sibling files other than
visiting them.  If I'm not mistaken, this is what José is interested
about.