mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-16 09:46:27 +00:00
Merge branch 'master' of orgmode.org:org-mode
This commit is contained in:
commit
398e8af56e
|
@ -551,7 +551,7 @@ If optional argument NOTAGS is non-nil, no tags will be added to
|
||||||
the title.
|
the title.
|
||||||
|
|
||||||
When optional argument TOC is non-nil, use optional title if
|
When optional argument TOC is non-nil, use optional title if
|
||||||
possible."
|
possible. It doesn't apply to `inlinetask' elements."
|
||||||
(let* ((headlinep (eq (org-element-type element) 'headline))
|
(let* ((headlinep (eq (org-element-type element) 'headline))
|
||||||
(numbers
|
(numbers
|
||||||
;; Numbering is specific to headlines.
|
;; Numbering is specific to headlines.
|
||||||
|
@ -565,8 +565,9 @@ possible."
|
||||||
(text
|
(text
|
||||||
(org-trim
|
(org-trim
|
||||||
(org-export-data
|
(org-export-data
|
||||||
(or (and toc headlinep (org-export-get-optional-title element info))
|
(if (and toc headlinep) (org-export-get-optional-title element info)
|
||||||
(org-element-property :title element)) info)))
|
(org-element-property :title element))
|
||||||
|
info)))
|
||||||
(todo
|
(todo
|
||||||
(and (plist-get info :with-todo-keywords)
|
(and (plist-get info :with-todo-keywords)
|
||||||
(let ((todo (org-element-property :todo-keyword element)))
|
(let ((todo (org-element-property :todo-keyword element)))
|
||||||
|
|
|
@ -1148,9 +1148,7 @@ INFO is a plist used as a communication channel."
|
||||||
;; Body.
|
;; Body.
|
||||||
(concat section-number
|
(concat section-number
|
||||||
(org-export-data
|
(org-export-data
|
||||||
(or (org-export-get-optional-title headline info)
|
(org-export-get-optional-title headline info) info)
|
||||||
(org-element-property :title headline))
|
|
||||||
info)
|
|
||||||
(and tags " ") (org-html--tags tags)))))
|
(and tags " ") (org-html--tags tags)))))
|
||||||
|
|
||||||
(defun org-html-toc (depth info)
|
(defun org-html-toc (depth info)
|
||||||
|
|
|
@ -1480,9 +1480,7 @@ holding contextual information."
|
||||||
(funcall org-latex-format-headline-function
|
(funcall org-latex-format-headline-function
|
||||||
todo todo-type priority
|
todo todo-type priority
|
||||||
(org-export-data
|
(org-export-data
|
||||||
(or (org-export-get-optional-title headline info)
|
(org-export-get-optional-title headline info) info)
|
||||||
(org-element-property :title headline))
|
|
||||||
info)
|
|
||||||
(and (eq (plist-get info :with-tags) t) tags))))
|
(and (eq (plist-get info :with-tags) t) tags))))
|
||||||
(if (and opt-title (string-match "\\`\\\\\\(.*?\\){" section-fmt))
|
(if (and opt-title (string-match "\\`\\\\\\(.*?\\){" section-fmt))
|
||||||
(format (replace-match "\\1[%s]" nil nil section-fmt 1)
|
(format (replace-match "\\1[%s]" nil nil section-fmt 1)
|
||||||
|
|
|
@ -3550,9 +3550,10 @@ fail, the fall-back value is \"???\"."
|
||||||
|
|
||||||
(defun org-export-get-optional-title (headline info)
|
(defun org-export-get-optional-title (headline info)
|
||||||
"Return optional title for HEADLINE, as a secondary string.
|
"Return optional title for HEADLINE, as a secondary string.
|
||||||
INFO is a plist used as a communication channel. If no such
|
INFO is a plist used as a communication channel. If no optional
|
||||||
title is defined, return nil."
|
title is defined, fall-back to the regular title."
|
||||||
(org-element-property :optional-title headline))
|
(or (org-element-property :optional-title headline)
|
||||||
|
(org-element-property :title headline)))
|
||||||
|
|
||||||
(defun org-export-first-sibling-p (headline info)
|
(defun org-export-first-sibling-p (headline info)
|
||||||
"Non-nil when HEADLINE is the first sibling in its sub-tree.
|
"Non-nil when HEADLINE is the first sibling in its sub-tree.
|
||||||
|
|
|
@ -1018,6 +1018,24 @@ Paragraph[fn:1]"
|
||||||
;; Otherwise, return it as a roman number.
|
;; Otherwise, return it as a roman number.
|
||||||
(should (equal (org-export-number-to-roman 1449) "MCDXLIX")))
|
(should (equal (org-export-number-to-roman 1449) "MCDXLIX")))
|
||||||
|
|
||||||
|
(ert-deftest test-org-export/get-optional-title ()
|
||||||
|
"Test `org-export-get-optional-title' specifications."
|
||||||
|
;; If OPTIONAL_TITLE property is defined, use it.
|
||||||
|
(should
|
||||||
|
(equal '("opt")
|
||||||
|
(org-test-with-parsed-data
|
||||||
|
"* Headline\n:PROPERTIES:\n:OPTIONAL_TITLE: opt\n:END:"
|
||||||
|
(org-export-get-optional-title
|
||||||
|
(org-element-map tree 'headline 'identity info t)
|
||||||
|
info))))
|
||||||
|
;; Otherwise, fall-back to regular title.
|
||||||
|
(should
|
||||||
|
(equal '("Headline")
|
||||||
|
(org-test-with-parsed-data "* Headline"
|
||||||
|
(org-export-get-optional-title
|
||||||
|
(org-element-map tree 'headline 'identity info t)
|
||||||
|
info)))))
|
||||||
|
|
||||||
(ert-deftest test-org-export/get-tags ()
|
(ert-deftest test-org-export/get-tags ()
|
||||||
"Test `org-export-get-tags' specifications."
|
"Test `org-export-get-tags' specifications."
|
||||||
(let ((org-export-exclude-tags '("noexport"))
|
(let ((org-export-exclude-tags '("noexport"))
|
||||||
|
|
Loading…
Reference in a new issue