oxr icon indicating copy to clipboard operation
oxr copied to clipboard

Add support for multiple files recursively

Open saiduc opened this issue 2 years ago • 1 comments

Great work on this package, I have been using it daily for a couple weeks

Thanks to #5 there is now some good basic support for +INCLUDE files. Specifically, if I have a similar format to:

├── main.org
├── section1.org
└── section2.org

And section1.org and section2.org are included in main.org as follows:

image

Then inside main.org I can use oxr-insert-ref to get suggestions for objects inside the included files. All seems great!

Feature Request

However, this is not complete functionality for multiple files.

Ideally, if I have broken my large document into sections, with each section having its own file, I would want to reference items from one section in another. i.e. if I run oxr-insert-ref inside section2.org, I would like it to display suggestions from section1.org

For this to work, there would need to be some way for a section*.org file to "know" it has been included in a main.org file and then grep the suggestions from that file, and any files included in that file recursively. Inside the section*.org files, it is possible to define #+SETUPFILE: main.org so perhaps that is the way for this to work?

saiduc avatar Mar 08 '23 14:03 saiduc

You can see some of the complexity I noted discussed in #6.

As I'm hinting there, would be nice from my POV ultimately for org to handle that kind of thing transparently.

bdarcus avatar Mar 08 '23 15:03 bdarcus