org-crypt-key-for-heading: Handle CRYPTKEY nil value
* lisp/org-crypt.el (org-crypt-key-for-heading): Do not fallback to `org-crypt-key' when heading explicitly sets CRYPTKEY property. Reported-by: Ignacio Casso <ignaciocasso@hotmail.com> Link: https://orgmode.org/list/PAXPR06MB7760DA356C7C27045BEB64F6C6449@PAXPR06MB7760.eurprd06.prod.outlook.com
This commit is contained in:
parent
3e86487755
commit
d331f52cac
|
@ -199,8 +199,9 @@ See `org-crypt-disable-auto-save'."
|
|||
Assume `epg-context' is set."
|
||||
(and org-crypt-key
|
||||
(or (epg-list-keys epg-context
|
||||
(or (org-entry-get nil "CRYPTKEY" 'selective)
|
||||
org-crypt-key))
|
||||
(pcase (org-entry-get nil "CRYPTKEY" 'selective 'literal-nil)
|
||||
("nil" "")
|
||||
(key (or key org-crypt-key ""))))
|
||||
(bound-and-true-p epa-file-encrypt-to)
|
||||
(progn
|
||||
(message "No crypt key set, using symmetric encryption.")
|
||||
|
|
Loading…
Reference in New Issue