diff --git a/lisp/org.el b/lisp/org.el index 32695e78a..94078f9df 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4913,10 +4913,12 @@ Support for group tags is controlled by the option (setq ret (save-match-data (org-set-regexps-and-options-for-tags))))) ;; Append setupfile tags to existing tags - (setq org-file-tags (append org-file-tags (nth 0 ret)) - org-tag-alist (append org-tag-alist (nth 1 ret)) + (setq org-file-tags + (delq nil (append org-file-tags (nth 0 ret))) + org-tag-alist + (delq nil (append org-tag-alist (nth 1 ret))) org-tag-groups-alist - (append org-tag-groups-alist (nth 2 ret))))) + (delq nil (append org-tag-groups-alist (nth 2 ret)))))) (and ext-setup-or-nil (string-match re ext-setup-or-nil start) (setq start (match-end 0)))