Gnus development mailing list
 help / color / mirror / Atom feed
* Displaying picture from PGP key if present?
@ 2012-12-15 14:12 Adam Sjøgren
  2012-12-25 11:43 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-15 14:12 UTC (permalink / raw)
  To: ding

I just realized that it would be cool if Gnus would display the image in
a PGP key when displaying a PGP-signature...

That oughtn't be too hard, right?


  Best regards,

    Adam

-- 
 "Never never mind."                                          Adam Sjøgren
                                                         asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-15 14:12 Displaying picture from PGP key if present? Adam Sjøgren
@ 2012-12-25 11:43 ` Lars Ingebrigtsen
  2012-12-25 11:51   ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-25 11:43 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> I just realized that it would be cool if Gnus would display the image in
> a PGP key when displaying a PGP-signature...

There are images in PGP keys?

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 11:43 ` Lars Ingebrigtsen
@ 2012-12-25 11:51   ` Adam Sjøgren
  2012-12-25 12:00     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-25 11:51 UTC (permalink / raw)
  To: ding

On Tue, 25 Dec 2012 12:43:56 +0100, Lars wrote:

> asjo@koldfront.dk (Adam Sjøgren) writes:

>> I just realized that it would be cool if Gnus would display the image in
>> a PGP key when displaying a PGP-signature...

> There are images in PGP keys?

There can be.

Try something like:

  $ gpg --recv-key A94B3003
  $ gpg --show-photos --list-key A94B3003

I recently took my (non-committed¹) implementation of
X-Image-URL:-support and hacked it (further) up to show pictures of
people from the internal phonebook at work - that's where the idea came
from.


  Best regards,

    Adam


¹ Seems that no one uses X-Image-URL: any more, not even Apple.

-- 
 "Politics is the art of looking for trouble, finding         Adam Sjøgren
  it everywhere, diagnosing it incorrectly and applying  asjo@koldfront.dk
  the wrong remedies."




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 11:51   ` Adam Sjøgren
@ 2012-12-25 12:00     ` Lars Ingebrigtsen
  2012-12-25 12:05       ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-25 12:00 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Try something like:
>
>   $ gpg --recv-key A94B3003
>   $ gpg --show-photos --list-key A94B3003

Nice.  Is it used much?  I mean, gpg signing isn't used a lot as it is,
but among the ones that use it, do a lot, er, use it?

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 12:00     ` Lars Ingebrigtsen
@ 2012-12-25 12:05       ` Adam Sjøgren
  2012-12-25 12:20         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-25 12:05 UTC (permalink / raw)
  To: ding

On Tue, 25 Dec 2012 13:00:05 +0100, Lars wrote:

> asjo@koldfront.dk (Adam Sjøgren) writes:

>> $ gpg --show-photos --list-key A94B3003

> Nice.  Is it used much?  I mean, gpg signing isn't used a lot as it is,
> but among the ones that use it, do a lot, er, use it?

Of the 448 public keys I have in my keyring, 86 have an image - almost
20%.

My public key collection is probably somewhat biased, but...


  Best regards,

    Adam

-- 
 "Actually, now that my good side is no longer a              Adam Sjøgren
  physical being, I find him that much easier to         asjo@koldfront.dk
  ignore"




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 12:05       ` Adam Sjøgren
@ 2012-12-25 12:20         ` Lars Ingebrigtsen
  2012-12-25 13:20           ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-25 12:20 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Of the 448 public keys I have in my keyring, 86 have an image - almost
> 20%.

In that case it sounds worthwhile.  So go ahead.  :-)

(I know virtually nothing about the entire GPG subsystem in Emacs/Gnus.)

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 12:20         ` Lars Ingebrigtsen
@ 2012-12-25 13:20           ` Adam Sjøgren
  2012-12-25 13:47             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-25 13:20 UTC (permalink / raw)
  To: ding

On Tue, 25 Dec 2012 13:20:03 +0100, Lars wrote:

> asjo@koldfront.dk (Adam Sjøgren) writes:

>> Of the 448 public keys I have in my keyring, 86 have an image - almost
>> 20%.

> In that case it sounds worthwhile.  So go ahead.  :-)

Thanks!

I guess I should start by looking at how application/pgp-signature and
application/pgp-encrypted parts are displayed.

Ok, so, displaying a signed email is done by mml2015-epg-verify in
mml2015.el by default.

This comes from mm-verify-function-alist in mm-decode.el, where
application/pgp-signature goes to mml2015-verify.

Ok.

Looking through mml2015-epg-verify (for some reason edebug-defun jumps
over the entire function), the function epg-verify-result-to-string
sounds like a good candidate for adding the image.

Maybe changing epg.el would be the right thing to do? I don't know how
to return a string with an image in it, though.

Hey, maybe I can alter the output of epg-verify-result-to-string in
mml2015-epg-verify with a function that finds the key in the string,
checks for an image, and adds if it it exists, instead?

Hm, this is how far I got. Mangling:

      (mm-set-handle-multipart-parameter
       mm-security-handle 'gnus-info
       (epg-verify-result-to-string (epg-context-result-for context 'verify)))

in mml2015-epg-verify into something-that-fetches-the-image-and-adds-it
is kind of... daunting.

> (I know virtually nothing about the entire GPG subsystem in Emacs/Gnus.)

(Heh, and I do? :-))


  Best regards,

    Adam

-- 
 "Bara russin, ingen kaka"                                    Adam Sjøgren
                                                         asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 13:20           ` Adam Sjøgren
