diff options
Diffstat (limited to 'lisp/documents.el')
| -rw-r--r-- | lisp/documents.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/documents.el b/lisp/documents.el index 56adf58..f825de9 100644 --- a/lisp/documents.el +++ b/lisp/documents.el @@ -178,12 +178,13 @@ Visits LINK, or if LINK names a subdirectory of (notes-file-is-page path))) (notes-hierarchy-paths))) - (defun notes-page-goto () + (defun notes-page-goto (&optional initial-input) "Interactively find a page in `notes-directory'." (interactive) (let* ((hierarchy (notes-hierarchy)) (hierarchy (cl-remove-if-not #'cl-third hierarchy)) - (name (ivy-read "Find file: " (mapcar #'cl-first hierarchy))) + (name (completing-read "Find file: " (mapcar #'cl-first hierarchy) + nil nil initial-input)) (item (cl-find-if #'(lambda (item) (string= name (cl-first item))) hierarchy))) (if item (find-file (cl-second item)) @@ -193,6 +194,8 @@ Visits LINK, or if LINK names a subdirectory of ;; Set up a key binding for quickly querying the wiki. :bind ("C-c w" . notes-page-goto) + ("C-c j" . (lambda () (interactive) (notes-page-goto (format-time-string "Journal/%Y-%m-%d ")))) + ("C-c h" . (lambda () (interactive) (notes-page-goto (format-time-string "Work/%Y-%m-%d ")))) ;; Low-friction means of adding things to my GTD inbox. :config |