From: npostavs@users.sourceforge.net
To: Fkqqrr <fkqqrr@riseup.net>
Cc: 24783@debbugs.gnu.org
Subject: bug#24783: 25.1 launchs gpg-agent --homedir as ~/.emacs.d/elpa/gnupg
Date: Sat, 12 Nov 2016 09:14:16 -0500 [thread overview]
Message-ID: <87lgwon5tz.fsf@users.sourceforge.net> (raw)
In-Reply-To: <874m42kkuk.fsf@riseup.net> (fkqqrr@riseup.net's message of "Mon, 24 Oct 2016 20:11:31 +0800")
Fkqqrr <fkqqrr@riseup.net> writes:
> I am running Emacs 25.1 under Gentoo.
>
> Each time I run `list-packages', Emacs 25.1 launchs Gnupg-2.1 gpg-agent,
> but the `--homedir' argument is set to `~/.emacs.d/elpa/gnupg' though I
> have it to `~/.gnupg' in `~/.gnupg/gpg-agent.conf'.
>
According to `(gnupg) Agent Options':
'--homedir DIR'
Set the name of the home directory to DIR. If this option is not
used, the home directory defaults to '~/.gnupg'. It is only
recognized when given on the command line.
So setting this in gpg-agent.conf wouldn't work (which makes sense,
since you need to know the homedir in order to find the configuration
file).
>
> However if `gpg-agent' is launched before `list-package', Emacs 25.1
> will respect that.
There is some code package.el that changes the gpg homedir:
(defun package-import-keyring (&optional file)
"Import keys from FILE."
(interactive "fFile: ")
(setq file (expand-file-name file))
(let ((context (epg-make-context 'OpenPGP))
(homedir (expand-file-name "gnupg" package-user-dir)))
(with-file-modes 448
(make-directory homedir t))
(setf (epg-context-home-directory context) homedir)
(message "Importing %s..." (file-name-nondirectory file))
(epg-import-keys-from-file context file)
(message "Importing %s...done" (file-name-nondirectory file))))
Perhaps this setf should be a letf instead?
next prev parent reply other threads:[~2016-11-12 14:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 12:11 bug#24783: 25.1 launchs gpg-agent --homedir as ~/.emacs.d/elpa/gnupg Fkqqrr
2016-11-12 14:14 ` npostavs [this message]
2016-11-14 10:47 ` Daiki Ueno
2016-11-24 5:01 ` Fkqqrr
2016-11-24 6:23 ` Daiki Ueno
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgwon5tz.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=24783@debbugs.gnu.org \
--cc=fkqqrr@riseup.net \
/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.
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.