0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2015-02-10 22:27:12 +01:00
commit f620efe1b8

View file

@ -2632,11 +2632,12 @@ Return nil, otherwise."
(t nil))))))))
(defun org-odt-link--infer-description (destination info)
;; DESTINATION is a HEADLINE, a "<<target>>" or an element (like
;; paragraph, verse-block etc) to which a "#+NAME: label" can be
;; attached. Note that labels that are attached to captioned
;; entities - inline images, math formulae and tables - get resolved
;; as part of `org-odt-format-label' and `org-odt--enumerate'.
;; DESTINATION is a headline or an element (like paragraph,
;; verse-block etc) to which a "#+NAME: label" can be attached.
;; Note that labels that are attached to captioned entities - inline
;; images, math formulae and tables - get resolved as part of
;; `org-odt-format-label' and `org-odt--enumerate'.
;; Create a cross-reference to DESTINATION but make best-efforts to
;; create a *meaningful* description. Check item numbers, section
@ -2792,11 +2793,10 @@ INFO is a plist holding contextual information. See
(target
;; If there's a description, create a hyperlink.
;; Otherwise, try to provide a meaningful description.
(if (not desc) (org-odt-link--infer-description destination info)
(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))))
(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)
(or desc (org-export-get-ordinal destination info)))))
;; Case 4: Fuzzy link points to some element (e.g., an
;; inline image, a math formula or a table).
(otherwise