diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-11-26 11:02:14 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-11-26 11:02:14 +0100 |
commit | 579fa12f50ca2381a584acf0a7da988887143719 (patch) | |
tree | ef441d8775784eaede0cd4096d1be46e7dd51c12 | |
parent | b186d1d7236c0dc397eadeb004c9a17eaffd3aab (diff) | |
parent | ac4b756588b0809e3a2e13706cac6fa7279c230d (diff) | |
download | org-mode-579fa12f50ca2381a584acf0a7da988887143719.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org.el | 4 | ||||
-rw-r--r-- | lisp/ox-html.el | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lisp/org.el b/lisp/org.el index 861ce31..4081744 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -184,7 +184,8 @@ Stars are put in group 1 and the trimmed body in group 2.") (declare-function org-export-get-environment "ox" (&optional backend subtreep ext-plist)) (declare-function org-latex-make-preamble "ox-latex" (info &optional template snippet?)) -(defvar ffap-url-regexp) ;Silence byte-compiler +(defvar ffap-url-regexp) +(defvar org-element-paragraph-separate) ;; load languages based on value of `org-babel-load-languages' (defvar org-babel-load-languages) @@ -22260,7 +22261,6 @@ assumed to be significant there." ;; `org-setup-filling' installs filling and auto-filling related ;; variables during `org-mode' initialization. -(defvar org-element-paragraph-separate) ; org-element.el (defun org-setup-filling () (require 'org-element) ;; Prevent auto-fill from inserting unwanted new items. diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 0030a77..0e22c16 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2940,10 +2940,7 @@ images, set it to: DESC is the description part of the link, or the empty string. INFO is a plist holding contextual information. See `org-export-data'." - (let* ((home (when (plist-get info :html-link-home) - (org-trim (plist-get info :html-link-home)))) - (use-abs-url (plist-get info :html-link-use-abs-url)) - (link-org-files-as-html-maybe + (let* ((link-org-files-as-html-maybe (lambda (raw-path info) ;; Treat links to `file.org' as links to `file.html', if ;; needed. See `org-html-link-org-files-as-html'. @@ -2971,8 +2968,13 @@ INFO is a plist holding contextual information. See (org-publish-file-relative-name raw-path info))) ;; Possibly append `:html-link-home' to relative file ;; name. - (unless (file-name-absolute-p raw-path) - (setq raw-path (concat (file-name-as-directory home) raw-path))) + (let ((home (and (plist-get info :html-link-home) + (org-trim (plist-get info :html-link-home))))) + (when (and home + (plist-get info :html-link-use-abs-url) + (file-name-absolute-p raw-path)) + (setq raw-path (concat (file-name-as-directory home) raw-path)))) + ;; Maybe turn ".org" into ".html". (setq raw-path (funcall link-org-files-as-html-maybe raw-path info)) ;; Add search option, if any. A search option can be ;; relative to a custom-id, a headline title, a name or |