1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

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.
This commit is contained in:
Nicolas Goaziou 2013-04-04 20:35:05 +02:00
parent 479c21336f
commit 735bb251b1
7 changed files with 21 additions and 37 deletions

View File

@ -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))

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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))))

View File

@ -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"))

View File

@ -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.