====== Gnus ====== La fonction suivante permet de répondre à un message. Si - pour le group courant - le paramètre To-List est défini, alors la fonction supprime les To/Cc pour définir le To à l'adresse contenu dans ce champ. (Fonction utile pour les listes de diffusion qui ne définisse pas l'en tête Reply-To. (defun replace-recipients () (message-remove-header "To") (message-add-header (concat "To: " (gnus-parameter-to-list gnus-newsgroup-name))) (message-remove-header "cc") ) (defun my-mail-reply () "Followup (with original) reply, reformat original, replace To: (and remove Cc:) if To-List group paramer is defined, useful for mailing list without Reply-To header." (interactive) (gnus-summary-followup-with-original 1) (save-excursion (if (gnus-parameter-to-list gnus-newsgroup-name) (replace-recipients)) (goto-char (point-min)) ;; On reformate le paragraphe (let* ;; selection ( ;; debut du mail (result (search-forward-regexp "^--text follows this line--$" nil t)) (first-match (and result (+ 1 (match-end 0)))) ;; signature (result (search-forward-regexp "^-- $" nil t)) (second-match (and result (match-beginning 0) )) ) ;; formatage (fill-individual-paragraphs first-match second-match) ) ) ) ;; use my-mail-reply (defun reply-function-fixup-gnus () (define-key gnus-summary-mode-map "g" 'my-mail-reply) (define-key gnus-summary-mode-map "h" 'gnus-summary-show-all-headers) ) (add-hook 'gnus-summary-mode-hook 'reply-function-fixup-gnus)