From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Gnus: How to get/force specific header entries in a new message? Date: Thu, 24 Nov 2011 10:43:16 +0100 Message-ID: <87aa7lua8b.fsf@tsdh.uni-koblenz.de> References: <403CE419-DD6D-4622-9322-D80D8D04F6B9@math.ethz.ch> <8762ia4roq.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1322127823 17379 80.91.229.12 (24 Nov 2011 09:43:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Nov 2011 09:43:43 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Marius Hofert Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 24 10:43:35 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RTVqB-0005hy-QO for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Nov 2011 10:43:35 +0100 Original-Received: from localhost ([::1]:58959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTVqB-0002iT-DW for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Nov 2011 04:43:35 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:56039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTVq3-0002iL-OA for help-gnu-emacs@gnu.org; Thu, 24 Nov 2011 04:43:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTVpz-0003fR-BU for help-gnu-emacs@gnu.org; Thu, 24 Nov 2011 04:43:27 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:53087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTVpy-0003f5-Qu for help-gnu-emacs@gnu.org; Thu, 24 Nov 2011 04:43:23 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 69FC1D2316; Thu, 24 Nov 2011 10:43:21 +0100 (CET) X-Virus-Scanned: amavisd-new at uni-koblenz.de Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nx9djpXTSepR; Thu, 24 Nov 2011 10:43:20 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from tsdh.uni-koblenz.de (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 75E73D2302; Thu, 24 Nov 2011 10:43:20 +0100 (CET) In-Reply-To: (Marius Hofert's message of "Thu, 24 Nov 2011 10:11:51 +0100") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 141.26.64.15 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83036 Archived-At: Marius Hofert writes: Hi Marius, > I played around with message-generate-headers-first, > message-required-mail-headers, and message-required-mail-headers as > follows: > > 1) (setq message-generate-headers-first t); generate all required headers > 2) (setq message-required-mail-headers > '(To Cc Bcc Subject From (optional . In-Reply-To) Date Message-ID (opti= onal . User-Agent)) > message-required-headers '((optional . References))) > 3) (setq gnus-sorted-header-list '("^To:" "^Cc:" "^Bcc:" "^Subject:" "^Fr= om:" > "^Date:" "^Message-ID")); sort the headers Again, `gnus-sorted-header-list' is only relevant for article buffers (reading mail), not message-mode buffers (writing mail). > With only 2) I get=20 > To: > Subject: > Gcc: > From: > =3D> Where are Cc, Bcc,=E2=80=A6? > With 2) and 3) the same happens (well, no surprise).=20 Yeah, you didn't want to generate them beforehand. > With 1) and 2), I am asked for To, Cc, and Bcc and the header looks like = this: > > To: foo@bar.com > Subject:=20 > Cc: foo > Bcc: bar > Date: Thu, 24 Nov 2011 09:46:51 +0100 > Message-ID: > User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (darwin) > Gcc: nnfolder+archive:sent.2011-11 > From: My Name > > Is there a way of _not_ being asked and just show empty entries (as > for Subject above)? Hm, not sure. I'd expected to be queried only for (optional . Foo) entries, but I've never customized anything here. BTW, why do you want Cc and Bcc to show up everytime? Do you really need to Cc and Bcc different people in each and every mail? Most probably, you really want to use posting styles again. That way, you could define that when mailing from all of your uni groups, a Cc header with value your-prof@your-uni.de will be inserted or something along these lines. > Furthermore, with 1) and 3), I'm not asked anymore, but I obtain: > [...] > The same happens with just 1) [without 3)]. Why is the sorting not correc= t? The sorting *is* correct in *article* buffers, cause that's what you've customized. > PS: Adjusting gnus-extra-headers [suggested by Sivaram] did not work > (in the sense that it didn't change anything). As far as I understood > this variable, it specifies *extra* headers, not the default ones I > would like to adjust. Yeah, it specifies what extra variable Gnus should store in its overview files. For example, if you'd want to display the contents of the X-Foobar header in your summary, then you'd need that to be in `gnus-extra-headers', because else Gnus would have to fetch any article in order to get that header in order to display it in summary. Clearly, that wouldn't scale if a summary contains thousands of messages. Bye, Tassilo --=20 (What the world needs (I think) is not (a Lisp (with fewer parentheses)) but (an English (with more.))) Brian Hayes, http://tinyurl.com/3y9l2kf