1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-05 11:45:52 +00:00

Make sure `org-files-list' returns real files

(org-files-list): Don't attempt to return a file name for Org buffers
which have no associated file.
This commit is contained in:
John Wiegley 2009-10-17 21:59:09 -04:00
parent 4e184a530e
commit 57a7a4c15b
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-10-18 John Wiegley <johnw@newartisans.com>
* org.el (org-files-list): Don't attempt to return a file name for
Org buffers which have no associated file.
* org-agenda.el (org-agenda-do-action): Fixed a typo.
2009-10-18 Carsten Dominik <carsten.dominik@gmail.com>

View File

@ -5344,7 +5344,7 @@ open and agenda-wise Org files."
(let ((files (mapcar 'expand-file-name org-agenda-files)))
(dolist (buf (buffer-list))
(with-current-buffer buf
(if (eq major-mode 'org-mode)
(if (and (eq major-mode 'org-mode) (buffer-file-name))
(let ((file (expand-file-name (buffer-file-name))))
(unless (member file files)
(push file files))))))