[oni-org] Fix ‘oni-org-find-knowledge-file’
Make sure that any new files for notes are created in the ‘oni-org-knowledge-directory’ directory and not in whichever directory the current buffer is visiting.
This commit is contained in:
parent
a352d0983a
commit
f846a15a07
1 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2021.0724.010848
|
;; Version: 2021.0730.213310
|
||||||
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti)
|
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -126,7 +126,8 @@
|
||||||
;; exist yet, it’s created and the title is inserted into it.
|
;; exist yet, it’s created and the title is inserted into it.
|
||||||
(defun oni-org-find-knowledge-file ()
|
(defun oni-org-find-knowledge-file ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((completions (oni-org--get-knowledge-files))
|
(let* ((default-directory oni-org-knowledge-directory)
|
||||||
|
(completions (oni-org--get-knowledge-files))
|
||||||
(pick (completing-read "File: " completions))
|
(pick (completing-read "File: " completions))
|
||||||
(file (car (alist-get pick completions nil nil #'string=))))
|
(file (car (alist-get pick completions nil nil #'string=))))
|
||||||
(if file
|
(if file
|
||||||
|
|
Loading…
Reference in a new issue