* epa when using emacs daemon / delaying function call until after emacsclient frame is opened
@ 2011-06-22 13:53 Benjamin Slade
2011-06-22 15:38 ` Richard Riley
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Slade @ 2011-06-22 13:53 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1910 bytes --]
Context: I run emacs as a daemon.
Problem: I have an emacs module (gmail-notifier) loading on emacs-startup in
my .emacs which makes reference to a private file stored as a .gpg. Since
this tries to load on start-up, it asks for the encryption password on
startup. The problem with this is (1) it doesn't actually work: for some
reason I get a "wrong number of arguments error" and (2) even if it did
work, it would be inconvenient, since I have the emacs daemon autoload on
boot-up.
What would seem ideal is to only have the .gpg loaded once an emacsclient
frame is opened. This page (
http://splash-of-open-sauce.blogspot.com/2011/02/securing-your-private-email-credentials_7309.html)
discusses a similar situation, and suggests doing something like this:
(defun load-secure-config(frame)
(require 'my-config "my-config.gpg"))
(add-hook 'after-make-frame-functions 'load-secure-config)
Essentially putting the reference to the .gpg file in a function which
is only called once the "make-frame-functions" have run.
This seems like a good solution but didn't work for me. Using it
resulted in emacs completely freezing as soon as I opened an
emacsclient frame.
Is there another way of delaying the calling of a function until after
an emacsclient is opened?
--
-----------------------------------------------------------------------------------------------------
Benjamin Slade
Dept. of Linguistics
University of Illinois at Urbana-Champaign
[ http://www.jnanam.net/slade/ ]
Stæfcræft & Vyākaraṇa (lingblog) - http://staefcraeft.blogspot.com
The Babbage Files (techblog) - http://babbagefiles.blogspot.com
-----------------------------------------------------------------------------------------------------
*प*रो ऽक्ष॑का*मा* हि *दे*वाः
'The gods love the obscure.' (Śatapathabrāmaṇa 6.1.1.2)
[-- Attachment #2: Type: text/html, Size: 2744 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: epa when using emacs daemon / delaying function call until after emacsclient frame is opened
2011-06-22 13:53 epa when using emacs daemon / delaying function call until after emacsclient frame is opened Benjamin Slade
@ 2011-06-22 15:38 ` Richard Riley
0 siblings, 0 replies; 4+ messages in thread
From: Richard Riley @ 2011-06-22 15:38 UTC (permalink / raw)
To: help-gnu-emacs
Benjamin Slade <slade@jnanam.net> writes:
> Context: I run emacs as a daemon.
>
> Problem: I have an emacs module (gmail-notifier) loading on
> emacs-startup in my .emacs which makes reference to a private file
> stored as a .gpg. Since this tries to load on start-up, it asks for
> the encryption password on startup. The problem with this is (1) it
> doesn't actually work: for some reason I get a "wrong number of
> arguments error" and (2) even if it did work, it would be
> inconvenient, since I have the emacs daemon autoload on boot-up.
>
> What would seem ideal is to only have the .gpg loaded once an
> emacsclient frame is opened. This page (http://
> splash-of-open-sauce.blogspot.com/2011/02/
> securing-your-private-email-credentials_7309.html ) discusses a
> similar situation, and suggests doing something like this:
>
>
> (defun load-secure-config(frame)
> (require 'my-config "my-config.gpg"))
>
>
>
> (add-hook 'after-make-frame-functions 'load-secure-config)
>
> Essentially putting the reference to the .gpg file in a function which is only called once the "make-frame-functions" have run.
>
>
>
> This seems like a good solution but didn't work for me. Using it resulted in emacs completely freezing as soon as I opened an emacsclient frame.
>
> Is there another way of delaying the calling of a function until after an emacsclient is opened?
Just FYI that was my article and I ended up giving up.... Weak I know ;)
I start emacs daemon when I first start emacs and use the gpg agent and
gtk-pinentry.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: epa when using emacs daemon / delaying function call until after emacsclient frame is opened
@ 2011-06-22 19:56 Benjamin Slade
2011-06-22 21:17 ` Richard Riley
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Slade @ 2011-06-22 19:56 UTC (permalink / raw)
To: help-gnu-emacs, rileyrg
[-- Attachment #1: Type: text/plain, Size: 460 bytes --]
Date: Wed, 22 Jun 2011 17:38:58 +0200
From: Richard Riley <rileyrg@googlemail.com>
>Just FYI that was my article and I ended up giving up.... Weak I know ;)
> I start emacs daemon when I first start emacs and use the gpg agent and
> gtk-pinentry.
That's unfortunate. I'm just manually calling the function that needs to
look at the gpg file after I open up an emacs frame (which is very
non-ideal). There must be some way of making this work, I would think.
[-- Attachment #2: Type: text/html, Size: 561 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: epa when using emacs daemon / delaying function call until after emacsclient frame is opened
2011-06-22 19:56 Benjamin Slade
@ 2011-06-22 21:17 ` Richard Riley
0 siblings, 0 replies; 4+ messages in thread
From: Richard Riley @ 2011-06-22 21:17 UTC (permalink / raw)
To: help-gnu-emacs
Benjamin Slade <slade@jnanam.net> writes:
> Date: Wed, 22 Jun 2011 17:38:58 +0200
> From: Richard Riley <rileyrg@googlemail.com>
>
>>Just FYI that was my article and I ended up giving up.... Weak I
> know ;)
>> I start emacs daemon when I first start emacs and use the gpg agent
> and
>> gtk-pinentry.
>
> That's unfortunate. I'm just manually calling the function that needs
> to look at the gpg file after I open up an emacs frame (which is very
> non-ideal). There must be some way of making this work, I would
> think.
If you dont need it until you open a frame then it should be easy but
that said I am guessing you are starting emacs as you login for a
reason and the timing is the issue if you need to open the gpg to get
passwords for "daemon"y things. I found issues with gpg-agent and
keychain when starting emacs automatically. Best of luck anyway!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-22 21:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22 13:53 epa when using emacs daemon / delaying function call until after emacsclient frame is opened Benjamin Slade
2011-06-22 15:38 ` Richard Riley
-- strict thread matches above, loose matches on Subject: below --
2011-06-22 19:56 Benjamin Slade
2011-06-22 21:17 ` Richard Riley
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).