emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Using org-export-get-reference for strings


From: Nicolas Goaziou
Subject: Re: [O] Using org-export-get-reference for strings
Date: Sat, 01 Apr 2017 10:16:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hello,

Mark Meyer <address@hidden> writes:

> In ox-epub I'm using several references to external stylesheets,
> starting with the external name in the user filesystem I transform
> these into a kind-of unique id that lives in the EPUB zip file.
>
> Currently I'm doing this using a counter, generating zip entries in the
> form of style-1.css. Can I use `org-export-get-reference' to generate
> these ids? I would likely pass a simple string as the object to get a
> reference to (the path the external stylesheet lives at).
>
> From what I understand this would generate different references for
> `foobar.css' and `../foobar.css' even when these are identical
> documents. This should be fixed by passing `(expand-file-name style)' to
> `org-export-get-reference'.
>
> I'm not quite sure I understand `org-export-get-reference' correctly,
> can you elucidate this?

`org-export-get-reference' is meant to return a unique identifier for
objects in the parse tree. You cannot really use it for strings, as the
comparison is done with `eq', unless the strings are part of the parse
tree.


Regards,

-- 
Nicolas Goaziou



reply via email to

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