Re: [O] ox-hugo-like "DWIM" cope for other exporters?
Hello, Kaushal Modi writes: > @Nicolas: If this another scope can be baked into the existing exporters in > Org source, I can get working on it. Sure, go ahead. Don't forget the tests :) Regards, -- Nicolas Goaziou
Re: [O] ox-hugo-like "DWIM" cope for other exporters?
On Sat, Sep 29, 2018 at 8:23 PM Thomas S. Dye wrote: > Aloha Matt, > > I've often wished LaTeX export had this capability. I'd certainly be > happy if this were a feature of all the exporters. > Hello Tom, Matt, I can work on a DWIM scope that's generic. For ox-hugo, the criteria for the start of export scope is simple: EXPORT_FILE_NAME must not be "". I believe this should apply to other exporter backends too. (I needed, that criteria can be made configurable too). @Nicolas: If this another scope can be baked into the existing exporters in Org source, I can get working on it.
[O] ox-hugo-like "DWIM" cope for other exporters?
Aloha Matt, I've often wished LaTeX export had this capability. I'd certainly be happy if this were a feature of all the exporters. All the best, Tom
[O] ox-hugo-like "DWIM" cope for other exporters?
Kaushal's ox-hugo includes a "Do what I mean" scope which is different from other exporters I've seen. It goes up the heading tree looking for a heading with the "export_file_name" property set, and exports from there, or if it doesn't find one, from the whole file. The code is here: https://github.com/kaushalmodi/ox-hugo/blob/2be4bc02629bee8848f868fdfc35d9904a82d53a/ox-hugo.el#L3581 I find this feature incredibly useful, and I've copied the function to work with ox-reveal as well. For both of these export formats, I tend to write iteratively, checking the appearance of the rendered document as I go. Though it's not particularly difficult to move traverse the org-document before calling the export dispatcher and choosing the subtree scope, it takes some mental effort and tends to distract me from writing. Kaushal's code really helps me with that slight relief of mental burden. I've just been sitting here wondering if this scope would be worth introducing at a more basic level, so that it could be available to a wider set of exporters. Have other people been making use of it? What do you think? Thanks, Matt