Handle gpg errors better when trying to display PGP key image.
authorAndreas Schwab <schwab@linux-m68k.org>
Thu, 27 Dec 2012 10:38:09 +0000 (11:38 +0100)
committerAdam Sjøgren <asjo@koldfront.dk>
Thu, 27 Dec 2012 12:08:15 +0000 (13:08 +0100)
* mml2015.el (mml2015-epg-key-image): separate attribute stream from
stderr.

lisp/ChangeLog
lisp/mml2015.el

index eafb422..deda362 100644 (file)
@@ -1,3 +1,8 @@
+2012-12-27  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * mml2015.el (mml2015-epg-key-image): separate attribute stream from
+       stderr.
+
 2012-12-26  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * mml2015.el (mml2015-epg-key-image): Use mm-set-buffer-multibyte.
index 0bc83ad..f8f0a56 100644 (file)
@@ -827,7 +827,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
     (let* ((coding-system-for-write 'binary)
            (coding-system-for-read 'binary)
            (data (shell-command-to-string
-                  (format "%s --list-options no-show-photos --attribute-fd 2 --list-keys %s > /dev/null"
+                  (format "%s --list-options no-show-photos --attribute-fd 3 --list-keys %s 3>&1 >/dev/null 2>&1"
                           epg-gpg-program key-id))))
       (when (> (length data) 0)
         (insert (substring data 16))