modern Wanderlust + gpg2 (GnuPG 2.2+) configuration

"Greg A. Woods" <[email protected]> Tue, 06 Nov 2018 15:06:05 -0800
Newsgroups gmane.mail.wanderlust.general
Organization Planix, Inc.
Message-ID <[email protected]>
Here's what I've done to get OpenPGP handling working again with GnuPG
v2.2.10, this after upgrading Emacs, GnuPG, Wanderlust, SEMI, et. al

I'm currently running Emacs-25.3 (for use with email).

I'm using Wanderlust and its prerequisites from MELPA (20180826.1349)

The tricky part was getting passphrase entry to work with pinentry.  I
had to re-define `pgg-gpg-use-agent-p' to stop it from doing old and
broken things that no longer work with any half-recent GnuPG.

(setq mime-edit-pgp-verbose t)
;; XXX this was necessary to see any keys in the *Keys* buffer when signing
;; (it should not be necessary -- just list secret keys if this is nil!!!)
(setq mime-edit-pgp-signers '("[email protected]" "[email protected]"))

(setq mime-setup-enable-pgp t)		; it is the default

;; use GNU Privacy Guard V2
(require 'pgg-gpg)
(setq pgg-default-scheme 'gpg)		; for composing
(setq pgg-scheme 'gpg)			; for verify/decrypt
(setq pgg-gpg-program "gpg2")		; for pkgsrc name

(setq pgg-gpg-use-agent t)		; it is the default

;; redefine this to just use `pgg-gpg-use-agent'
;; (GPG_AGENT_INFO and related is long gone and useless)
(defun pgg-gpg-use-agent-p ()
  "Return t if `pgg-gpg-use-agent' is t."
  pgg-gpg-use-agent)
;; you must add the line "allow-emacs-pinentry" to "~/.gnupg/gpg-agent.conf"
(require 'pinentry)
(pinentry-start)

;; do not allow these to be hidden (removed the leading space in their names)
(setq pgg-status-buffer "*PGG status*")
(setq pgg-errors-buffer "*PGG errors*")
(setq pgg-output-buffer "*PGG output*")

(setq pgg-default-keyserver-address "pool.sks-keyservers.net")

;; set up a way for pgg to fetch text from a URL such that it appears on stdout
;;
(setq pgg-insert-url-function  (function pgg-insert-url-with-program))
(setq pgg-insert-url-program "ftp")
(setq pgg-insert-url-extra-arguments '("-o" "-"))


--
					Greg A. Woods <[email protected]>

+1 250 762-7675                           RoboHack <[email protected]>
Planix, Inc. <[email protected]>     Avoncote Farms <[email protected]>
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRuK6dmwVAucmRxuh9mfXG3eL/0fwUCW+IeVAAKCRBmfXG3eL/0
fxAqAKD3BMCO+lxf9v5wDgNoUySEtlU6zwCfVO69ETOja19tT3iatDjwennhTgI=
=3Cv3
-----END PGP SIGNATURE-----