emacs-orgmode
[Top][All Lists]
Advanced

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

[O] why prepend "file://" to abs paths in html output?


From: Matt Price
Subject: [O] why prepend "file://" to abs paths in html output?
Date: Fri, 7 Jul 2017 20:38:12 -0400

in org-html-link local links of the form

"/some/path/to/file"

are rewritten as

"file:///some/path/to/file". 

This makes it difficult to write root-relative URL's in the way that one might expect to be able to (so that export produces links like

<img src="">

Is this really the most desirable behaviour? In html export, at least, I would think most users would want to allow links of the kind I described. But this seems like a conscious design decision; cf. these lines from org-html-link:

        ;; If file path is absolute, prepend it with protocol
        ;; component - "file://".
        (cond
         ((file-name-absolute-p raw-path)
          (setq raw-path (org-export-file-uri raw-path)))
         ((and home use-abs-url)
          (setq raw-path (concat (file-name-as-directory home) raw-path))))

I'm wondering whether a user oculd at least set a defcustom to control this behaviour.

Thanks,
Matt


reply via email to

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