Function: pcomplete/org-mode/tag

pcomplete/org-mode/tag is a byte-compiled function defined in org-pcomplete.el.gz.

Signature

(pcomplete/org-mode/tag)

Documentation

Complete a tag name. Omit tags already set.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-pcomplete.el.gz
(defun pcomplete/org-mode/tag ()
  "Complete a tag name.  Omit tags already set."
  (while (pcomplete-here
	  (mapcar (lambda (x) (concat x ":"))
		  (let ((lst (pcomplete-uniquify-list
			      (or (remq
				   nil
				   (mapcar (lambda (x) (org-string-nw-p (car x)))
					   org-current-tag-alist))
				  (mapcar #'car (org-get-buffer-tags))))))
		    (dolist (tag (org-get-tags nil t))
		      (setq lst (delete tag lst)))
		    lst))
	  (and (string-match ".*:" pcomplete-stub)
	       (substring pcomplete-stub (match-end 0)))
	  t)))