* [Bug?] org-crypt warning and --daemon
@ 2011-03-14 18:00 Memnon Anon
2011-03-17 9:31 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: Memnon Anon @ 2011-03-14 18:00 UTC (permalink / raw)
To: emacs-orgmode
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"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bug?] org-crypt warning and --daemon
2011-03-14 18:00 [Bug?] org-crypt warning and --daemon Memnon Anon
@ 2011-03-17 9:31 ` Bastien
2011-03-17 10:14 ` Julien Danjou
0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2011-03-17 9:31 UTC (permalink / raw)
To: Memnon Anon; +Cc: emacs-orgmode
Hi Memnon,
Memnon Anon <gegendosenfleisch@googlemail.com> writes:
> 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...
I removed the warning when emacs is run in daemon. Both sit-for and the
warning seem useless to me in daemon mode.
(Btw, I also wonder if it really makes sense to have auto-save-default
turned on in daemon mode.)
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bug?] org-crypt warning and --daemon
2011-03-17 9:31 ` Bastien
@ 2011-03-17 10:14 ` Julien Danjou
2011-03-17 10:18 ` Bastien
2011-03-17 10:19 ` Bastien
0 siblings, 2 replies; 5+ messages in thread
From: Julien Danjou @ 2011-03-17 10:14 UTC (permalink / raw)
To: Bastien; +Cc: Memnon Anon, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
On Thu, Mar 17 2011, Bastien wrote:
> (Btw, I also wonder if it really makes sense to have auto-save-default
> turned on in daemon mode.)
I don't see why it would not?
--
Julien Danjou
❱ http://julien.danjou.info
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bug?] org-crypt warning and --daemon
2011-03-17 10:14 ` Julien Danjou
@ 2011-03-17 10:18 ` Bastien
2011-03-17 10:19 ` Bastien
1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2011-03-17 10:18 UTC (permalink / raw)
To: Memnon Anon; +Cc: emacs-orgmode
Julien Danjou <julien@danjou.info> writes:
> On Thu, Mar 17 2011, Bastien wrote:
>
>> (Btw, I also wonder if it really makes sense to have auto-save-default
>> turned on in daemon mode.)
>
> I don't see why it would not?
Yes, you're right.
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bug?] org-crypt warning and --daemon
2011-03-17 10:14 ` Julien Danjou
2011-03-17 10:18 ` Bastien
@ 2011-03-17 10:19 ` Bastien
1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2011-03-17 10:19 UTC (permalink / raw)
To: Memnon Anon, Julien Danjou; +Cc: emacs-orgmode
Julien Danjou <julien@danjou.info> writes:
> On Thu, Mar 17 2011, Bastien wrote:
>
>> (Btw, I also wonder if it really makes sense to have auto-save-default
>> turned on in daemon mode.)
>
> I don't see why it would not?
Mh.. yes, you're right.
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-17 10:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 18:00 [Bug?] org-crypt warning and --daemon Memnon Anon
2011-03-17 9:31 ` Bastien
2011-03-17 10:14 ` Julien Danjou
2011-03-17 10:18 ` Bastien
2011-03-17 10:19 ` Bastien
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).