From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/58191 Path: main.gmane.org!not-for-mail From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de> Newsgroups: gmane.emacs.gnus.general Subject: Re: Always copying a mailing list Date: Wed, 04 Aug 2004 10:15:12 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: References: <86n01diut3.fsf@ketchup.de.uu.net> Reply-To: Reiner Steib NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1091607839 29652 80.91.224.253 (4 Aug 2004 08:23:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Aug 2004 08:23:59 +0000 (UTC) Original-X-From: ding-owner+M6732@lists.math.uh.edu Wed Aug 04 10:23:50 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BsH3t-0000KP-00 for ; Wed, 04 Aug 2004 10:23:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BsH0x-0008SH-00; Wed, 04 Aug 2004 03:20:47 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BsH0n-0008S9-00 for ding@lists.math.uh.edu; Wed, 04 Aug 2004 03:20:37 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BsH0m-0002c7-Tx for ding@lists.math.uh.edu; Wed, 04 Aug 2004 03:20:36 -0500 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id A7DA73A0036 for ; Wed, 4 Aug 2004 03:20:35 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BsH0j-0004ZB-00 for ; Wed, 04 Aug 2004 10:20:33 +0200 Original-Received: from dialin-145-254-253-152.arcor-ip.net ([145.254.253.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Aug 2004 10:20:33 +0200 Original-Received: from reiner.steib by dialin-145-254-253-152.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Aug 2004 10:20:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 54 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dialin-145-254-253-152.arcor-ip.net X-Face: /U7=m^"/-Dn61mAl{g9e3>\G5Tp,oEX|V)g2I1hBk\ML;)7A?6cmB-y7y?'NA^J<=oz7syB =(McAwIHgLX!.B?R3X}98d@?>CrT094KLWh]WU4gDpnL/")MS(XoQTv`Oq225uL>+;CpPXo$N5e>N> $tPd-gbB^F{gQS#1ase]XO~D4p4M"3+F-7~u]dy3I?Pb8RO*H-EFeWDUf?Rf,d]pv\Jvh2Cht!A=im yKAS2Z%Ao^;}W/qzMvMm Mail-Copies-To: nobody User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:gc+XYv/nD90ECdf/ZBH1yv9dmmA= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:58191 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:58191 On Mon, Aug 02 2004, Kai Grossjohann wrote: > I can set mail-self-blind to get "Bcc: kais.address" in outgoing > messages. But I have a special group where I'd rather like to have > "Cc: some.mailinglist". > > I've tried to frob the posting style for the group, saying (("Gcc" . > nil) ("Cc" . "some.mailinglist")). But this does not work as I like, > because it also removes other recipients that I would like to keep. > > The behavior I'm looking for is: After I've hit R or F (or S W or S > V), add the following address to the list of recipients if not yet > present. > > How to do that? (defun rs-message-replace-header (header new-value) "Remove HEADER and insert the NEW-VALUE." ;; Similar to `nnheader-replace-header' but for message buffers. (save-excursion (save-restriction (message-narrow-to-headers) (message-remove-header header)) (message-position-on-field header) (insert new-value))) (defun kai-message-add-cc (cc) "Insert an additional address in Cc field." (interactive "MAddress: \n") (save-excursion (let ((occ (message-fetch-field "Cc"))) (rs-message-replace-header "Cc" (concat occ (when (and occ cc) ", ") cc))))) Wrapping this function in a suitable message hook and taking the address from posting styles is left as an exercise to the reader. (You may also find `message-carefully-insert-headers' and `message-header-synonyms' useful.) BTW, I wonder if there is no builtin function for... ,---- | (defun rs-message-replace-header (header new-value) | "Remove HEADER and insert the NEW-VALUE." | ;; Similar to `nnheader-replace-header' but for message buffers. `---- Should we add this as `message-replace-header' in `message.el'? Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/