Function: org-global-tags-completion-table

org-global-tags-completion-table is a byte-compiled function defined in org.el.gz.

Signature

(org-global-tags-completion-table &optional FILES)

Documentation

Return the list of all tags in all agenda buffer/files.

Optional FILES argument is a list of files which can be used instead of the agenda files.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-global-tags-completion-table (&optional files)
  "Return the list of all tags in all agenda buffer/files.
Optional FILES argument is a list of files which can be used
instead of the agenda files."
  (save-excursion
    (org-uniquify
     (delq nil
	   (apply #'append
		  (mapcar
		   (lambda (file)
		     (set-buffer (find-file-noselect file))
		     (org--tag-add-to-alist
		      (org-get-buffer-tags)
		      (mapcar (lambda (x)
				(and (stringp (car-safe x))
				     (list (car-safe x))))
			      org-current-tag-alist)))
		   (if (car-safe files) files
		     (org-agenda-files))))))))