Browse Source

* lisp/org.el (org-get-buffer-tags): Remove text properties from tags

Do not preserve buffer text properties.  They may will be shown in the
completion as well, which is not expected by users.

Fixes https://orgmode.org/list/CAKJdtO_0aUmiKFjS34hoD525vMFkUJuVCCzGrFfR_Lt2_Vm58g@mail.gmail.com
Ihor Radchenko 2 years ago
parent
commit
6acc58c9c6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org.el

+ 3 - 1
lisp/org.el

@@ -11961,7 +11961,9 @@ Inherited tags have the `inherited' text property."
         (org-element-cache-map
          (lambda (el)
            (dolist (tag (org-element-property :tags el))
-             (puthash (list tag) t hashed))))
+             ;; Do not carry over the text properties.  They may look
+             ;; ugly in the completion.
+             (puthash (list (substring-no-properties tag)) t hashed))))
         (dolist (tag org-file-tags) (puthash (list tag) t hashed))
         (hash-table-keys hashed))
     (org-with-point-at 1