@ 2012-12-25 13:47             ` Lars Ingebrigtsen
  2012-12-25 22:33               ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-25 13:47 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Maybe changing epg.el would be the right thing to do? I don't know how
> to return a string with an image in it, though.

You can `propertize' the string with an 'display' property that contains
an image.

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 13:47             ` Lars Ingebrigtsen
@ 2012-12-25 22:33               ` Adam Sjøgren
  2012-12-25 22:38                 ` Adam Sjøgren
                                   ` (3 more replies)
  0 siblings, 4 replies; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-25 22:33 UTC (permalink / raw)
  To: ding

On Tue, 25 Dec 2012 14:47:42 +0100, Lars wrote:

> You can `propertize' the string with an 'display' property that contains
> an image.

Thanks, that was the push I needed.

Although my start of a solution is somewhat hackish in the way that I
get the image; I should probably read some more of epg.el to find some
code that does the "shell-command-to-string" bit in the appropriate way.

Anyway, here is what I got:


Show image from PGP key, if present, in signatures.

* epg.el (epg-signature-to-string): use new functions
epg-key-image, epg-key-image-to-string to find and display
image from key.
---
 lisp/epg.el |   22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/lisp/epg.el b/lisp/epg.el
index b0e01bc..d711c28 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -966,11 +966,28 @@ This function is for internal use only."
 	(setcdr entry value)
       (epg-context-set-result context (cons (cons name value) result)))))
 
+(defun epg-key-image (key-id)
+  "Return the image of a key, if any"
+  (let ((filename (replace-regexp-in-string "\n" "" (shell-command-to-string (concat "/usr/bin/gpg --photo-viewer 'echo %I >&2' --list-keys " key-id " > /dev/null")))))
+    (when (and (not (string-equal filename "")) (file-exists-p filename))
+      (create-image filename))))
+
+(defun epg-key-image-to-string (key-id)
+  "Return a string with the image of a key, if any"
+  (let* ((result "")
+         (key-image (epg-key-image key-id)))
+    (when key-image
+      (setq result "  ")
+      (put-text-property 1 2 'display key-image result))
+    result))
+
 (defun epg-signature-to-string (signature)
   "Convert SIGNATURE to a human readable string."
   (let* ((user-id (cdr (assoc (epg-signature-key-id signature)
 			      epg-user-id-alist)))
-	 (pubkey-algorithm (epg-signature-pubkey-algorithm signature)))
+	 (pubkey-algorithm (epg-signature-pubkey-algorithm signature))
+	 (key-id (epg-signature-key-id signature))
+	 (key-image (epg-key-image-to-string key-id)))
     (concat
      (cond ((eq (epg-signature-status signature) 'good)
 	    "Good signature from ")
@@ -984,7 +1001,8 @@ This function is for internal use only."
 	    "Signature made by revoked key ")
 	   ((eq (epg-signature-status signature) 'no-pubkey)
 	    "No public key for "))
-     (epg-signature-key-id signature)
+     key-id
+     key-image
      (if user-id
 	 (concat " "
 		 (if (stringp user-id)
-- 
1.7.10.4


-- 
 "Boy, I love summer vacation.                                Adam Sjøgren
  I can feel my brain beginning to atrophy already."     asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 22:33               ` Adam Sjøgren
@ 2012-12-25 22:38                 ` Adam Sjøgren
  2012-12-25 22:43                 ` Lars Ingebrigtsen
                                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-25 22:38 UTC (permalink / raw)
  To: ding

On Tue, 25 Dec 2012 23:33:38 +0100, Adam wrote:

> Show image from PGP key, if present, in signatures.

Examples in gmane.emacs.devel:

 * Signed with key with image: <50D65C31.5020503@dancol.org>
 * Signed with key without image: <8738yyjg57.fsf@dex.adm.naquadah.org>


  Best regards,

    Adam

-- 
 "It is just what they are gathered here to do, that I        Adam Sjøgren
  find so ineffably, horrificly repugnant."              asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 22:33               ` Adam Sjøgren
  2012-12-25 22:38                 ` Adam Sjøgren
@ 2012-12-25 22:43                 ` Lars Ingebrigtsen
  2012-12-25 22:57                 ` Andreas Schwab
  2012-12-26  4:22                 ` Daiki Ueno
  3 siblings, 0 replies; 36+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-25 22:43 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Thanks, that was the push I needed.
>
> Although my start of a solution is somewhat hackish in the way that I
> get the image; I should probably read some more of epg.el to find some
> code that does the "shell-command-to-string" bit in the appropriate way.
>
> Anyway, here is what I got:
>
> Show image from PGP key, if present, in signatures.

