unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Richard Riley <rileyrg@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: epa when using emacs daemon / delaying function call until after emacsclient frame is opened
Date: Wed, 22 Jun 2011 17:38:58 +0200	[thread overview]
Message-ID: <u44o3h3mgd.fsf@news.eternal-september.org> (raw)
In-Reply-To: BANLkTineWBcJSJ9yrKV0RDpbnH-O0qWQrg@mail.gmail.com


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.





  reply	other threads:[~2011-06-22 15:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-06-22 19:56 Benjamin Slade
2011-06-22 21:17 ` Richard Riley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u44o3h3mgd.fsf@news.eternal-september.org \
    --to=rileyrg@googlemail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).