atom-asciidoc-preview icon indicating copy to clipboard operation
atom-asciidoc-preview copied to clipboard

Watch for changes on included files as well.

Open bwklein opened this issue 8 years ago • 3 comments

I have a book where there is a top level adoc file that sets many document parameters and then includes chapters like include::chap0001.adoc[] and so on.

To see everything in all of the chapters rendered correctly I have to preview the top level document so that the document attributes apply to the included content.

When I am previewing the top level everything includes and looks great. But, if I make a change to one of the chapter documents, the top level preview isn't updated, because it doesn't detect that one of the included files has been updated and that it should refresh.

The feature request is to enable the previewing package to watch for file changes on all included documents in a previewed document.

bwklein avatar May 13 '16 18:05 bwklein

I agree. It's possible to get a list of files that a document includes from the API. It's available from the Document#references[:includes] API (type: Set) after the Document is loaded. These entries are relative to the base directory. Unfortunately, the file extension is stripped, so we have to assume that all the include files use the same file extension as the master document.

mojavelinux avatar May 13 '16 19:05 mojavelinux

I was just about to post an RFE for this feature, too :)

Unfortunately, the file extension is stripped, so we have to assume that all the include files use the same file extension as the master document.

I think that's a pretty reasonable expectation.

lucascosti avatar Jun 12 '16 09:06 lucascosti

This is extremely important when editing large documents that need to be separated into different files for organization.

I personaly think that having the preview update everytime an included file is updated is a must not to break the flow of the writter.

ManuelLevi avatar Sep 29 '20 11:09 ManuelLevi