emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [ANN] org-crypt Version 0.3
@ 2009-05-18 16:40 Peter Jones
  2009-05-18 19:39 ` Scot Becker
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Peter Jones @ 2009-05-18 16:40 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

Sorry for the delays in getting this posted, I've been doing a lot of
traveling lately.

The attached version of org-crypt fixes a few bugs and is just about
ready to be included in org proper.  The only thing it might need before
inclusion in org is automatic encryption via hooks.

I'd like to find out how people feel about that.  Should org-crypt
attach itself to org-mode-hook so that it can decrypt encrypted entries
after you open an org file?  At first I thought yes, but now I'm leaning
towards no, you should decrypt entries manually as needed.

I do think that org-crypt should hook itself into before-save-hook so
that all entries that *should* be encrypted are encrypted before the
file touches the disk.  A user of org-crypt shouldn't have to worry
about setting up a hook, it should just happen automatically.

Any suggestions on the best way to make that happen in org-crypt?


[-- Attachment #2: org-crypt.el --]
[-- Type: application/emacs-lisp, Size: 5612 bytes --]

[-- Attachment #3: Type: text/plain, Size: 65 bytes --]


-- 
Peter Jones, http://pmade.com
pmade inc.  Louisville, CO US

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ANN] org-crypt Version 0.3
  2009-05-18 16:40 [ANN] org-crypt Version 0.3 Peter Jones
@ 2009-05-18 19:39 ` Scot Becker
  2009-05-18 21:25 ` Samuel Wales
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Scot Becker @ 2009-05-18 19:39 UTC (permalink / raw)
  To: Peter Jones; +Cc: emacs-orgmode

> I'd like to find out how people feel about that.  Should org-crypt
> attach itself to org-mode-hook so that it can decrypt encrypted entries
> after you open an org file?  At first I thought yes, but now I'm leaning
> towards no, you should decrypt entries manually as needed.

Yes, manually sounds good.  Though there should also be a way to
(manually) decrypt ALL entries at once as well.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ANN] org-crypt Version 0.3
  2009-05-18 16:40 [ANN] org-crypt Version 0.3 Peter Jones
  2009-05-18 19:39 ` Scot Becker
