Fix: Don't treat an element's :begin property as a marker

Only markers are markers.  Also add FIXME about tag inheritance when
no marker is used (although see caveat in it...).
This commit is contained in:
Adam Porter 2018-08-22 13:32:44 -05:00
parent b4ba9e78fd
commit cdbe750b7c
2 changed files with 13 additions and 10 deletions

View file

@ -187,9 +187,12 @@ Its property list should be the second item in the list, as returned by `org-ele
(org-ql-agenda--add-todo-face it)))
;; FIXME: Figure out whether I should use `org-agenda-use-tag-inheritance' or `org-use-tag-inheritance', etc.
(tag-list (if org-use-tag-inheritance
;; FIXME: Note that tag inheritance cannot be used here unless markers are
;; added, otherwise we can't go to the item's buffer to look for inherited
;; tags. (Or does `org-element-headline-parser' parse inherited tags too? I
;; forget...)
(if-let ((marker (or (org-element-property :org-hd-marker element)
(org-element-property :org-marker element)
(org-element-property :begin element))))
(org-element-property :org-marker element))))
(with-current-buffer (marker-buffer marker)
;; I wish `org-get-tags-at' used the correct buffer automatically.
(org-get-tags-at marker (not org-use-tag-inheritance)))