Thanks; applied to the Emacs trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 22:33               ` Adam Sjøgren
  2012-12-25 22:38                 ` Adam Sjøgren
  2012-12-25 22:43                 ` Lars Ingebrigtsen
@ 2012-12-25 22:57                 ` Andreas Schwab
  2012-12-25 23:06                   ` Adam Sjøgren
  2012-12-26  4:22                 ` Daiki Ueno
  3 siblings, 1 reply; 36+ messages in thread
From: Andreas Schwab @ 2012-12-25 22:57 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> +(defun epg-key-image (key-id)
> +  "Return the image of a key, if any"
> +  (let ((filename (replace-regexp-in-string "\n" "" (shell-command-to-string (concat "/usr/bin/gpg --photo-viewer 'echo %I >&2' --list-keys " key-id " > /dev/null")))))

That does nothing without --list-options show-photos.  Also, the created
file should be cleaned up somehow.  You should probably use
--attribute-fd instead of letting gpg export the image to a file.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 22:57                 ` Andreas Schwab
@ 2012-12-25 23:06                   ` Adam Sjøgren
  2012-12-26  0:33                     ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-25 23:06 UTC (permalink / raw)
  To: ding

On Tue, 25 Dec 2012 23:57:21 +0100, Andreas wrote:

> asjo@koldfront.dk (Adam Sjøgren) writes:

>> (shell-command-to-string (concat "/usr/bin/gpg --photo-viewer 'echo
>> %I >&2' --list-keys " key-id " > /dev/null")))))

> That does nothing without --list-options show-photos.

Ouch, yes. I have "show-photos" in my ~/.gnupg/gpg.conf file...

Hm. Maybe this is a feature? This way epg will only show photos if you
have configured gpg to do so...

> Also, the created file should be cleaned up somehow.

Good point. That should only be a (delete-file filename) away.

> You should probably use --attribute-fd instead of letting gpg export
> the image to a file.

I was just happy to get anything working at all :-)

Thanks for the tips; I will try to figure out how to do it using
--attribute-fd.


  Best regards,

    Adam

-- 
 "A distributed system is one in which the failure of         Adam Sjøgren
  a computer you didn't even know existed can render     asjo@koldfront.dk
  your own computer unusable."




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 23:06                   ` Adam Sjøgren
@ 2012-12-26  0:33                     ` Adam Sjøgren
  2012-12-26  1:12                       ` Adam Sjøgren
  2012-12-26  9:14                       ` Andreas Schwab
  0 siblings, 2 replies; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-26  0:33 UTC (permalink / raw)
  To: ding

On Wed, 26 Dec 2012 00:06:49 +0100, Adam wrote:

>> Also, the created file should be cleaned up somehow.

> Good point. That should only be a (delete-file filename) away.

(No; it seems that create-image doesn't actually read the file, so
deleting it right after that doesn't work.)

>> You should probably use --attribute-fd instead of letting gpg export
>> the image to a file.

From my experimenting it seems that I can't get just the image out on
the --attribute-fd I give - I get 16 bytes more than the image; and this
in the terminal:

  [GNUPG:] ATTRIBUTE 1659209319D5C06ED3203A201D27DB4BA94B3003 2686 1 1 1 1194925497 0 0

which does not seem helpful; especially as I can't find any explanation
of what the different stuff means (second number is the length, first is
they key I am listing).

So, I'm kind of stuck on that.

Then I tried this to avoid the temporary file in this way:

  (defun my-epg-key-image (key-id)
    "Return the image of a key, if any"
    (let* ((coding-system-for-write 'binary)
           (coding-system-for-read 'binary)
           (data (shell-command-to-string (concat epg-gpg-program
                                                  " --list-options show-photos"
                                                  " --photo-viewer 'cat - >&2'"
                                                  " --list-keys " key-id " >/dev/null"))))
      (when (> (length data) 0)
        (create-image data nil t))))

but for some reason the resulting image is just a white square. I guess
there is some encoding/uni/multibyte thing I'm missing.

Hm. Maybe I should just skip the first 16 bytes when using --attribute-fd...


  Best regards,

    Adam

-- 
 "A distributed system is one in which the failure of         Adam Sjøgren
  a computer you didn't even know existed can render     asjo@koldfront.dk
  your own computer unusable."




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-26  0:33                     ` Adam Sjøgren
@ 2012-12-26  1:12                       ` Adam Sjøgren
  2012-12-26  5:44                         ` Daiki Ueno
                                           ` (2 more replies)
  2012-12-26  9:14                       ` Andreas Schwab
  1 sibling, 3 replies; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-26  1:12 UTC (permalink / raw)
  To: ding

On Wed, 26 Dec 2012 01:33:33 +0100, Adam wrote:

> So, I'm kind of stuck on that.

Skipping the first 16 bytes and using a non-multibyte buffer on the way
makes it work with --attribute-fd:

(defun epg-key-image (key-id)
  "Return the image of a key, if any"
  (with-temp-buffer
    (set-buffer-multibyte nil)
    (let* ((coding-system-for-write 'binary)
           (coding-system-for-read 'binary)
           (data (shell-command-to-string (concat epg-gpg-program
                                                  " --attribute-fd 2"
                                                  " --list-keys " key-id " >/dev/null"))))
      (when (> (length data) 0)
        (insert (substring data 16))
        (create-image (buffer-string) nil t)))))


  Best regards,

    Adam

-- 
 "Vejen ender, bålet brænder                                  Adam Sjøgren
  Det brænder for dig, Alexander"                        asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-25 22:33               ` Adam Sjøgren
                                   ` (2 preceding siblings ...)
  2012-12-25 22:57                 ` Andreas Schwab
@ 2012-12-26  4:22                 ` Daiki Ueno
  3 siblings, 0 replies; 36+ messages in thread
From: Daiki Ueno @ 2012-12-26  4:22 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Show image from PGP key, if present, in signatures.

Thanks for the patch and sorry for not reacting earlier.

> * epg.el (epg-signature-to-string): use new functions
> epg-key-image, epg-key-image-to-string to find and display
> image from key.

I moved the code to mml2015.el (sorry!), as I think epg.el is not the
right place to accommodate display related code.

I agree that epg-key-image is generally useful, but if it is implemented
in epg.el, it should be ideally implemented in more gpg-integrated way
e.g. using --attribute-fd of gpg, etc.

Regards,
-- 
Daiki Ueno



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-26  1:12                       ` Adam Sjøgren
@ 2012-12-26  5:44                         ` Daiki Ueno
  2012-12-26 13:24                           ` Adam Sjøgren
  2012-12-27  5:16                         ` Arne Jørgensen
  2012-12-27 10:06                         ` Julien Danjou
  2 siblings, 1 reply; 36+ messages in thread
From: Daiki Ueno @ 2012-12-26  5:44 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Skipping the first 16 bytes and using a non-multibyte buffer on the way
> makes it work with --attribute-fd:
>
> (defun epg-key-image (key-id)

Yes.  But rather than having a separate function, the code would better
be merged into `epg-list-keys' so attribute data can be associated with
each epg-key object, I think.

Unfortunately, `epg-list-keys' does not handle status-fd currently
(unlike `epg-decrypt-string', etc.) though.

Regards,
-- 
Daiki Ueno



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-26  0:33                     ` Adam Sjøgren
  2012-12-26  1:12                       ` Adam Sjøgren
@ 2012-12-26  9:14                       ` Andreas Schwab
  2012-12-26 13:17                         ` Adam Sjøgren
  1 sibling, 1 reply; 36+ messages in thread
From: Andreas Schwab @ 2012-12-26  9:14 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> From my experimenting it seems that I can't get just the image out on
> the --attribute-fd I give - I get 16 bytes more than the image; and this
> in the terminal:
>
>   [GNUPG:] ATTRIBUTE 1659209319D5C06ED3203A201D27DB4BA94B3003 2686 1 1 1 1194925497 0 0
>
> which does not seem helpful; especially as I can't find any explanation
> of what the different stuff means

It's all explained in the gpg manual.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-26  9:14                       ` Andreas Schwab
@ 2012-12-26 13:17                         ` Adam Sjøgren
  2012-12-26 18:05                           ` Andreas Schwab
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-26 13:17 UTC (permalink / raw)
  To: ding

On Wed, 26 Dec 2012 10:14:41 +0100, Andreas wrote:

> asjo@koldfront.dk (Adam Sjøgren) writes:

>> especially as I can't find any explanation of what the different
>> stuff means

> It's all explained in the gpg manual.

Then I was not good enough/too impatient at finding it. Care to share a
link?


  Best regards,

    Adam

-- 
 "At our startup we had Robert Morris working as a            Adam Sjøgren
  system administrator. That's like having the Rolling   asjo@koldfront.dk
  Stones play at a bar mitzvah."




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-26  5:44                         ` Daiki Ueno
@ 2012-12-26 13:24                           ` Adam Sjøgren
  0 siblings, 0 replies; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-26 13:24 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: ding

  Hi Daiki.


On Wed, 26 Dec 2012 13:22:15 +0900, Daiki Ueno wrote:

> Thanks for the patch and sorry for not reacting earlier.

No worries, I was only trying to get this going yesterday.

>> * epg.el (epg-signature-to-string): use new functions
>> epg-key-image, epg-key-image-to-string to find and display
>> image from key.

> I moved the code to mml2015.el (sorry!), as I think epg.el is not the
> right place to accommodate display related code.

Super!

I just found the function creating the text I saw in the article buffer
and started pummelling at it.

Thanks for moving it :-)


On Wed, 26 Dec 2012 14:44:19 +0900, Daiki Ueno wrote:

> Yes.  But rather than having a separate function, the code would better
> be merged into `epg-list-keys' so attribute data can be associated with
> each epg-key object, I think.

I think you are absolutely right. I wasn't able to wrap my head around
epg-list-keys yesterday, so I simply took the easy way out.


  Thanks again!

    Adam

-- 
 "Denial springs eternal."                                    Adam Sjøgren
                                                         asjo@koldfront.dk



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-26 13:17                         ` Adam Sjøgren
@ 2012-12-26 18:05                           ` Andreas Schwab
  2012-12-26 22:06                             ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Andreas Schwab @ 2012-12-26 18:05 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

See /usr/share/doc/packages/gpg2/DETAILS or RFC 4880.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-26 18:05                           ` Andreas Schwab
@ 2012-12-26 22:06                             ` Adam Sjøgren
  0 siblings, 0 replies; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-26 22:06 UTC (permalink / raw)
  To: ding

On Wed, 26 Dec 2012 19:05:46 +0100, Andreas wrote:

> See /usr/share/doc/packages/gpg2/DETAILS or RFC 4880.

Thanks!

If anyone, like me, doesn't have gpg2 installed, here is a link:

 * http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=doc/DETAILS


  Best regards,

    Adam

-- 
 "How are you this tiny and this strong? You are              Adam Sjøgren
  like an ant!"                                          asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-26  1:12                       ` Adam Sjøgren
  2012-12-26  5:44                         ` Daiki Ueno
@ 2012-12-27  5:16                         ` Arne Jørgensen
  2012-12-28 21:00                           ` Adam Sjøgren
  2012-12-27 10:06                         ` Julien Danjou
  2 siblings, 1 reply; 36+ messages in thread
From: Arne Jørgensen @ 2012-12-27  5:16 UTC (permalink / raw)
  To: ding


[-- Attachment #1.1: Type: text/plain, Size: 1138 bytes --]

asjo@koldfront.dk (Adam Sjøgren) writes:

> On Wed, 26 Dec 2012 01:33:33 +0100, Adam wrote:
>
>> So, I'm kind of stuck on that.
>
> Skipping the first 16 bytes and using a non-multibyte buffer on the way
> makes it work with --attribute-fd:
>
> (defun epg-key-image (key-id)
>   "Return the image of a key, if any"
>   (with-temp-buffer
>     (set-buffer-multibyte nil)
>     (let* ((coding-system-for-write 'binary)
>            (coding-system-for-read 'binary)
>            (data (shell-command-to-string (concat epg-gpg-program
>                                                   " --attribute-fd 2"
>                                                   " --list-keys " key-id " >/dev/null"))))
>       (when (> (length data) 0)
>         (insert (substring data 16))
>         (create-image (buffer-string) nil t)))))

Nice feature that I had to try immediately :-)

For some reason it just did not work with my signature - i guess the ø
in Jørgensen is to blame. Adding a "--display-charset utf-8" as
parameter to gpg solved it.

Patch attached and this posting signed as example.

Kind regards,
Arne


[-- Attachment #1.2: mml2015.el (mml2015-epg-key-image): Use --display-charset utf-8 --]
[-- Type: text/x-patch, Size: 1634 bytes --]

From 8742f96f9595fd526b35400a221ca7a81cf1b292 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= <arne@arnested.dk>
Date: Thu, 27 Dec 2012 06:10:26 +0100
Subject: [PATCH] mml2015.el (mml2015-epg-key-image): Use --display-charset
 utf-8.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit


Signed-off-by: Arne Jørgensen <arne@arnested.dk>
---
 lisp/ChangeLog  | 4 ++++
 lisp/mml2015.el | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eafb422..00f843c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-27  Arne Jørgensen  <arne@arnested.dk>
+
+	* mml2015.el (mml2015-epg-key-image): Use --display-charset utf-8.
+
 2012-12-26  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* mml2015.el (mml2015-epg-key-image): Use mm-set-buffer-multibyte.
diff --git a/lisp/mml2015.el b/lisp/mml2015.el
index 0bc83ad..a9121d5 100644
--- a/lisp/mml2015.el
+++ b/lisp/mml2015.el
@@ -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 --display-charset utf-8 --list-options no-show-photos --attribute-fd 2 --list-keys %s > /dev/null"
                           epg-gpg-program key-id))))
       (when (> (length data) 0)
         (insert (substring data 16))
-- 
Arne Jørgensen


[-- Attachment #2: Type: application/pgp-signature, Size: 543 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-26  1:12                       ` Adam Sjøgren
  2012-12-26  5:44                         ` Daiki Ueno
  2012-12-27  5:16                         ` Arne Jørgensen
@ 2012-12-27 10:06                         ` Julien Danjou
  2012-12-27 10:38                           ` Andreas Schwab
                                             ` (2 more replies)
  2 siblings, 3 replies; 36+ messages in thread
From: Julien Danjou @ 2012-12-27 10:06 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]

On Wed, Dec 26 2012, Adam Sjøgren wrote:

> On Wed, 26 Dec 2012 01:33:33 +0100, Adam wrote:
>
>> So, I'm kind of stuck on that.
>
> Skipping the first 16 bytes and using a non-multibyte buffer on the way
> makes it work with --attribute-fd:
>
> (defun epg-key-image (key-id)
>   "Return the image of a key, if any"
>   (with-temp-buffer
>     (set-buffer-multibyte nil)
>     (let* ((coding-system-for-write 'binary)
>            (coding-system-for-read 'binary)
>            (data (shell-command-to-string (concat epg-gpg-program
>                                                   " --attribute-fd 2"
>                                                   " --list-keys " key-id " >/dev/null"))))
>       (when (> (length data) 0)
>         (insert (substring data 16))
>         (create-image (buffer-string) nil t)))))


The following change is needed otherwise I get error reading my mail:

diff --git a/lisp/mml2015.el b/lisp/mml2015.el
index 0bc83ad..19c55f9 100644
--- a/lisp/mml2015.el
+++ b/lisp/mml2015.el
@@ -829,7 +829,8 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
            (data (shell-command-to-string
                   (format "%s --list-options no-show-photos --attribute-fd 2 --list-keys %s > /dev/null"
                           epg-gpg-program key-id))))
-      (when (> (length data) 0)
+      (when (and (> (length data) 0)
+                 (not (string-match "^gpg: error reading key: public key not found$" data)))
         (insert (substring data 16))
         (create-image (buffer-string) nil t)))))
 

I'll install it unless you have a better fix.

-- 
Julien Danjou
// Free Software hacker & freelance
// http://julien.danjou.info

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-27 10:06                         ` Julien Danjou
@ 2012-12-27 10:38                           ` Andreas Schwab
  2012-12-27 12:12                           ` Adam Sjøgren
  2013-02-25  7:19                           ` Binjo
  2 siblings, 0 replies; 36+ messages in thread
From: Andreas Schwab @ 2012-12-27 10:38 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

The attribute stream needs to be separated from stderr.

diff --git a/lisp/mml2015.el b/lisp/mml2015.el
index 0bc83ad..f8f0a56 100644
--- a/lisp/mml2015.el
+++ b/lisp/mml2015.el
@@ -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))

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-27 10:06                         ` Julien Danjou
  2012-12-27 10:38                           ` Andreas Schwab
@ 2012-12-27 12:12                           ` Adam Sjøgren
  2013-02-25  7:19                           ` Binjo
  2 siblings, 0 replies; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-27 12:12 UTC (permalink / raw)
  To: ding

On Thu, 27 Dec 2012 11:06:44 +0100, Julien wrote:

> The following change is needed otherwise I get error reading my mail:

Ah, sorry!

On Thu, 27 Dec 2012 11:38:09 +0100, Andreas wrote:

> The attribute stream needs to be separated from stderr.

Thanks - installed in git gnus.


  Best regards,

    Adam

-- 
 "I do not find reading diffs in email to be a                Adam Sjøgren
  hardship, but I used to walk uphill both ways to       asjo@koldfront.dk
  school, so I dunno."




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-27  5:16                         ` Arne Jørgensen
@ 2012-12-28 21:00                           ` Adam Sjøgren
  2012-12-28 21:03                             ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-28 21:00 UTC (permalink / raw)
  To: ding

On Thu, 27 Dec 2012 06:16:26 +0100, Arne wrote:

> For some reason it just did not work with my signature - i guess the ø
> in Jørgensen is to blame. Adding a "--display-charset utf-8" as
> parameter to gpg solved it.

Please try the latest version in git gnus - it uses the --attribute-fd
option and should be more robust.


  Best regards,

    Adam

-- 
 "Écoutez la colere du peuple"                                Adam Sjøgren
                                                         asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-28 21:00                           ` Adam Sjøgren
@ 2012-12-28 21:03                             ` Adam Sjøgren
  2012-12-28 21:09                               ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-28 21:03 UTC (permalink / raw)
  To: ding

On Fri, 28 Dec 2012 22:00:40 +0100, Adam wrote:

> On Thu, 27 Dec 2012 06:16:26 +0100, Arne wrote:
>> For some reason it just did not work with my signature - i guess the ø
>> in Jørgensen is to blame. Adding a "--display-charset utf-8" as
>> parameter to gpg solved it.

> Please try the latest version in git gnus - it uses the --attribute-fd
> option and should be more robust.

I'm tired - sorry about the nonsense above.

After downloading your key directly from keyserver.pgp.com I couldn't
make the current version fail.

My locale is utf-8, what's your locale?

Adding "--display-charset iso-8859-1" didn't make it fail on my machine.

I wonder why it fails on your. Maybe I should try changing locale on my
machine.


  Best regards,

    Adam

-- 
 "'What-you-see-is-what-you-get' is Motherhood and            Adam Sjøgren
  Apple Pie for screen editors, and EMACS definitely     asjo@koldfront.dk
  succeeds here."




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-28 21:03                             ` Adam Sjøgren
@ 2012-12-28 21:09                               ` Adam Sjøgren
  2012-12-28 22:04                                 ` Arne Jørgensen
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-28 21:09 UTC (permalink / raw)
  To: ding

On Fri, 28 Dec 2012 22:03:56 +0100, Adam wrote:

> Maybe I should try changing locale on my machine.

I couldn't make it fail. Maybe the fix from Andreas Schwab:

 * http://git.gnus.org/cgit/gnus.git/commit/?id=ea60ea3c05a8391dcdc00251d1744e1558d7f7d4

is what makes it work on my machine?

It looks like you didn't have that improvement in your checkout before
patching.


  Best regards,

    Adam

-- 
 "1. write down the problem;                                  Adam Sjøgren
  2. think very hard;                                    asjo@koldfront.dk
  3. write down the answer."




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-28 21:09                               ` Adam Sjøgren
@ 2012-12-28 22:04                                 ` Arne Jørgensen
  2012-12-28 22:06                                   ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Arne Jørgensen @ 2012-12-28 22:04 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> On Fri, 28 Dec 2012 22:03:56 +0100, Adam wrote:
>
>> Maybe I should try changing locale on my machine.
>
> I couldn't make it fail. Maybe the fix from Andreas Schwab:
>
>  * http://git.gnus.org/cgit/gnus.git/commit/?id=ea60ea3c05a8391dcdc00251d1744e1558d7f7d4
>
> is what makes it work on my machine?
>
> It looks like you didn't have that improvement in your checkout before
> patching.

Andreas' fix fixed my problem as well. For some reason my posting took
quite some time to show up - it was written a couple of hours before
Andreas'.

Kind regards,
Arne




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-28 22:04                                 ` Arne Jørgensen
@ 2012-12-28 22:06                                   ` Adam Sjøgren
  0 siblings, 0 replies; 36+ messages in thread
From: Adam Sjøgren @ 2012-12-28 22:06 UTC (permalink / raw)
  To: ding

On Fri, 28 Dec 2012 23:04:35 +0100, Arne wrote:

> Andreas' fix fixed my problem as well. For some reason my posting took
> quite some time to show up - it was written a couple of hours before
> Andreas'.

Ok; great!


  :-),

   Adam

-- 
 "Unserious to the end                                        Adam Sjøgren
  As if I had a choice"                                  asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2012-12-27 10:06                         ` Julien Danjou
  2012-12-27 10:38                           ` Andreas Schwab
  2012-12-27 12:12                           ` Adam Sjøgren
@ 2013-02-25  7:19                           ` Binjo
  2013-02-25 19:13                             ` Adam Sjøgren
  2 siblings, 1 reply; 36+ messages in thread
From: Binjo @ 2013-02-25  7:19 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

On 12/27/2012, at 18:06, Julien Danjou wrote:

[...]

>
>The following change is needed otherwise I get error reading my mail:
>
>diff --git a/lisp/mml2015.el b/lisp/mml2015.el
>index 0bc83ad..19c55f9 100644
>--- a/lisp/mml2015.el
>+++ b/lisp/mml2015.el
>@@ -829,7 +829,8 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
>            (data (shell-command-to-string
>                   (format "%s --list-options no-show-photos --attribute-fd 2 --list-keys %s > /dev/null"
>                           epg-gpg-program key-id))))
>-      (when (> (length data) 0)
>+      (when (and (> (length data) 0)
>+                 (not (string-match "^gpg: error reading key: public key not found$" data)))
>         (insert (substring data 16))
>         (create-image (buffer-string) nil t)))))
> 
>
>I'll install it unless you have a better fix.

<#secure method=pgpmime mode=sign>
Hi, it seems this patch haven't applied in the trunk?
Besides, under *windows*, the epg-gpg-program probably should call
shell-quote-argument 1st...

              (data (shell-command-to-string
                     (format "%s --list-options no-show-photos --attribute-fd 3 --list-keys %s"
-                             epg-gpg-program) key-id)))
+                             (shell-quote-argument epg-gpg-program) key-id))))

