summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-12-07 20:13:28 -0500
committerKyle Meyer <kyle@kyleam.com>2014-12-07 20:13:28 -0500
commit2f3d586b78c87927b0c74d4e43391e592234653c (patch)
tree2496a3b66cd8b4ae85817093ccaebbde33a81126
parent1feb3d0bd961bf0362807670384398953916ecbc (diff)
downloadbog-2f3d586b78c87927b0c74d4e43391e592234653c.tar.gz
Remove invisible/autosave files from notes list
-rw-r--r--bog.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/bog.el b/bog.el
index cef56a3..130a1c1 100644
--- a/bog.el
+++ b/bog.el
@@ -713,9 +713,12 @@ level `bog-refile-maxlevel' are considered."
(defun bog-notes-files ()
"Return Org files in `bog-notes-directory'"
- (file-expand-wildcards
- (concat (file-name-as-directory bog-notes-directory)
- "*.org")))
+ (--remove (let ((base-name (file-name-nondirectory it)))
+ (or (string-prefix-p "." base-name)
+ (auto-save-file-name-p base-name)))
+ (file-expand-wildcards
+ (concat (file-name-as-directory bog-notes-directory)
+ "*.org"))))
(defun bog-search-notes (&optional todo-only string)
"Search notes using `org-search-view'.