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: Tue, 25 Oct 2022 08:02:49 +0000

Damien Cassou <damien@cassou.me> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>> Why not using org-export-define-derived-backend?
>
> I didn't know this function exist. I changed the code to use it.

See A.4 Adding Export Back-ends section in Org manual ;)

>> Also, linuxmag might be confused with…
>
> What do you think about ox-linuxmag-fr as package name and linuxmag-fr
> as exporter name?

Sounds more accurate.

>>> (defconst ox-linuxmag--resources-dir
>>>   (expand-file-name "resources" (file-name-directory (or load-file-name 
>>> (buffer-file-name))))
>>>   "Directory containing the style and template XML files.")
>>
>> This will spoil the installation dir.
>
> What do you mean by that? Do you have a different way to do it? The odt
> exporter contains a similar variable and external files (see
> `org-odt-lib-dir`).

You are right. I somehow thought that you are writing to that directory.

>> Your template function has side effects. Side effects are usually
>> implemented inside the export function. like ox-linuxmag--export-to-odt
>
> I guess you are referring to `ox-linuxmag--write-meta-file` and
> `ox-linuxmag--write-styles-file`. I would be happy to move them to the
> export function but they depend on `info` and I don't know how to get
> that from there. Also, I copy/pasted the structure of ox-odt which does
> something similar in `org-odt-template`.
>
> Any recommendation?

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.

-- 
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]