-- 
Life is like a prison, can you break it?
PGP : 0x6DAD67BA



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2013-02-25  7:19                           ` Binjo
@ 2013-02-25 19:13                             ` Adam Sjøgren
  2013-02-26  2:22                               ` Binjo
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2013-02-25 19:13 UTC (permalink / raw)
  To: ding

On Mon, 25 Feb 2013 15:19:23 +0800, Binjo wrote:

> On 12/27/2012, at 18:06, Julien Danjou wrote:

>> -      (when (> (length data) 0)
>> +      (when (and (> (length data) 0)
>> +                 (not (string-match "^gpg: error reading key: public key not found$" data)))

[...]

>> I'll install it unless you have a better fix.

> Hi, it seems this patch haven't applied in the trunk?

No, the fix suggested by Andreas Schwab in <m238yrok4u.fsf@igel.home>
has been, however.

> Besides, under *windows*, the epg-gpg-program probably should call
> shell-quote-argument 1st...

>               (data (shell-command-to-string
>                      (format "%s --list-options no-show-photos --attribute-fd 3 --list-keys %s"
> -                             epg-gpg-program) key-id)))
> +                             (shell-quote-argument epg-gpg-program) key-id))))

Ok; installed.


  Best regards,

    Adam

-- 
 "Set out on a laughless day                                  Adam Sjøgren
  Like a troupe of clowns"                               asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2013-02-25 19:13                             ` Adam Sjøgren
