* Using org-export-get-reference for strings
@ 2017-03-30 17:33 Mark Meyer
2017-04-01 8:16 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Mark Meyer @ 2017-03-30 17:33 UTC (permalink / raw)
To: emacs-orgmode
Hi list,
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?
Cheers, Mark
--
Mark Meyer
mark@ofosos.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Using org-export-get-reference for strings
2017-03-30 17:33 Using org-export-get-reference for strings Mark Meyer
@ 2017-04-01 8:16 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-04-01 8:16 UTC (permalink / raw)
To: Mark Meyer; +Cc: emacs-orgmode
Hello,
Mark Meyer <mark@ofosos.org> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-01 8:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-30 17:33 Using org-export-get-reference for strings Mark Meyer
2017-04-01 8:16 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).