summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-01 03:04:50 +0100
committerjao <jao@gnu.org>2022-09-01 03:04:50 +0100
commit12c06e17d1012afda4813fef7486b1d8c2e2ab0f (patch)
treeae0944ba4a72821d89ab6b1082078c0b2b6f61c4 /init.el
parentcb6f9b1ea16d7153150ee30acd493f434540b9b4 (diff)
downloadelibs-12c06e17d1012afda4813fef7486b1d8c2e2ab0f.tar.gz
elibs-12c06e17d1012afda4813fef7486b1d8c2e2ab0f.tar.bz2
a config for deft that makes it work with my jao-org-notes
Diffstat (limited to 'init.el')
-rw-r--r--init.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/init.el b/init.el
index 9a6cff2..ec9e598 100644
--- a/init.el
+++ b/init.el
@@ -1777,6 +1777,29 @@
(shell-command (format "r2e run %s" name)))))))
;;; PDFs and other docs
+;;;; deft
+(use-package deft
+ :ensure t
+ :after jao-org-notes
+ :commands deft
+ :init (setq deft-extensions '("org" "md")
+ deft-directory jao-org-notes-dir
+ deft-use-filename-as-title nil
+ deft-use-filter-string-for-name t
+ deft-file-naming-rules '((noslash . "-")
+ (nospace . "-")
+ (case-fn . downcase))
+ deft-org-mode-title-prefix t
+ deft-recursive t
+ deft-recursive-ignore-dir-regexp (regexp-opt '("." ".." "attic"))
+ deft-strip-summary-regexp
+ (concat "\\([\n\t]"
+ "\\|^#\\+\\(title\\|created\\|date\\|author\\):.*$"
+ "\\|^#\\+\\(file\\)?tags: *\\)"))
+ :config (setq deft-strip-title-regexp
+ (concat "\\(^#\\+title: *\\)" deft-strip-title-regexp))
+ :bind (("<f9>" . deft)
+ ("C-x C-g" . deft-find-file)))
;;;; doc-view
(use-package doc-view
:init