@ 2013-02-26  2:22                               ` Binjo
  2013-02-26 19:28                                 ` Adam Sjøgren
  0 siblings, 1 reply; 36+ messages in thread
From: Binjo @ 2013-02-26  2:22 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

On 02/26/2013, at 03:13, Adam Sjgren wrote:

>On Mon, 25 Feb 2013 15:19:23 +0800, Binjo wrote:
>
>> On 12/27/2012, at 18:06, Julien Danjou wrote:
>
>>> -      (when (> (length data) 0)
>>> +      (when (and (> (length data) 0)
>>> +                 (not (string-match "^gpg: error reading key: public key not found$" data)))
>
>[...]
>
>>> I'll install it unless you have a better fix.
>
>> Hi, it seems this patch haven't applied in the trunk?
>
>No, the fix suggested by Andreas Schwab in <m238yrok4u.fsf@igel.home>
>has been, however.
>

Wondering why not, it's possible that the gpg output is not valid key info,
which leads to fail within create-image, and fail to render the mail...

>> Besides, under *windows*, the epg-gpg-program probably should call
>> shell-quote-argument 1st...
>
>>               (data (shell-command-to-string
>>                      (format "%s --list-options no-show-photos --attribute-fd 3 --list-keys %s"
>> -                             epg-gpg-program) key-id)))
>> +                             (shell-quote-argument epg-gpg-program) key-id))))
>
>Ok; installed.
>

