Function: org-get-buffer-tags
org-get-buffer-tags is a byte-compiled function defined in org.el.gz.
Signature
(org-get-buffer-tags)
Documentation
Get a table of all tags used in the buffer, for completion.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-get-buffer-tags ()
"Get a table of all tags used in the buffer, for completion."
(let ((hashed (make-hash-table :test #'equal)))
(org-element-cache-map
(lambda (el)
(dolist (tag (org-element-property :tags el))
;; 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)))