From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/35224 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: Re: Summary format - the `u' spec Date: 04 Mar 2001 17:07:18 -0800 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 1035171001 1849 80.91.224.250 (21 Oct 2002 03:30:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:30:01 +0000 (UTC) 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 4B947D049E for ; Sun, 4 Mar 2001 20:07:54 -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 TAB30569; Sun, 4 Mar 2001 19:07:47 -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 19:07:05 -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 TAA27190 for ; Sun, 4 Mar 2001 19:06:55 -0600 (CST) Original-Received: from mail.networkone.net (mail.networkone.net [209.144.112.246]) by mailhost.sclp.com (Postfix) with SMTP id 3F910D049E for ; Sun, 4 Mar 2001 20:07:24 -0500 (EST) Original-Received: (qmail 19046 invoked from network); 5 Mar 2001 01:07:20 -0000 Original-Received: from unknown (HELO reader.local.lan) (209.144.117.151) by mail.networkone.net with SMTP; 5 Mar 2001 01:07:20 -0000 Original-Received: (from reader@localhost) by reader.local.lan (8.11.0/8.11.0) id f2517Iq17784; Sun, 4 Mar 2001 17:07:18 -0800 X-Authentication-Warning: reader.local.lan: reader set sender to reader@newsguy.com using -f Original-To: ding@gnus.org In-Reply-To: (Alex Schroeder's message of "05 Mar 2001 01:39:42 +0100") User-Agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/20.7 Precedence: list X-Majordomo: 1.94.jlt7 Original-Lines: 39 Xref: main.gmane.org gmane.emacs.gnus.general:35224 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:35224 Alex Schroeder writes: > Harry Putnam writes: > > > So once the keywords line is matched does elisp offer a pattern > > matching command that returns the matched portion? > > Hm, you can probably use normal elisp to do it: > > (if (string-match "\\[\\([A-Z]\\)\\]" some-string) > (match-string 0) > " ") > > Or something like that. OK, but revealing the bottomless depths of my lisp ignorance: How does this fit into the rest of the function? I tried just splicing it in there a couple ways but of course that ain't going to fly. (defun gnus-user-format-function-H (header) (let* ((xtra (mail-header-extra header)) (kw (cdr (assq 'Keywords xtra)))) (if (and kw (stringp kw) (if (string-match "\\[\\([A-Z]\\)\\]" some-string) (match-string 0) " "))))) (defun gnus-user-format-function-H (header) (let* ((xtra (mail-header-extra header)) (kw (cdr (assq 'Keywords xtra)))) (if (and kw (stringp kw)) (string-match "\\[\\([A-Z]\\)\\]" some-string) (match-string 0) " "))) NOT!