From a1f54021c95a12172e7b44a838ab2f370ca41e52 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 28 Jan 2015 11:41:39 +0100 Subject: [PATCH] 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". --- lisp/org-element.el | 15 ++++----------- lisp/ox.el | 6 ++++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index cbe6ae73c..4a138b6a4 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 42f7c068e..c83cc861b 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.