summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-11-03 10:24:28 (GMT)
committer Nicolas Goaziou <n.goaziou@gmail.com>2012-11-03 10:24:28 (GMT)
commit203d5123bcd873c4756b538ce59f2226bd188c6a (patch)
tree59d49822cb262015a1b3182be7cf0473c1dd5891
parent686cc243eef50ab00b0f0978d30beb4620f66634 (diff)
downloadorg-mode-203d5123bcd873c4756b538ce59f2226bd188c6a.zip
org-mode-203d5123bcd873c4756b538ce59f2226bd188c6a.tar.gz
org-export: Fix `org-export-get-category'
* contrib/lisp/org-export.el (org-export-get-category): `org-entry-properties' is over-zealous when it comes to "CATEGORY" property. Ignore its "???" return value, which only means it wasn't able to find an appropriate category.
-rw-r--r--contrib/lisp/org-export.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el
index 210cdd9..7afcd8d 100644
--- a/contrib/lisp/org-export.el
+++ b/contrib/lisp/org-export.el
@@ -3268,12 +3268,14 @@ fail, the fall-back value is \"???\"."
(org-export-get-parent-headline blob))))
;; Almost like `org-export-node-property', but we cannot trust
;; `plist-member' as every headline has a `:category'
- ;; property, even if nil.
+ ;; property, would it be nil or equal to "???" (which has the
+ ;; same meaning).
(let ((parent headline) value)
(catch 'found
(while parent
(let ((category (org-element-property :category parent)))
- (and category (throw 'found category)))
+ (and category (not (equal "???" category))
+ (throw 'found category)))
(setq parent (org-element-property :parent parent))))))
(org-element-map
(plist-get info :parse-tree) 'keyword