From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: [PATCH] org-crypt: only warn about auto-save-mode when running org-decrypt Date: Mon, 27 Jun 2011 18:31:58 +0200 Message-ID: <87pqlzutfl.fsf@gnu.org> References: <87hb7febzu.fsf@gnu.org> <1308949422-30288-1-git-send-email-pieter@praet.org> <11546.1308952204@alphaville.dokosmarshall.org> <8762ntjdwr.fsf@praet.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbEij-0006fz-6L for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 12:31:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbEig-0000WX-Bm for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 12:31:32 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:39011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbEig-0000WJ-05 for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 12:31:30 -0400 Received: by wyg36 with SMTP id 36so4056766wyg.0 for ; Mon, 27 Jun 2011 09:31:29 -0700 (PDT) In-Reply-To: <8762ntjdwr.fsf@praet.org> (Pieter Praet's message of "Sun, 26 Jun 2011 08:38:12 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Pieter Praet Cc: Dave Abrahams , Nick Dokos , emacs-orgmode@gnu.org Hi Pieter, Thanks for the patch at the end of this thread. Pieter Praet 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? I'm not confident in disabling auto-save-mode globally by default, this would surprise users -- even with a **BiG WaRnInG** message. What do you think? -- Bastien