From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44890 Path: main.gmane.org!not-for-mail From: Dmitry Bely Newsgroups: gmane.emacs.gnus.general Subject: message-reply-headers and posting styles Date: Tue, 21 May 2002 13:32:50 +0400 Organization: DB @ somewhere Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021973636 28509 127.0.0.1 (21 May 2002 09:33:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 21 May 2002 09:33:56 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17A61k-0007Pi-00 for ; Tue, 21 May 2002 11:33:56 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17A613-0006cq-00; Tue, 21 May 2002 04:33:13 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 21 May 2002 04:33:31 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id EAA08311 for ; Tue, 21 May 2002 04:33:17 -0500 (CDT) Original-Received: (qmail 13587 invoked by alias); 21 May 2002 09:32:54 -0000 Original-Received: (qmail 13582 invoked from network); 21 May 2002 09:32:54 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 21 May 2002 09:32:54 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 17A6EY-0000f5-00 for ; Tue, 21 May 2002 11:47:10 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 35 Original-NNTP-Posting-Host: d032.p9.col.ru Original-X-Trace: quimby.gnus.org 1021974430 1699 212.248.7.32 (21 May 2002 09:47:10 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 21 May 2002 09:47:10 GMT User-Agent: Gnus/5.090007 (Oort Gnus v0.07) XEmacs/21.5 (bok choi, i586-pc-win32) Cancel-Lock: sha1:uGqJm5kCWDTOo426G9Hn07UPKa0= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44890 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44890 Having read the Gnus manual, specifically [---cut---] Posting Styles ============== ... The attribute value can be a string (used verbatim), a function with zero arguments (the return value will be used), a variable (its value will be used) or a list (it will be `eval'ed and the return value will be used). The functions and sexps are called/`eval'ed in the message buffer that is being set up. The headers of the current article are available through the `message-reply-headers' variable, which is a vector of the following headers: number subject from date id references chars lines xref extra. [---cut---] I wrote the following: (setq gnus-posting-styles '(("fido7" ("X-Comment-To" (lambda () (let ((from (aref message-reply-headers 2))) (if (string-match " *<.*> *" from) (concat (substring from 0 (match-beginning 0)) (substring from (match-end 0))) (if (string-match "\(.*\)" from) (substring from (+ (match-beginning 0) 1) (- (match-end 0) 1)) from))))) ))) But this does not work. message-reply-headers variable is nil inside lambda. Could you explain me what am I doing wrong? Hope to hear from you soon, Dmitry