Thanks a lot.

-- 
Life is like a prison, can you break it?
PGP : 0x6DAD67BA

[-- Attachment #2: Type: application/pgp-signature, Size: 186 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2013-02-26  2:22                               ` Binjo
@ 2013-02-26 19:28                                 ` Adam Sjøgren
  2013-02-27  2:27                                   ` Binjo
  0 siblings, 1 reply; 36+ messages in thread
From: Adam Sjøgren @ 2013-02-26 19:28 UTC (permalink / raw)
  To: ding

On Tue, 26 Feb 2013 10:22:27 +0800, Binjo wrote:

> Wondering why not,

Because I thought Andreas' solution looked better. Feel free to prove me
wrong, I often am.

> it's possible that the gpg output is not valid key info, which leads
> to fail within create-image, and fail to render the mail...

Do you have an example?


  Best regards,

    Adam

-- 
 "Set out on a laughless day                                  Adam Sjøgren
  Like a troupe of clowns"                               asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Displaying picture from PGP key if present?
  2013-02-26 19:28                                 ` Adam Sjøgren
@ 2013-02-27  2:27                                   ` Binjo
  0 siblings, 0 replies; 36+ messages in thread
From: Binjo @ 2013-02-27  2:27 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

On 02/27/2013, at 03:28, Adam Sjgren wrote:

>On Tue, 26 Feb 2013 10:22:27 +0800, Binjo wrote:
>
>> Wondering why not,
>
>Because I thought Andreas' solution looked better. Feel free to prove me
>wrong, I often am.
>
>> it's possible that the gpg output is not valid key info, which leads
>> to fail within create-image, and fail to render the mail...
>
>Do you have an example?
>

I don't have a proper example to provide atm, sorry.

But, maybe it's *windows* specific only, that the gpg --list-options
no-show-photos only returns the key info rather the image data, while there's no
validate after calling `buffer-string' and throw it into `create-image', leading
to exception throwed from it, and stop rendering the mail.

As of Julien Danjou's patch, it validates the data returned, which at least
solves my problem as well.

Kind regards,
-- 
Life is like a prison, can you break it?
PGP: 0x6DAD67BA



^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2013-02-27  2:27 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-15 14:12 Displaying picture from PGP key if present? Adam Sjøgren
2012-12-25 11:43 ` Lars Ingebrigtsen
2012-12-25 11:51   ` Adam Sjøgren
2012-12-25 12:00     ` Lars Ingebrigtsen
2012-12-25 12:05       ` Adam Sjøgren
2012-12-25 12:20         ` Lars Ingebrigtsen
2012-12-25 13:20           ` Adam Sjøgren
2012-12-25 13:47             ` Lars Ingebrigtsen
2012-12-25 22:33               ` Adam Sjøgren
2012-12-25 22:38                 ` Adam Sjøgren
2012-12-25 22:43                 ` Lars Ingebrigtsen
2012-12-25 22:57                 ` Andreas Schwab
2012-12-25 23:06                   ` Adam Sjøgren
2012-12-26  0:33                     ` Adam Sjøgren
2012-12-26  1:12                       ` Adam Sjøgren
2012-12-26  5:44                         ` Daiki Ueno
2012-12-26 13:24                           ` Adam Sjøgren
2012-12-27  5:16                         ` Arne Jørgensen
2012-12-28 21:00                           ` Adam Sjøgren
2012-12-28 21:03                             ` Adam Sjøgren
2012-12-28 21:09                               ` Adam Sjøgren
2012-12-28 22:04                                 ` Arne Jørgensen
2012-12-28 22:06                                   ` Adam Sjøgren
2012-12-27 10:06                         ` Julien Danjou
2012-12-27 10:38                           ` Andreas Schwab
2012-12-27 12:12                           ` Adam Sjøgren
2013-02-25  7:19                           ` Binjo
2013-02-25 19:13                             ` Adam Sjøgren
2013-02-26  2:22                               ` Binjo
2013-02-26 19:28                                 ` Adam Sjøgren
2013-02-27  2:27                                   ` Binjo
2012-12-26  9:14                       ` Andreas Schwab
2012-12-26 13:17                         ` Adam Sjøgren
2012-12-26 18:05                           ` Andreas Schwab
2012-12-26 22:06                             ` Adam Sjøgren
2012-12-26  4:22                 ` Daiki Ueno

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 NNTP newsgroup(s).