Browse Source

Merge branch 'maint'

Nicolas Goaziou 1 month ago
parent
commit
3695415199
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -7115,11 +7115,12 @@ are at least `org-cycle-separator-lines' empty lines before the headline."
   "Return `org-agenda-files' list, plus all open Org files.
 This is useful for operations that need to scan all of a user's
 open and agenda-wise Org files."
-  (let ((files (mapcar 'expand-file-name (org-agenda-files))))
+  (let ((files (mapcar #'expand-file-name (org-agenda-files))))
     (dolist (buf (buffer-list))
       (with-current-buffer buf
 	(when (and (derived-mode-p 'org-mode) (buffer-file-name))
-	  (cl-pushnew (expand-file-name (buffer-file-name)) files))))
+	  (cl-pushnew (expand-file-name (buffer-file-name)) files
+		      :test #'equal))))
     files))
 
 (defsubst org-entry-beginning-position ()