emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for feedback: ox-linuxmag


From: Ihor Radchenko
Subject: Re: Request for feedback: ox-linuxmag
Date: Fri, 28 Oct 2022 02:26:51 +0000

Damien Cassou <damien@cassou.me> writes:

> Hi Ihor,
>
> Ihor Radchenko <yantar92@posteo.net> writes:
>> I think :filter-final-output in :filters-alist will be more suitable.
>> It is called at the very end and may set some let-bound value to be
>> used in the ox-linuxmag-export-to-odt.
>
> I'm not really sure what you mean with the last sentence. In my last
> commit, I made use of :filter-final-output:
>
> https://github.com/DamienCassou/ox-linuxmag-fr/commit/195f154d5f76f50a94e4bdc95f27c8400e77992d
>
> (please note the new URL of the project reflecting its new name).
>
> As you can see, I didn't change ox-linuxmag-fr-export-to-odt. Do you
> suggest some changes there as well?

I think you misunderstood what I meant.

(Note that this particular suggestion is more about code style and
ensuring side-effect-free export if something fails).

The idea is that before org-export processed the Org buffers and
produces the final form of the converted output, nothing should touch
the filesystem. Otherwise, if the export process fails for some reason
(like user filter erring), some garbage may be produced and left on the
disk.

So, my suggestion is to set some transient data in your custom output
filter. Then, inside ox-linuxmag-fr-export-to-odt, you can reuse the
data to write all the necessary files on disk knowing that nothing
failed before.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]