فهرست منبع

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.
Nicolas Goaziou 12 سال پیش
والد
کامیت
203d5123bc
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      contrib/lisp/org-export.el

+ 4 - 2
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