summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-01-28 10:41:39 (GMT)
committer Nicolas Goaziou <mail@nicolasgoaziou.fr>2015-01-28 10:41:39 (GMT)
commita1f54021c95a12172e7b44a838ab2f370ca41e52 (patch)
tree2183129167d98d805845c7a0a2090793570f247a
parente1862b5c44669b6e3bbf57b1bfa5091da943decf (diff)
downloadorg-mode-master.zip
org-mode-master.tar.gz
org-element: Remove :alt-title property for headlinesHEADmaster
* 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".
-rw-r--r--lisp/org-element.el15
-rw-r--r--lisp/ox.el6
2 files changed, 8 insertions, 13 deletions
diff --git a/lisp/org-element.el b/lisp/org-element.el
index cbe6ae7..4a138b6 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -867,10 +867,10 @@ Return value is a plist."
"Parse a headline.
Return a list whose CAR is `headline' and CDR is a plist
-containing `:raw-value', `:title', `:alt-title', `:begin',
-`:end', `:pre-blank', `:contents-begin' and `:contents-end',
-`:level', `:priority', `:tags', `:todo-keyword',`:todo-type',
-`:scheduled', `:deadline', `:closed', `:archivedp', `:commentedp'
+containing `:raw-value', `:title', `:begin', `:end',
+`:pre-blank', `:contents-begin' and `:contents-end', `:level',
+`:priority', `:tags', `:todo-keyword',`:todo-type', `:scheduled',
+`:deadline', `:closed', `:archivedp', `:commentedp'
`:footnote-section-p', `:post-blank' and `:post-affiliated'
keywords.
@@ -953,13 +953,6 @@ Assume point is at beginning of the headline."
:post-affiliated begin)
time-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
headline :title
(if raw-secondary-p raw-value
diff --git a/lisp/ox.el b/lisp/ox.el
index 42f7c06..c83cc86 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3803,8 +3803,10 @@ fail, the fall-back value is \"???\"."
"Return alternative title for HEADLINE, as a secondary string.
INFO is a plist used as a communication channel. If no optional
title is defined, fall-back to the regular title."
- (or (org-element-property :alt-title headline)
- (org-element-property :title headline)))
+ (let ((alt (org-element-property :ALT_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)
"Non-nil when BLOB is the first sibling in its parent.