summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-04-04 20:35:05 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2013-04-04 20:38:36 +0200
commit735bb251b1826c8eb10877da91dac7b11efd8cc7 (patch)
treeb2ea9e10ea478fc38329e8fb7c75c620f60221e8
parent479c21336fb0ba79a17372fab2bc1b342f1f56c7 (diff)
downloadorg-mode-735bb251b1826c8eb10877da91dac7b11efd8cc7.tar.gz
Remove TARGET handling from export back-ends
* contrib/lisp/ox-groff.el (org-groff-link): Remove TARGET handling. * lisp/ox-ascii.el (org-ascii-link): Remove TARGET handling. * lisp/ox-html.el (org-html-keyword): Remove TARGET handling. * lisp/ox-latex.el (org-latex-keyword, org-latex-link): Remove TARGET handling. * lisp/ox-man.el (org-man-keyword): Remove TARGET handling. * lisp/ox-md.el (org-md-link): Remove TARGET handling. * lisp/ox-odt.el (org-odt-keyword): Remove TARGET handling.
-rw-r--r--contrib/lisp/ox-groff.el9
-rw-r--r--lisp/ox-ascii.el18
-rw-r--r--lisp/ox-html.el2
-rw-r--r--lisp/ox-latex.el4
-rw-r--r--lisp/ox-man.el2
-rw-r--r--lisp/ox-md.el14
-rw-r--r--lisp/ox-odt.el9
7 files changed, 21 insertions, 37 deletions
diff --git a/contrib/lisp/ox-groff.el b/contrib/lisp/ox-groff.el
index 3c7abdf..ca50b18 100644
--- a/contrib/lisp/ox-groff.el
+++ b/contrib/lisp/ox-groff.el
@@ -1293,12 +1293,9 @@ INFO is a plist holding contextual information. See
(or desc
(org-export-data
(org-element-property :raw-link link) info))))
- ;; Fuzzy link points to an invisible target.
- (keyword nil)
- ;; LINK points to a headline. If headlines are numbered
- ;; and the link has no description, display headline's
- ;; number. Otherwise, display description or headline's
- ;; title.
+ ;; LINK points to a headline. If headlines are numbered and
+ ;; the link has no description, display headline's number.
+ ;; Otherwise, display description or headline's title.
(headline
(let ((label ""))
(if (and (plist-get info :section-numbers) (not desc))
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index f715732..2191539 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -1424,16 +1424,14 @@ INFO is a plist holding contextual information."
;; targets.
((string= type "fuzzy")
(let ((destination (org-export-resolve-fuzzy-link link info)))
- ;; Ignore invisible "#+TARGET: path".
- (unless (eq (org-element-type destination) 'keyword)
- (if (org-string-nw-p desc) desc
- (when destination
- (let ((number
- (org-export-get-ordinal
- destination info nil 'org-ascii--has-caption-p)))
- (when number
- (if (atom number) (number-to-string number)
- (mapconcat 'number-to-string number ".")))))))))
+ (if (org-string-nw-p desc) desc
+ (when destination
+ (let ((number
+ (org-export-get-ordinal
+ destination info nil 'org-ascii--has-caption-p)))
+ (when number
+ (if (atom number) (number-to-string number)
+ (mapconcat 'number-to-string number "."))))))))
(t
(if (not (org-string-nw-p desc)) (format "[%s]" raw-link)
(concat
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d4e8f3a..e3495f5 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2328,8 +2328,6 @@ CONTENTS is nil. INFO is a plist holding contextual information."
(value (org-element-property :value keyword)))
(cond
((string= key "HTML") value)
- ;; Invisible targets.
- ((string= key "TARGET") nil)
((string= key "TOC")
(let ((value (downcase value)))
(cond
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index cc75c5b..f693019 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1722,8 +1722,6 @@ CONTENTS is nil. INFO is a plist holding contextual information."
(cond
((string= key "LATEX") value)
((string= key "INDEX") (format "\\index{%s}" value))
- ;; Invisible targets.
- ((string= key "TARGET") nil)
((string= key "TOC")
(let ((value (downcase value)))
(cond
@@ -1924,8 +1922,6 @@ INFO is a plist holding contextual information. See
(or desc
(org-export-data
(org-element-property :raw-link link) info))))
- ;; Fuzzy link points to an invisible target.
- (keyword nil)
;; LINK points to a headline. If headlines are numbered
;; and the link has no description, display headline's
;; number. Otherwise, display description or headline's
diff --git a/lisp/ox-man.el b/lisp/ox-man.el
index a98182b..2d63c35 100644
--- a/lisp/ox-man.el
+++ b/lisp/ox-man.el
@@ -618,8 +618,6 @@ CONTENTS is nil. INFO is a plist holding contextual information."
(cond
((string= key "MAN") value)
((string= key "INDEX") nil)
- ;; Invisible targets.
- ((string= key "TARGET") nil)
((string= key "TOC" ) nil))))
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index 6b621a0..43c92a2 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -310,14 +310,12 @@ a communication channel."
(org-export-data (org-element-contents destination) info)))
((equal type "fuzzy")
(let ((destination (org-export-resolve-fuzzy-link link info)))
- ;; Ignore invisible "#+TARGET: path".
- (unless (eq (org-element-type destination) 'keyword)
- (if (org-string-nw-p contents) contents
- (when destination
- (let ((number (org-export-get-ordinal destination info)))
- (when number
- (if (atom number) (number-to-string number)
- (mapconcat 'number-to-string number ".")))))))))
+ (if (org-string-nw-p contents) contents
+ (when destination
+ (let ((number (org-export-get-ordinal destination info)))
+ (when number
+ (if (atom number) (number-to-string number)
+ (mapconcat 'number-to-string number "."))))))))
(t (let* ((raw-path (org-element-property :path link))
(path (cond
((member type '("http" "https" "ftp"))
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 250aa33..04e15b5 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2022,7 +2022,6 @@ CONTENTS is nil. INFO is a plist holding contextual information."
((string= key "INDEX")
;; FIXME
(ignore))
- ((string= key "TARGET") nil)
((string= key "TOC")
(let ((value (downcase value)))
(cond
@@ -2836,10 +2835,10 @@ INFO is a plist holding contextual information. See
(let ((label (org-element-property :value destination)))
(format "<text:a xlink:type=\"simple\" xlink:href=\"#%s\">%s</text:a>"
(org-export-solidify-link-text label) desc))))
- ;; LINK has no description. It points to either a HEADLINE, a
- ;; TARGET or an ELEMENT with a #+NAME: LABEL attached to it.
- ;; LINK to DESTINATION, but make a best effort to provide a
- ;; *meaningful* description.
+ ;; LINK has no description. It points to either a HEADLINE or
+ ;; an ELEMENT with a #+NAME: LABEL attached to it. LINK to
+ ;; DESTINATION, but make a best effort to provide
+ ;; a *meaningful* description.
(org-odt-link--infer-description destination info))))
;; Coderef: replace link with the reference name or the
;; equivalent line number.