all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Warning with --daemon
@ 2011-03-14 12:00 Memnon Anon
  2011-03-14 12:36 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Memnon Anon @ 2011-03-14 12:00 UTC (permalink / raw
  To: help-gnu-emacs

Hi,

orgmode introduced a new warning for one of its features I use.
I usually start emacs with --daemon; the startup stops whenever this
warning is displayed. 

The only way to continue seems to press RET, but this has a side effect:
A newline is added to a buffer - probably the buffer loaded ATM by
desktop-save-mode. 

Is there any other way to continue the init of emacs?
It seems to me there must be a way to let emacs know I saw the warning
without affecting the buffer.

Memnon


        




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

* Re: Warning with --daemon
  2011-03-14 12:00 Warning with --daemon Memnon Anon
@ 2011-03-14 12:36 ` Eli Zaretskii
  2011-03-14 13:55   ` Memnon Anon
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2011-03-14 12:36 UTC (permalink / raw
  To: help-gnu-emacs

> From: Memnon Anon <gegendosenfleisch@googlemail.com>
> Date: Mon, 14 Mar 2011 12:00:03 +0000 (UTC)
> 
> orgmode introduced a new warning for one of its features I use.
> I usually start emacs with --daemon; the startup stops whenever this
> warning is displayed. 

What feature? what warning?

Please say at least that much, it's hard to give advice otherwise.



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

* Re: Warning with --daemon
  2011-03-14 12:36 ` Eli Zaretskii
@ 2011-03-14 13:55   ` Memnon Anon
  2011-03-14 16:22     ` Eli Zaretskii
       [not found]     ` <mailman.2.1300119763.2531.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Memnon Anon @ 2011-03-14 13:55 UTC (permalink / raw
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Memnon Anon <gegendosenfleisch@googlemail.com>
>> Date: Mon, 14 Mar 2011 12:00:03 +0000 (UTC)
>> 
>> orgmode introduced a new warning for one of its features I use.
>> I usually start emacs with --daemon; the startup stops whenever this
>> warning is displayed. 
>
> What feature? what warning?
>
> Please say at least that much, it's hard to give advice otherwise.

Sorry, I did not think the specific warning is relevant.

,----[ http://orgmode.org/Changes.html#sec-1_3_3 ]
| Security warning: using org-crypt with auto-save
| 
| To prevent Emacs from auto-saving encrypted entries in clear text, the
| user should not use auto-save with org-crypt.el. We now send a warning
| when users are both using auto-saving and org-crypt.el. Thanks to Peter
| Jones for bringing this up.
`----

The relevant code seems to be this:

,----[ 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))
`----

I should have tried to pinpoint the relevant location before asking ...
I thought there was a special general warning function involved, but
it is basically just a message and a (sit-for 5) ...

Trying to verify this is really the relevant bit: 

Starting "emacs --daemon ~/.emacs" with this .emacs:
-------------.emacs--------
(sit-for 5)
-------------

I need to press enter to finish the startup.
"emacsclient -c" and a subsequent `C-x b .emacs':

-------------.emacs--------

(sit-for 5)
-------------

(Newline at the top of .emacs. Seems like a result oft the RET, right?).
So I *guess* using sit-for in .emacs + usage of daemon is the problem?

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"

I just installed the emacs-snapshot package and the same happens with

GNU Emacs 24.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1) of
2011-03-09 on cigue, modified by Debian

I did a quick search on debbugs.gnu.org, but I found nothing relevant so
far...

I can't think of any information to add at this point, if you need any,
I'll provide them ASAP.

Thanks,
Memnon




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

* Re: Warning with --daemon
  2011-03-14 13:55   ` Memnon Anon
@ 2011-03-14 16:22     ` Eli Zaretskii
  2011-03-16 16:14       ` Bastien
       [not found]     ` <mailman.2.1300119763.2531.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2011-03-14 16:22 UTC (permalink / raw
  To: help-gnu-emacs

> From: Memnon Anon <gegendosenfleisch@googlemail.com>
> Date: Mon, 14 Mar 2011 13:55:57 +0000 (UTC)
> 
> ,----[ 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))
> `----

I can suggest two things, not necessarily mutually exclusive:

 1) modify org-crypt.el to change this:

      (when auto-save-default

    to say

      (when (and (daemonp) auto-save-default)

    instead.  The recompile org-crypt.el, and Bob's your uncle (at
    least until you upgrade to the next version of Org ;-)

 2) file a bug against Org mode, because they obviously didn't think
    about the use case of this code running when a daemon is started.



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

* Re: Warning with --daemon
       [not found]     ` <mailman.2.1300119763.2531.help-gnu-emacs@gnu.org>
@ 2011-03-15 14:23       ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2011-03-15 14:23 UTC (permalink / raw
  To: help-gnu-emacs

>  2) file a bug against Org mode, because they obviously didn't think
>     about the use case of this code running when a daemon is started.

They might also want to use a write-region-annotate-function rather
than a before-save-hook, so that encryption can take place upon
auto-save as well.


        Stefan


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

* Re: Warning with --daemon
  2011-03-14 16:22     ` Eli Zaretskii
@ 2011-03-16 16:14       ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2011-03-16 16:14 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Hi Eli,

Eli Zaretskii <eliz@gnu.org> writes:

> I can suggest two things, not necessarily mutually exclusive:
>
>  1) modify org-crypt.el to change this:
>
>       (when auto-save-default
>
>     to say
>
>       (when (and (daemonp) auto-save-default)
>
>     instead.  The recompile org-crypt.el, and Bob's your uncle (at
>     least until you upgrade to the next version of Org ;-)

Thanks for the suggestion -- i modified like this:

,----
| (when (and (not (daemonp)) auto-save-default)
|   (message "Warning: turn auto-save-mode off in Org buffers containing crypted entries.")
|   (sit-for 5))
`----

so that the warning is sent when Emacs is *not* in daemon mode.

>  2) file a bug against Org mode, because they obviously didn't think
>     about the use case of this code running when a daemon is started.

I obviously overlooked this, right :)

Best,

-- 
 Bastien



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

end of thread, other threads:[~2011-03-16 16:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 12:00 Warning with --daemon Memnon Anon
2011-03-14 12:36 ` Eli Zaretskii
2011-03-14 13:55   ` Memnon Anon
2011-03-14 16:22     ` Eli Zaretskii
2011-03-16 16:14       ` Bastien
     [not found]     ` <mailman.2.1300119763.2531.help-gnu-emacs@gnu.org>
2011-03-15 14:23       ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.