Gnus development mailing list
 help / color / mirror / Atom feed
From: Xavier MAILLARD <zedek@gnu-rox.org>
Cc: ding@gnus.org
Subject: Re: PGG howto ?
Date: Tue, 21 Jan 2003 10:36:48 +0100	[thread overview]
Message-ID: <plop87of6a6dzj.fsf@gnu-rox.org> (raw)
In-Reply-To: <scorpion.87adhv7ysl.fsf@usenet.patrice.ch> (Patrice Neff's message of "Tue, 21 Jan 2003 08:22:02 +0100")

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

On Tue, 21 Jan 2003, Patrice Neff told this:

>  Xavier MAILLARD <zedek@gnu-rox.org> writes:
>  
> > So I am :) Please gimme the tricks ;-)
>  
>  Well, dunno about the code quality, but here is the modified

Nevermind the quality code :) It's tricky code ;-)

>  function:
  
>  (defun bbdb/pgp-hook-fun () "Function to be added to
>    message-send-hook Uses PGP to encrypt messages to users marked in
>    the BBDB with the field bbdb-pgp-field."  (save-restriction
>    (save-excursion (message-narrow-to-headers) (let* ((to-field
>    (mail-fetch-field "To" nil t)) (address
>    (mail-extract-address-components (or to-field "")))) (widen) (if
>    (not (equal address `(nil nil))) (let ((pgp-p (bbdb/pgp-get-pgp
>    (car address) (car (cdr address))))) (cond ((string= "encrypt"
>    pgp-p) (and (y-or-n-p "Encrypt message ? ") (call-interactively
>    'mml-secure-encrypt-pgpmime))) ((string= "sign" pgp-p) (and
>    (y-or-n-p "Sign message ? ") (call-interactively
>    'mml-secure-sign-pgpmime))) (t nil))))))))

Looks good to me. At least it does its job :)

Thanx

zeDek

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

      reply	other threads:[~2003-01-21  9:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-16 22:26 Xavier MAILLARD
2003-01-17  8:59 ` Simon Josefsson
2003-01-18 19:50   ` Xavier MAILLARD
2003-01-25 21:15     ` Simon Josefsson
2003-01-19 14:09   ` Patrice Neff
2003-01-20 21:27     ` Xavier MAILLARD
2003-01-21  7:22       ` Patrice Neff
2003-01-21  9:36         ` Xavier MAILLARD [this message]

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=plop87of6a6dzj.fsf@gnu-rox.org \
    --to=zedek@gnu-rox.org \
    --cc=ding@gnus.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 NNTP newsgroup(s).