Created
October 10, 2022 11:24
-
-
Save gnava/b33eadb51e71abd9114904c04e7bbb72 to your computer and use it in GitHub Desktop.
citar-notes directory patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 793b3a117c7851a4a62ee83729c778ef266947b2 Mon Sep 17 00:00:00 2001 | |
From: gna <gna@think6> | |
Date: Mon, 10 Oct 2022 13:11:07 +0200 | |
Subject: [PATCH] Allow to specify directory for citar notes | |
--- | |
denote-citar.el | 9 ++++++++- | |
1 file changed, 8 insertions(+), 1 deletion(-) | |
diff --git a/denote-citar.el b/denote-citar.el | |
index 73bf905..72f3b62 100644 | |
--- a/denote-citar.el | |
+++ b/denote-citar.el | |
@@ -43,6 +43,11 @@ | |
:group 'denote-citar | |
:type '(repeat string)) | |
+(defcustom denote-citar-directory nil | |
+ "Directory where to store citar notes. If nil `denote-directory' will be used." | |
+ :group 'denote-citar | |
+ :type 'directory) | |
+ | |
(defconst denote-citar-retrieve--ref-front-matter-key-regexp | |
"^\\(?:#\\+\\)?\\(?:reference\\)\\s-*[:=]" | |
"Regular expression for reference key.") | |
@@ -64,7 +69,9 @@ | |
(denote | |
;; Replace underscores in citation key | |
(replace-regexp-in-string "_" "-" key) | |
- (denote-citar--keywords-prompt)) | |
+ (denote-citar--keywords-prompt) | |
+ nil | |
+ denote-directory) | |
;; The `denote-last-buffer' is the one we just created with `denote'. | |
(with-current-buffer (get-buffer denote-last-buffer) | |
(save-excursion | |
-- | |
2.35.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment