Ihor Radchenko <[email protected]> writes:
> I can, indeed, avoid the error, by setting image store dir to be, say,
> /tmp/, but what will it achieve other than not throwing runtime error?
> org-mime will be broken in such scenario - the inline fragment won't be
> rendered in the results html email.

I don't think org-mime breaks by doing this, actually. After all, it creates 
transient html snippets that are meant to be sent by email right away. So (I 
tried this successfully) by setting the backup image store dir to (say) 
"/tmp/", org-mime successfully creates the html snippet, correctly caching the 
image fragment within /tmp/ and creating the email to be sent. If it is sent 
right away, no problem. But yes, non-transient html files will break if the 
/tmp/ directory gets flushed.

If the info plist of org-html-format-latex does contain the :output-file 
property, then by all means its directory should be used, and there is no 
problem. But should it throw an error if the info plist does not contain this 
property? See below.

> So, I am thinking that the best approach will be still throwing a
> runtime error, although more descriptive.

Maybe yes. I am happy to try and modify org-mime instead to pass the 
:output-file property when it calls org-html-format-latex.

But it seems to me that there is still the following problem in ox-html.el. The 
documentation of org-html-format-latex does not make it clear that its last 
argument, the info plist, *has to* contain the property :output-file in order 
to avoid a runtime error!

The further heart of the matter is the weird behaviour of file-name-directory: 
in particular, running (file-name-directory "") gives nil, while running 
(file-name-directory nil) throws an error. I don't understand why those two 
calls should behave differently.

Anyway, because of this issue, an unsuspecting external call to 
org-html-format-latex is doomed to fail. Because it probably won't explicitly 
include :output-file in its info plist. This does not seem good!

Best regards,
Asilata

-- 
Asilata Bapat (she/her)

Attachment: signature.asc
Description: PGP signature

Reply via email to