forked from mirrors/org-mode
org-element: Remove :alt-title property for headlines
* lisp/org-element.el (org-element-headline-parser): Remove :alt-title. * lisp/ox.el (org-export-get-alt-title): Check regular :ALT_TITLE property instead of :alt-title. `:alt-title' is an export-specific property. As a consequence, it's value doesn't need to be parsed at "org-element.el"'s level. There, it is treated as a regular property : `ALT_TITLE'. This also removes the last call to `org-element-parse-secondary-string' from "org-element.el".
This commit is contained in:
parent
e1862b5c44
commit
a1f54021c9
|
@ -867,10 +867,10 @@ Return value is a plist."
|
||||||
"Parse a headline.
|
"Parse a headline.
|
||||||
|
|
||||||
Return a list whose CAR is `headline' and CDR is a plist
|
Return a list whose CAR is `headline' and CDR is a plist
|
||||||
containing `:raw-value', `:title', `:alt-title', `:begin',
|
containing `:raw-value', `:title', `:begin', `:end',
|
||||||
`:end', `:pre-blank', `:contents-begin' and `:contents-end',
|
`:pre-blank', `:contents-begin' and `:contents-end', `:level',
|
||||||
`:level', `:priority', `:tags', `:todo-keyword',`:todo-type',
|
`:priority', `:tags', `:todo-keyword',`:todo-type', `:scheduled',
|
||||||
`:scheduled', `:deadline', `:closed', `:archivedp', `:commentedp'
|
`:deadline', `:closed', `:archivedp', `:commentedp'
|
||||||
`:footnote-section-p', `:post-blank' and `:post-affiliated'
|
`:footnote-section-p', `:post-blank' and `:post-affiliated'
|
||||||
keywords.
|
keywords.
|
||||||
|
|
||||||
|
@ -953,13 +953,6 @@ Assume point is at beginning of the headline."
|
||||||
:post-affiliated begin)
|
:post-affiliated begin)
|
||||||
time-props
|
time-props
|
||||||
standard-props))))
|
standard-props))))
|
||||||
(let ((alt-title (org-element-property :ALT_TITLE headline)))
|
|
||||||
(when alt-title
|
|
||||||
(org-element-put-property
|
|
||||||
headline :alt-title
|
|
||||||
(if raw-secondary-p alt-title
|
|
||||||
(org-element-parse-secondary-string
|
|
||||||
alt-title (org-element-restriction 'headline) headline)))))
|
|
||||||
(org-element-put-property
|
(org-element-put-property
|
||||||
headline :title
|
headline :title
|
||||||
(if raw-secondary-p raw-value
|
(if raw-secondary-p raw-value
|
||||||
|
|
|
@ -3803,8 +3803,10 @@ fail, the fall-back value is \"???\"."
|
||||||
"Return alternative title for HEADLINE, as a secondary string.
|
"Return alternative title for HEADLINE, as a secondary string.
|
||||||
INFO is a plist used as a communication channel. If no optional
|
INFO is a plist used as a communication channel. If no optional
|
||||||
title is defined, fall-back to the regular title."
|
title is defined, fall-back to the regular title."
|
||||||
(or (org-element-property :alt-title headline)
|
(let ((alt (org-element-property :ALT_TITLE headline)))
|
||||||
(org-element-property :title headline)))
|
(if alt (org-element-parse-secondary-string
|
||||||
|
alt (org-element-restriction 'headline) headline)
|
||||||
|
(org-element-property :title headline))))
|
||||||
|
|
||||||
(defun org-export-first-sibling-p (blob info)
|
(defun org-export-first-sibling-p (blob info)
|
||||||
"Non-nil when BLOB is the first sibling in its parent.
|
"Non-nil when BLOB is the first sibling in its parent.
|
||||||
|
|
Loading…
Reference in New Issue