Add support for age encryption via age.el #442
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
org-journal-encryption-extension
to control the file extension appended to the file name to trigger transparent encryption.age
files as journal files.gpg
.age
files inorg-journal-re-encrypt-journals
- only re-encrypt files for the currently chosen encryption extension - functional change: don't edit/re-save files that aren't encrypted. I assume that they where handled by this function in the past was an oversight and not intended. - allow multiple recipients forage
encryptioncloses #441
age encyrption works with this change.
TODOs from age encrypted journal files get added to the agenda. (
org-journal-enable-agenda-integration
)I wasn't sure how to do optional dependencies for Emacs packages.
If someone tries to set
age
as extension theorg-journal-re-encrypt-journals
function will fail because of missing functions, of course.
org-journal-re-encrypt-journals
works for me ifage-default-recipient
andage-default-identity
are set,but things got a bit weird when I hadn't set those.
I might be missing some settings, but at some point age encryption wasn't working at all and I had to restart Emacs.
Theoretically org-journal would work with any encryption that implements transparent, as long as the
org-journal--list-files
andorg-journal--dir-and-file-format->pattern
would get consider the value oforg-journal-encryption-extension
in their regexes. If we don't want to implement this then it's probably better to makeorg-journal-encryption-extension
of:type '(choice (const :tag "age" age) (const :tag "gpg" gpg))
instead of'string
.Instructions for testing
age
binaries: https://github.com/FiloSottile/age/releases/latestCreate age keys:
age-keygen -o key.txt age-keygen -y key.txt > key.pub
Example
age.el
configuration for testing:Activate
age
encrption fororg-journal
: