branch: externals/org-gnosis commit 8588f66e848419701b835efc532dd18f4ea4797c Author: Thanos Apollo <pub...@thanosapollo.org> Commit: Thanos Apollo <pub...@thanosapollo.org>
[Feature] Add create-as-gpg * When org-gnosis-create-as-gpg is non-nil file will be created with a .gpg suffix, adding support for gpg encryption. --- org-gnosis.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/org-gnosis.el b/org-gnosis.el index d30e1a8f94..86787ae72c 100644 --- a/org-gnosis.el +++ b/org-gnosis.el @@ -67,6 +67,10 @@ "Timestring used for the creation of file." :type 'string) +(defcustom org-gnosis-create-as-gpg nil + "When non-nil, create notes with a .gpg suffix." + :type 'boolean) + (defcustom org-gnosis-todo-files org-agenda-files "TODO files used for the journal entries." :type '(repeat string)) @@ -341,7 +345,8 @@ TIMESTRING defaults to `org-gnosis-timestring'" (let ((timestring (or timestring org-gnosis-timestring)) (filename (replace-regexp-in-string "#" "" (replace-regexp-in-string " " "_" title)))) - (format "%s--%s.org" (format-time-string timestring) filename))) + (format "%s--%s.org%s" (format-time-string timestring) filename + (if org-gnosis-create-as-gpg ".gpg" "")))) (defun org-gnosis--create-file (title &optional directory extras) "Create a node FILE for TITLE.