summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjl <djl@users.noreply.github.com>2018-01-09 02:30:09 +0000
committerJason Blevins <jblevins@xbeta.org>2018-01-08 21:30:09 -0500
commit80c1aabe98d21efdb63e237219010a05828e3eb8 (patch)
tree20190e9e0f1c14519c042a5c5bed256fce727fe0
parentc7413a390ac22331ad5226a8c8c007bd08759bc8 (diff)
Add option to filter only on file names
Closes GH-33
-rw-r--r--deft.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/deft.el b/deft.el
index d33f198..8bc485c 100644
--- a/deft.el
+++ b/deft.el
@@ -739,6 +739,11 @@ For example, .tex files may be generated from `org-mode' or Pandoc."
:type '(repeat (cons string string))
:group 'deft)
+(defcustom deft-filter-only-filenames nil
+ "Filter on file names only."
+ :type 'boolean
+ :group 'deft)
+
;; Faces
(defgroup deft-faces nil
@@ -1535,7 +1540,7 @@ all elements."
(with-temp-buffer
(insert file)
(let ((title (deft-file-title file))
- (contents (deft-file-contents file)))
+ (contents (if deft-filter-only-filenames "" (deft-file-contents file))))
(when title (insert title))
(when contents (insert contents)))
(if batch