From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/51266 Path: main.gmane.org!not-for-mail From: Julien Avarre Newsgroups: gmane.emacs.gnus.general Subject: Re: secure method Date: Tue, 08 Apr 2003 02:01:41 +0200 Organization: Megarezo Sender: owner-ding@hpc.uh.edu Message-ID: References: <84znn2jsb9.fsf@lucy.is.informatik.uni-duisburg.de> <87of3hj4oo.fsf@unix.home> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1049760146 7176 80.91.224.249 (8 Apr 2003 00:02:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2003 00:02:26 +0000 (UTC) Original-X-From: owner-ding@hpc.uh.edu Tue Apr 08 02:02:24 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 192gZD-0001rS-00 for ; Tue, 08 Apr 2003 02:02:23 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 192gYm-0007LC-00; Mon, 07 Apr 2003 19:01:56 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 07 Apr 2003 19:03:00 -0500 (CDT) Original-Received: from relay-1v.club-internet.fr (relay-1v.club-internet.fr [194.158.96.112]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id TAA03737 for ; Mon, 7 Apr 2003 19:02:47 -0500 (CDT) Original-Received: from localhost.localdomain (f06a-10-98.d1.club-internet.fr [212.194.129.98]) by relay-1v.club-internet.fr (Postfix) with ESMTP id B7205247B for ; Tue, 8 Apr 2003 02:01:36 +0200 (CEST) Original-To: ding@hpc.uh.edu X-URL: http://www.epita.fr:8000/~eole X-Important: Using PINE is bad ! X-Face: )u,BsxMlz?34"0)]\kt}RN2A0"9/hyjY>AS^WDLal (Vasily Korytov's message of "Tue, 08 Apr 2003 02:58:15 +0400") User-Agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:51266 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:51266 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