From mboxrd@z Thu Jan 1 00:00:00 1970 From: Memnon Anon Subject: [Bug?] org-crypt warning and --daemon Date: Mon, 14 Mar 2011 18:00:09 +0000 (UTC) Message-ID: <8739mpppxc.fsf@mean.albasani.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=34321 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzC4C-0004mB-FO for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 14:00:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzC4A-0003Oz-Re for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 14:00:28 -0400 Received: from lo.gmane.org ([80.91.229.12]:39617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzC4A-0003Np-KM for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 14:00:26 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PzC45-0005Bv-P4 for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 19:00:21 +0100 Received: from e178219038.adsl.alicedsl.de ([85.178.219.38]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Mar 2011 19:00:21 +0100 Received: from gegendosenfleisch by e178219038.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Mar 2011 19:00:21 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, ,----[ org-crypt.el ] | ;; FIXME Find a better way to encrypt Org auto-saved buffers? | ;; When `auto-save-default' is non-nil, make sure entries are | ;; encrypted before auto-saving | ;; (when auto-save-default | ;; (add-hook | ;; 'org-mode-hook | ;; (lambda () (add-hook 'auto-save-hook 'org-encrypt-entries nil t)))) | | (when auto-save-default | (message "Warning: turn auto-save-mode off in Org buffers containing crypted entries.") | (sit-for 5)) `---- This warning has an unfortunate side-effect when emacs is started as daemon. (sit-for 5), AFAICS, stops the startup ... not only for 5 seconds but permanently. The only way to continue seems to press RET. This RET however, ends up creating a newline in whatever buffer is loaded. Eli suggested this: ,----[ gnu.emacs.help, Message-ID: <83pqptr7se.fsf@gnu.org> ] | 1) modify org-crypt.el to change this: | | (when auto-save-default | | to say | | (when (and (daemonp) auto-save-default) `---- However, this would mean that users who always start as daemon will never actually see it, right? So it may be better to always message the warning but only sit-for when emacs is started as daemon... Or is there any way to make "sit-for" work the intended way both in emacs as well as in emacs --daemon? Memnon ELISP> (emacs-version) "GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)\n of 2010-12-11 on raven, modified by Debian" ELISP> (org-version) "Org-mode version 7.5"