From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/35214 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Summary format - the `u' spec Date: 04 Mar 2001 18:54:33 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035170993 1773 80.91.224.250 (21 Oct 2002 03:29:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:29:53 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from lisa.math.uh.edu (lisa.math.uh.edu [129.7.128.49]) by mailhost.sclp.com (Postfix) with ESMTP id B86C4D049E for ; Sun, 4 Mar 2001 12:55:40 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by lisa.math.uh.edu (8.9.1/8.9.1) with ESMTP id LAB22761; Sun, 4 Mar 2001 11:55:22 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 04 Mar 2001 11:54:29 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id LAA24747 for ; Sun, 4 Mar 2001 11:54:15 -0600 (CST) Original-Received: from waldorf.cs.uni-dortmund.de (waldorf.cs.uni-dortmund.de [129.217.4.42]) by mailhost.sclp.com (Postfix) with ESMTP id 7CCF0D049E for ; Sun, 4 Mar 2001 12:54:43 -0500 (EST) Original-Received: from marcy.cs.uni-dortmund.de (marcy.cs.uni-dortmund.de [129.217.20.159]) by waldorf.cs.uni-dortmund.de with ESMTP id SAA15687; Sun, 4 Mar 2001 18:54:33 +0100 (MET) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.20.160]) by marcy.cs.uni-dortmund.de id SAA01136; Sun, 4 Mar 2001 18:54:33 +0100 (MET) Original-Received: (from grossjoh@localhost) by lucy.cs.uni-dortmund.de (8.9.3/8.9.3/Debian 8.9.3-21) id SAA31846; Sun, 4 Mar 2001 18:54:33 +0100 X-Face: 6=pZ4hVbjN:C?j1$h/-bi4:F%*~B#Rxb$[0%!{5NK"dE:_QRAM]Dzl=$yMu%Rh4xCSm/#>! $n%@SHJ](KFJKL,uF\=G=bRJQC$ ?+Dlxu*pj.Z,-GK<~y7sd/l*PN\]>} In-Reply-To: (Harry Putnam's message of "04 Mar 2001 08:21:59 -0800") User-Agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/20.6 Precedence: list X-Majordomo: 1.94.jlt7 Original-Lines: 44 Xref: main.gmane.org gmane.emacs.gnus.general:35214 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:35214 On 04 Mar 2001, Harry Putnam wrote: > Hopefully I'm, correct in thinking the line that says: > "...The function will be passed the current header as argument." > Means that all header lines get scanned. Hm, no, not really. `Mail header' in this context (oh, how I love the inconsistent terminology in Gnus!) is a structure which contains the information from the NOV (or overview) file/data in a Lisp-predigested form. For example, if X is such a header, then (mail-header-subject X) returns a string, the subject of the message. Such a header contains only those bits of information that are present in the overview file. For nnml, you can put more information into the overview file using the variables gnus-extra-headers and nnmail-extra-headers. Not sure if this works with NNTP (news) servers. > I want to use this option to cause gnus to scan the headers for this > pattern `^Keywords: \\[A\\] '. And if found, to insert the capital > letter found inside the [] into th summary display. Ah. Yes. Hm. What you want is to (add-to-list 'nnmail-extra-headers 'Keywords) (add-to-list 'gnus-extra-headers 'Keywords) And then you can do: (defun gnus-user-format-function-H (header) (let* ((xtra (mail-header-extra header)) (kw (cdr (assq 'Keywords xtra)))) (if (and kw (stringp kw)) (substring kw 0 5) " "))) This is untested. Not sure if it works. It tries to print the first 5 or 6 characters of the Keywords header, or spaces (if there is no Keywords header). Does this work, and can you take it from here? kai -- Be indiscrete. Do it continuously.