@ 2009-05-18 21:25 ` Samuel Wales
  2009-05-19  6:32 ` Carsten Dominik
  2009-05-19 10:38 ` Ian Barton
  3 siblings, 0 replies; 6+ messages in thread
From: Samuel Wales @ 2009-05-18 21:25 UTC (permalink / raw)
  To: Peter Jones; +Cc: emacs-orgmode

I think that typically you load a library, then run a function to add
stuff to hooks.  That way, loading the library does not have
side-effects.  Some packages use the term "insinuate".

I'd opt for a default of always encrypting when saving and only
decrypting when manually done.  Maybe a little note in the properties
drawer can tell the user how to do this?

On Mon, May 18, 2009 at 09:40, Peter Jones <mlists@pmade.com> wrote:
> Sorry for the delays in getting this posted, I've been doing a lot of
> traveling lately.
>
> The attached version of org-crypt fixes a few bugs and is just about
> ready to be included in org proper.  The only thing it might need before
> inclusion in org is automatic encryption via hooks.
>
> I'd like to find out how people feel about that.  Should org-crypt
> attach itself to org-mode-hook so that it can decrypt encrypted entries
> after you open an org file?  At first I thought yes, but now I'm leaning
> towards no, you should decrypt entries manually as needed.
>
> I do think that org-crypt should hook itself into before-save-hook so
> that all entries that *should* be encrypted are encrypted before the
> file touches the disk.  A user of org-crypt shouldn't have to worry
> about setting up a hook, it should just happen automatically.
>
> Any suggestions on the best way to make that happen in org-crypt?
>
>
>
> --
> Peter Jones, http://pmade.com
> pmade inc.  Louisville, CO US
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>



-- 
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS.  Conflicts of interest are destroying research.  /You/ can
get the disease at any time permanently.  Do science and justice matter to
you?  Posters: http://www.mefreeforall.org/fileadmin/PDFs/ME_Awareness_Posters_2009.pdf
Overview: http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ANN] org-crypt Version 0.3
  2009-05-18 16:40 [ANN] org-crypt Version 0.3 Peter Jones
  2009-05-18 19:39 ` Scot Becker
  2009-05-18 21:25 ` Samuel Wales
@ 2009-05-19  6:32 ` Carsten Dominik
  2009-05-19 10:38 ` Ian Barton
  3 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2009-05-19  6:32 UTC (permalink / raw)
  To: Peter Jones; +Cc: emacs-orgmode


On May 18, 2009, at 6:40 PM, Peter Jones wrote:

> Sorry for the delays in getting this posted, I've been doing a lot of
> traveling lately.
>
> The attached version of org-crypt fixes a few bugs and is just about
> ready to be included in org proper.  The only thing it might need  
> before
> inclusion in org is automatic encryption via hooks.
>
> I'd like to find out how people feel about that.  Should org-crypt
> attach itself to org-mode-hook so that it can decrypt encrypted  
> entries
> after you open an org file?  At first I thought yes, but now I'm  
> leaning
> towards no, you should decrypt entries manually as needed.

Yes, I agree.  It would be good though to have a function
that does it for the entire buffer, just like Scot proposed.
And, this function should be ready so that is can safely be
stuck into org-mode-hook, for people who want to do automatic
decryption.

> I do think that org-crypt should hook itself into before-save-hook so
> that all entries that *should* be encrypted are encrypted before the
> file touches the disk.  A user of org-crypt shouldn't have to worry
> about setting up a hook, it should just happen automatically.

I do agree.  Does anyone know how tis will interact with
auto-safe?  Will the tree be encrypted in my face, when an
auto-safe happens.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ANN] org-crypt Version 0.3
  2009-05-18 16:40 [ANN] org-crypt Version 0.3 Peter Jones
                   ` (2 preceding siblings ...)
  2009-05-19  6:32 ` Carsten Dominik
@ 2009-05-19 10:38 ` Ian Barton
  2009-05-20  8:53   ` [ANN] [Solved] " Ian Barton
  3 siblings, 1 reply; 6+ messages in thread
From: Ian Barton @ 2009-05-19 10:38 UTC (permalink / raw)
  To: emacs-orgmode

> 
> The attached version of org-crypt fixes a few bugs and is just about
> ready to be included in org proper.  The only thing it might need before
> inclusion in org is automatic encryption via hooks.
> 
Peter,
I have just been trying out org-crypt. With a minimal org file:

-*- mode: org; before-save-hook: (org-encrypt-entries) -*-
#+STARTUP: showall
#+STARTUP: hidestars

* Headline 1

* Headline 2 :crypt:
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.9 (GNU/Linux)

[Rest of buffer deleted]

I get the following error:

-----------------------------------------------------------------------
The local variables list in test_crypt.org contains variables that are 
risky (**).

Do you want to apply it?

** before-save-hook: (org-encrypt-entries)
-----------------------------------------------------------------------

I am presuming that this error is coming from org. Any idea what might 
be causing it?

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ANN] [Solved] org-crypt Version 0.3
  2009-05-19 10:38 ` Ian Barton
@ 2009-05-20  8:53   ` Ian Barton
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Barton @ 2009-05-20  8:53 UTC (permalink / raw)
  Cc: emacs-orgmode

Ian Barton wrote:
>>
>> The attached version of org-crypt fixes a few bugs and is just about
>> ready to be included in org proper.  The only thing it might need before
>> inclusion in org is automatic encryption via hooks.
>>
> Peter,
> I have just been trying out org-crypt. With a minimal org file:
> 
> -*- mode: org; before-save-hook: (org-encrypt-entries) -*-
> #+STARTUP: showall
> #+STARTUP: hidestars
> 
> * Headline 1
> 
> * Headline 2 :crypt:
> -----BEGIN PGP MESSAGE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> 
> [Rest of buffer deleted]
> 
> I get the following error:
> 
> -----------------------------------------------------------------------
> The local variables list in test_crypt.org contains variables that are 
> risky (**).
> 
> Do you want to apply it?
> 
> ** before-save-hook: (org-encrypt-entries)
> -----------------------------------------------------------------------
> 
> I am presuming that this error is coming from org. Any idea what might 
> be causing it?
> 

I have now fixed this by adding:

(setq safe-local-variable-values (quote ((before-save-hook 
org-encrypt-entries))))

to my .emacs.

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-20  8:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-18 16:40 [ANN] org-crypt Version 0.3 Peter Jones
2009-05-18 19:39 ` Scot Becker
2009-05-18 21:25 ` Samuel Wales
2009-05-19  6:32 ` Carsten Dominik
2009-05-19 10:38 ` Ian Barton
2009-05-20  8:53   ` [ANN] [Solved] " Ian Barton

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).