瀏覽代碼

org: Fix tag setter

* lisp/org.el (org-set-tags): Treat ':' and '::' as no tag.
Marco Wahl 8 年之前
父節點
當前提交
82310e34b9
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      lisp/org.el

+ 3 - 0
lisp/org.el

@@ -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))))