Browse Source

Offer file tags for completion

Carsten Dominik 15 years ago
parent
commit
4edf012b1f
2 changed files with 7 additions and 1 deletions
  1. 5 0
      lisp/ChangeLog
  2. 2 1
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-10-20  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-file-tags): Fix docstring.
+	(org-get-buffer-tags): Add the #+FILETAGS tags.
+
 2009-10-20  John Wiegley  <johnw@newartisans.com>
 2009-10-20  John Wiegley  <johnw@newartisans.com>
 
 
 	* org-agenda.el (org-finalize-agenda): Draw habit consistency
 	* org-agenda.el (org-finalize-agenda): Draw habit consistency

+ 2 - 1
lisp/org.el

@@ -2311,7 +2311,7 @@ To disable these tags on a per-file basis, insert anywhere in the file:
   "List of tags that can be inherited by all entries in the file.
   "List of tags that can be inherited by all entries in the file.
 The tags will be inherited if the variable `org-use-tag-inheritance'
 The tags will be inherited if the variable `org-use-tag-inheritance'
 says they should be.
 says they should be.
-This variable is populated from #+TAG lines.")
+This variable is populated from #+FILETAGS lines.")
 
 
 (defcustom org-use-fast-tag-selection 'auto
 (defcustom org-use-fast-tag-selection 'auto
   "Non-nil means, use fast tag selection scheme.
   "Non-nil means, use fast tag selection scheme.
@@ -11704,6 +11704,7 @@ Returns the new tags string, or nil to not change the current settings."
 	(when (equal (char-after (point-at-bol 0)) ?*)
 	(when (equal (char-after (point-at-bol 0)) ?*)
 	  (mapc (lambda (x) (add-to-list 'tags x))
 	  (mapc (lambda (x) (add-to-list 'tags x))
 		(org-split-string (org-match-string-no-properties 1) ":")))))
 		(org-split-string (org-match-string-no-properties 1) ":")))))
+    (mapc (lambda (s) (add-to-list 'tags s)) org-file-tags)
     (mapcar 'list tags)))
     (mapcar 'list tags)))
 
 
 ;;;; The mapping API
 ;;;; The mapping API