diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-04-18 19:34:08 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-04-18 19:34:08 +0200 |
commit | 2a49038fd6d3729fedcef35e5d739cc680719fea (patch) | |
tree | 160efa8f72a12bcc32b9496e69b3bb80dbfbdf4b | |
parent | 9297757fc0964068f6862eaedc333017527a1f0f (diff) | |
download | org-mode-2a49038fd6d3729fedcef35e5d739cc680719fea.tar.gz |
org-pcomplete: Fix TAGS completion
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/tags):
(pcomplete/org-mode/tag): Use new `org-current-tag-alist' instead of
`org-tag-alist' so as to take `org-tag-persistent-alist' into
consideration.
-rw-r--r-- | lisp/org-pcomplete.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el index e652fe2..c8387b4 100644 --- a/lisp/org-pcomplete.el +++ b/lisp/org-pcomplete.el @@ -42,6 +42,7 @@ (declare-function org-buffer-property-keys "org" (&optional specials defaults columns ignore-malformed)) (declare-function org-entry-properties "org" (&optional pom which specific)) +(declare-function org-tag-alist-to-string "org" (alist &optional skip-key)) ;;;; Customization variables @@ -52,7 +53,7 @@ (defvar org-drawer-regexp) (defvar org-property-re) -(defvar org-tag-alist) +(defvar org-current-tag-alist) (defun org-thing-at-point () "Examine the thing at point and let the caller know what it is. @@ -241,7 +242,7 @@ When completing for #+STARTUP, for example, this function returns (defun pcomplete/org-mode/file-option/tags () "Complete arguments for the #+TAGS file option." (pcomplete-here - (list (org-tag-alist-to-string org-tag-alist)))) + (list (org-tag-alist-to-string org-current-tag-alist)))) (defun pcomplete/org-mode/file-option/title () "Complete arguments for the #+TITLE file option." @@ -334,7 +335,7 @@ This needs more work, to handle headings with lots of spaces in them." (or (remq nil (mapcar (lambda (x) (org-string-nw-p (car x))) - org-tag-alist)) + org-current-tag-alist)) (mapcar #'car (org-get-buffer-tags)))))) (dolist (tag (org-get-tags)) (setq lst (delete tag lst))) |