Gnus development mailing list
 help / color / mirror / Atom feed
From: Julien Avarre <julien@avarre.com>
Subject: Re: secure method
Date: Tue, 08 Apr 2003 02:01:41 +0200	[thread overview]
Message-ID: <m3znn1vouy.fsf@avarre.com> (raw)
In-Reply-To: <87of3hj4oo.fsf@unix.home> (Vasily Korytov's message of "Tue, 08 Apr 2003 02:58:15 +0400")

deskpot@despammed.com (Vasily Korytov) disait récemment  :

> On Tue, 08 Apr 2003 00:36:13 +0200, Julien Avarre wrote:
> 
> >    (add-hook 'message-setup-hook 'mml-secure-message-sign-pgpmime)
> >
> >
> > It allows me to automatically put the pattern in my message :
> >
> >                   <#secure method=pgpmime mode=sign>
> >
> > But when I reply  to a message, this pattern is written  at the end of
> > quoted text.  Gnus do not interpret  it. I have to move it manually to
> > the beginning of the body :-(
> >
> > Is there a way to avoid that, automatize this ?
> 
> Yup. There is gnus-message-setup-hook. Unless, you want to sign not all
> the messages, it works. If it's not the case, huge constructions like
> this appear:
> 
> (add-hook 'message-setup-hook 'mml-vk-maybe-sign)
> (add-hook 'gnus-message-setup-hook 'mml-vk-maybe-sign)
> (add-hook 'gnus-message-setup-hook 'mml-vk-remove-broken-sign)
> (add-hook 'tc-pre-hook 'mml-unsecure-message) ;; or sc-pre-hook, or whatever
> 
> ;; Should we sign the message
> ;;
> (defun mml-vk-maybe-sign ()
>   "Sign the message with PGP/MIME (if mml-vk-maybe-sign-pgpmime is bound
> and returns anything, but nil) or PGP (same with mml-vk-maybe-sign-pgp)."
>   (interactive)
>   (cond ((and (fboundp 'mml-vk-maybe-sign-pgpmime) (mml-vk-maybe-sign-pgpmime))
> 	 (mml-secure-message-sign-pgpmime))
> 	((and (fboundp 'mml-vk-maybe-sign-pgp) (mml-vk-maybe-sign-pgp))
> 	 (mml-secure-message-sign-pgp))))
> 
> ;; sign all the mail messages (gmane.* newsgroups are mailing lists)
> (defun mml-vk-maybe-sign-pgpmime ()
>   (cond ((message-mail-p)
> 	 t)
> 	((message-news-p)
> 	 (let ((groups (message-fetch-field "Newsgroups")))
> 	   (if (and groups (string= (substring groups 0 6) "gmane."))
> 	       t)))))
> 
> ;; sign all the news messages, except fido7 hierarchy
> ;(defun mml-vk-maybe-sign-pgp ()
> ;  (if (message-news-p)
> ;      (let ((groups (message-fetch-field "Newsgroups")))
> ;	(if (and groups (not (string= (substring groups 0 6) "fido7.")))
> ;	    t))))
> 
> (defun mml-vk-remove-broken-sign ()
>   "Remove a \"^<\#secure method=pgpmime mode=sign>$\" below the first line
> of the message body."
>   (interactive)
>   (save-excursion
>     (message-goto-body)
>     (forward-line)
>     (when (search-forward-regexp "^<\#secure method=pgpmime mode=sign>$" nil t)
>       (delete-region (point-at-bol) (point-at-eol))
>       (unless (eq (point) (point-max))
> 	(delete-char)))))


Salut,   voilà   ce   qui   est   sensé   régler   nos   problème   de
mml-sign-truc-muche.   J'ai testé, mais  je ne  suis pas  convaincu du
tout. Mais peut-être que j'ai pas  fait tout comme il faut, où bien il
y a une coquille, mais je ne l'ai pas vue.

Fais moi part de tes commentaire.

-- 
Julien ``Eole'' Avarre
julien at avarre dot com




  reply	other threads:[~2003-04-08  0:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-07 13:55 gnus-narrow-to-head, message-narrow-to-body? Reiner Steib
2003-04-07 14:27 ` Kai Großjohann
2003-04-07 14:43   ` Julien Avarre
2003-04-07 15:59     ` Kai Großjohann
2003-04-07 16:33     ` Reiner Steib
2003-04-07 22:36       ` secure method (was: gnus-narrow-to-head, message-narrow-to-body?) Julien Avarre
2003-04-07 22:58         ` secure method Vasily Korytov
2003-04-08  0:01           ` Julien Avarre [this message]
2003-04-08  0:08             ` Julien Avarre

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=m3znn1vouy.fsf@avarre.com \
    --to=julien@avarre.com \
    /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).