* how to use org-crypt with different key per file or node?
@ 2018-04-26 14:09 Gregor Zattler
2018-04-26 15:31 ` Marco Wahl
2018-04-27 12:27 ` Gregor Zattler
0 siblings, 2 replies; 8+ messages in thread
From: Gregor Zattler @ 2018-04-26 14:09 UTC (permalink / raw)
To: emacs-orgmode
Dear org-mode users and developers,
I use org-crypt for different org files. Till now I follow the
documentation and specify the one and only key to use via
(setq org-crypt-key "0xdeadbeef") for all org files and their
headings.
Is it possible to specify different keys for different files or
even better for different headings?
Ciao; Gregor
--
-... --- .-. . -.. ..--.. ...-.-
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to use org-crypt with different key per file or node?
2018-04-26 14:09 how to use org-crypt with different key per file or node? Gregor Zattler
@ 2018-04-26 15:31 ` Marco Wahl
2018-04-27 12:27 ` Gregor Zattler
1 sibling, 0 replies; 8+ messages in thread
From: Marco Wahl @ 2018-04-26 15:31 UTC (permalink / raw)
To: emacs-orgmode
Gregor Zattler <telegraph@gmx.net> writes:
> Dear org-mode users and developers,
>
> I use org-crypt for different org files. Till now I follow the
> documentation and specify the one and only key to use via
> (setq org-crypt-key "0xdeadbeef") for all org files and their
> headings.
>
> Is it possible to specify different keys for different files or
> even better for different headings?
>
>
> Ciao; Gregor
AFAICT there is property CRYPTKEY for that. Possibly this has been
forgotten in the info documentation for org.
Example:
* totally secret :crypt:
:PROPERTIES:
:CRYPTKEY: 0x0123456789012345678901234567890123456789
:END:
HTH
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to use org-crypt with different key per file or node?
2018-04-26 14:09 how to use org-crypt with different key per file or node? Gregor Zattler
2018-04-26 15:31 ` Marco Wahl
@ 2018-04-27 12:27 ` Gregor Zattler
2018-04-27 13:13 ` Nicolas Goaziou
2018-05-05 6:28 ` stardiviner
1 sibling, 2 replies; 8+ messages in thread
From: Gregor Zattler @ 2018-04-27 12:27 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
Hi org-mode users and developers,
Marco Wahl helped me with this: As always the solution is
already there in org-mode. Attached you find a patch in
order to document this feature.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-org-manual.org-Document-CRYPTKEY-property.patch --]
[-- Type: text/x-diff, Size: 983 bytes --]
From be08948c331118e2c66b858dc3133d3e44bfff69 Mon Sep 17 00:00:00 2001
From: Gregor Zattler <telegraph@gmx.net>
Date: Fri, 27 Apr 2018 14:17:05 +0200
Subject: [PATCH] doc/org-manual.org: Document CRYPTKEY property
TINYCHANGE
---
doc/org-manual.org | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/doc/org-manual.org b/doc/org-manual.org
index e670c387f..76f061709 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -19180,6 +19180,16 @@ Here is a suggestion for Org Crypt settings in Emacs init file:
;; # -*- buffer-auto-save-file-name: nil; -*-
#+end_src
+It's possible to use different keys for different headings by
+specifying the respective key as property CRYPTKEY, e.g.:
+
+#+begin_src emacs-lisp
+ * totally secret :crypt:
+ :PROPERTIES:
+ :CRYPTKEY: 0x0123456789012345678901234567890123456789
+ :END:
+#+end_src
+
Excluding the =crypt= tag from inheritance prevents already encrypted
text from being encrypted again.
--
2.11.0
[-- Attachment #3: Type: text/plain, Size: 421 bytes --]
* Gregor Zattler <telegraph@gmx.net> [2018-04-26; 16:09]:
> I use org-crypt for different org files. Till now I follow the
> documentation and specify the one and only key to use via
> (setq org-crypt-key "0xdeadbeef") for all org files and their
> headings.
>
> Is it possible to specify different keys for different files or
> even better for different headings?
Ciao; Gregor
--
-... --- .-. . -.. ..--.. ...-.-
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: how to use org-crypt with different key per file or node?
2018-04-27 12:27 ` Gregor Zattler
@ 2018-04-27 13:13 ` Nicolas Goaziou
2018-04-27 13:30 ` Gregor Zattler
2018-05-05 6:28 ` stardiviner
1 sibling, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2018-04-27 13:13 UTC (permalink / raw)
To: emacs-orgmode
Hello,
Gregor Zattler <telegraph@gmx.net> writes:
> Hi org-mode users and developers,
>
> Marco Wahl helped me with this: As always the solution is
> already there in org-mode. Attached you find a patch in
> order to document this feature.
Thank you.
> +It's possible to use different keys for different headings by
> +specifying the respective key as property CRYPTKEY, e.g.:
I used =CRYPTKEY= instead of CRYPTKEY, as it is meant to be written in
an Org document.
> +#+begin_src emacs-lisp
> + * totally secret :crypt:
There was a missing comma in front of the headline.
I applied your patch with the changes above.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to use org-crypt with different key per file or node?
2018-04-27 13:13 ` Nicolas Goaziou
@ 2018-04-27 13:30 ` Gregor Zattler
2018-04-27 13:49 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Gregor Zattler @ 2018-04-27 13:30 UTC (permalink / raw)
To: emacs-orgmode
Hi Nicolas, org-mode users,
* Nicolas Goaziou <mail@nicolasgoaziou.fr> [2018-04-27; 15:13]:
> Gregor Zattler <telegraph@gmx.net> writes:
>> +It's possible to use different keys for different headings by
>> +specifying the respective key as property CRYPTKEY, e.g.:
>
> I used =CRYPTKEY= instead of CRYPTKEY, as it is meant to be written in
> an Org document.
sorry
>> +#+begin_src emacs-lisp
>> + * totally secret :crypt:
>
> There was a missing comma in front of the headline.
Indentation is not enough!? Is there a document describing how
to contribute to org-manual.org?
Ciao; Gregor
--
-... --- .-. . -.. ..--.. ...-.-
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to use org-crypt with different key per file or node?
2018-04-27 13:30 ` Gregor Zattler
@ 2018-04-27 13:49 ` Bastien
2018-04-27 14:15 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2018-04-27 13:49 UTC (permalink / raw)
To: Gregor Zattler; +Cc: emacs-orgmode
Gregor Zattler <telegraph@gmx.net> writes:
>>> +#+begin_src emacs-lisp
>>> + * totally secret :crypt:
PS: I guess this should have been "#+begin_src org" instead.
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to use org-crypt with different key per file or node?
2018-04-27 13:49 ` Bastien
@ 2018-04-27 14:15 ` Nicolas Goaziou
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2018-04-27 14:15 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
Bastien <bzg@gnu.org> writes:
> Gregor Zattler <telegraph@gmx.net> writes:
>
>>>> +#+begin_src emacs-lisp
>>>> + * totally secret :crypt:
>
> PS: I guess this should have been "#+begin_src org" instead.
Actually, we settled on "#+begin_example" instead, because of
fontification issues.
Fixed. Thank you.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to use org-crypt with different key per file or node?
2018-04-27 12:27 ` Gregor Zattler
2018-04-27 13:13 ` Nicolas Goaziou
@ 2018-05-05 6:28 ` stardiviner
1 sibling, 0 replies; 8+ messages in thread
From: stardiviner @ 2018-05-05 6:28 UTC (permalink / raw)
To: Gregor Zattler; +Cc: emacs-orgmode
Can let this property CRYPTKEY support interactive select keys from minibuffer?
Manully input is not an good choice obviously.
How to let org-mode property auto prompt for a list of keys after
inserted property key "CRYPTKEY"?
--
[ stardiviner ] don't need to convince with trends.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-05-05 6:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-26 14:09 how to use org-crypt with different key per file or node? Gregor Zattler
2018-04-26 15:31 ` Marco Wahl
2018-04-27 12:27 ` Gregor Zattler
2018-04-27 13:13 ` Nicolas Goaziou
2018-04-27 13:30 ` Gregor Zattler
2018-04-27 13:49 ` Bastien
2018-04-27 14:15 ` Nicolas Goaziou
2018-05-05 6:28 ` stardiviner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).