org: Fix tag setter

* lisp/org.el (org-set-tags): Treat ':' and '::' as no tag.
This commit is contained in:
Marco Wahl 2017-03-26 15:39:20 +02:00
parent e3ed81c98d
commit 82310e34b9
1 changed files with 3 additions and 0 deletions

View File

@ -15164,6 +15164,9 @@ When JUST-ALIGN is non-nil, only align tags."
org-tags-sort-function)
":")))
(if (or (string= ":" tags)
(string= "::" tags))
(setq tags ""))
(if (not (org-string-nw-p tags)) (setq tags "")
(unless (string-suffix-p ":" tags) (setq tags (concat tags ":")))
(unless (string-prefix-p ":" tags) (setq tags (concat ":" tags))))