diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-12-06 23:15:59 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-12-06 23:15:59 +0100 |
commit | b570175d7628bb47b00948b3e23ff93c215d38ee (patch) | |
tree | 771659e6fc8ddfdb9f364c1217f5356de2a576ab | |
parent | 0e7e3bc6df812229aa87a39b07f9eb7b1ca2ea16 (diff) | |
download | org-mode-b570175d7628bb47b00948b3e23ff93c215d38ee.tar.gz |
Fix `org-files-list'
* lisp/org.el (org-files-list): Prevent duplicates in result.
Reported-by: Renato Ferreira <renatofdds@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00134.html>
-rw-r--r-- | lisp/org.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index 07727f6..4b4ce40 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7181,11 +7181,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 () |