From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/13817 Path: news.gmane.org!not-for-mail From: Francis Moreau Newsgroups: gmane.emacs.gnus.user Subject: Re: mail-default-headers and gnus Date: Wed, 31 Mar 2010 02:21:00 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2a1fc4bf-4e5a-4f57-b12c-11d7e415154e@z35g2000yqd.googlegroups.com> References: <627ba8ba-f413-4c37-877c-97e89d46b373@r27g2000yqn.googlegroups.com> <87fx3igcsa.fsf@lifelogs.com> <32dc5fec-0b6f-4e60-9e7c-a7372d11e523@v20g2000yqv.googlegroups.com> <87ljd9ed3x.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273018470 15164 80.91.229.12 (5 May 2010 00:14:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 May 2010 00:14:30 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Wed May 05 02:14:29 2010 connect(): No such file or directory Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O9SFf-0002Pc-Ub for gegu-info-gnus-english@m.gmane.org; Wed, 05 May 2010 02:14:28 +0200 Original-Received: from localhost ([127.0.0.1]:53841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9SFQ-0000J3-S3 for gegu-info-gnus-english@m.gmane.org; Tue, 04 May 2010 20:13:56 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!z35g2000yqd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 41 Original-NNTP-Posting-Host: 86.68.119.224 Original-X-Trace: posting.google.com 1270027260 2439 127.0.0.1 (31 Mar 2010 09:21:00 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 31 Mar 2010 09:21:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z35g2000yqd.googlegroups.com; posting-host=86.68.119.224; posting-account=ekTE0goAAADiVCThPmo4ph0C5bTUhQOx User-Agent: G2/1.0 X-HTTP-Via: 1.1 grimoire.wyplay.int:3128 (squid/2.5.STABLE14) X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.7 Safari/533.2, gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.gnus:84200 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:13817 Archived-At: Hello, On Mar 30, 11:03=A0pm, Ted Zlatanov wrote: > On Tue, 30 Mar 2010 06:33:13 -0700 (PDT) Francis Moreau wrote: > > FM> On Mar 30, 3:27 pm, Ted Zlatanov wrote: > > >> If you never need both, just remove the Bcc header if the Gcc is set, > >> effectively making it an XOR. > > FM> yes but how should I do this ? > > You could add this to your message-send-hook: > > (save-restriction > =A0 (message-narrow-to-headers) > =A0 (when (and (message-fetch-field "Gcc") > =A0 =A0 =A0 =A0 =A0 =A0 =A0(message-fetch-field "Bcc")) > =A0 =A0 (message-remove-header "Gcc"))) > > You can test it in your message buffer, just paste and evaluate (`C-x > C-e' after the final parenthesis). Thank you Ted, for giving me a solution. I tried to remove "Bcc" header field instead of "Gcc" (as your example do) but it doesn't work I still receive 2 copies of the email. Do you know why ? The reason for the change is that I prefer the way gnus handles "Gcc" header, because in that case I don't actually receive new email in my spool box (it's directly moved to my nnml:Inbox folder) and the mail is marked as read automatically. If I send a message by using 'compose-mail', I will have all drawbacks I mentioned previously but that doesn't matter in this case because I send emails this way much less often. Thanks