[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] org-crypt: only warn about auto-save-mode when running o

From: Pieter Praet
Subject: Re: [O] [PATCH] org-crypt: only warn about auto-save-mode when running org-decrypt
Date: Tue, 28 Jun 2011 08:55:46 +0200
User-agent: Notmuch/0.5-243-g5a76944 (http://notmuchmail.org) Emacs/ (x86_64-pc-linux-gnu)

On Mon, 27 Jun 2011 18:31:58 +0200, Bastien <address@hidden> wrote:
> Hi Pieter,
> Thanks for the patch at the end of this thread.
> Pieter Praet <address@hidden> writes:
> > Ideally, we'd have a defcustom `org-crypt-auto-save' with the following 
> > options:
> > - 'ask     : Ask the user whether or not to decrypt the entry.
> > - 'disable : Disable auto-save-mode for the current buffer before 
> > decrypting.
> > - 'ignore  : Decrypt the entry regardless.
> > - 'encrypt : Re-encrypt the entries before auto-save kicks in.
> >
> > I've implemented this, but it fails miserably:
> >
> > Since the function `auto-save-mode' doesn't set an buffer-local
> > var to indicate whether or not it's enabled for the current buffer, we
> > can only check for `auto-save-default'. 
> I think we should first ask emacs-devel to fix this, then implement your
> clean solution.  Would you like to report this problem?

No need. It appears I'm a veritable moron, with apologies to the Emacs folks.

2 lessons I've learned today:
- DON'T test this stuff in a *scratch* buffer (seriously...)
- DO consume sufficient quantities of coffee (IOW, org-encrypt-entries
  doesn't encrypt entries unless they're *tagged* to be)

> I'm not confident in disabling auto-save-mode globally by default, this
> would surprise users -- even with a **BiG WaRnInG** message.

No worries, it's buffer-local.

And I've now changed the default to "ask first, shoot in the foot later".

> What do you think?

"I should send my patch" comes to mind :)

Traffic allowing (lots of sweaty tourists on the road),
it should be there in T-10sec.

> -- 
>  Bastien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]