diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-01-29 19:31:03 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-01-29 19:31:03 +0100 |
commit | f7a1e23d208351b1a4ce5fdbc31b6be8efdede66 (patch) | |
tree | e9e25875c57f773b792960de4774a251956ffd25 | |
parent | a1f54021c95a12172e7b44a838ab2f370ca41e52 (diff) | |
download | org-mode-f7a1e23d208351b1a4ce5fdbc31b6be8efdede66.tar.gz |
ox-org: Allow custom export for links
* lisp/ox-org.el (org-org-link): New function.
This patch allows to handle `org' export format in EXPORT argument
from `org-add-link-type'.
Suggested-by: John Kitchin <johnrkitchin@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94439>
-rw-r--r-- | lisp/ox-org.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ox-org.el b/lisp/ox-org.el index e69163f..5f2d126 100644 --- a/lisp/ox-org.el +++ b/lisp/ox-org.el @@ -78,7 +78,7 @@ setting of `org-html-htmlize-output-type' is 'css." (latex-environment . org-org-identity) (latex-fragment . org-org-identity) (line-break . org-org-identity) - (link . org-org-identity) + (link . org-org-link) (node-property . org-org-identity) (template . org-org-template) (paragraph . org-org-identity) @@ -142,6 +142,13 @@ CONTENTS is nil. INFO is ignored." "OPTIONS" "TITLE")) (org-element-keyword-interpreter keyword nil)))) +(defun org-org-link (link contents info) + "Transcode LINK object back into Org syntax. +CONTENTS is the description of the link, as a string, or nil. +INFO is a plist containing current export state." + (or (org-export-custom-protocol-maybe link contents info) + (org-element-link-interpreter link contents))) + (defun org-org-template (contents info) "Return Org document template with document keywords. CONTENTS is the transcoded contents string. INFO is a plist used |