Gnus development mailing list
 help / color / mirror / Atom feed
From: Dmitry Bely <dbely@mail.ru>
Subject: message-reply-headers and posting styles
Date: Tue, 21 May 2002 13:32:50 +0400	[thread overview]
Message-ID: <lmadzvzx.fsf@mail.ru> (raw)

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



             reply	other threads:[~2002-05-21  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-21  9:32 Dmitry Bely [this message]
2002-05-21 10:45 ` Kai Großjohann
2002-05-21 11:07   ` Dmitry Bely
2002-05-21 13:07     ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lmadzvzx.fsf@mail.ru \
    --to=dbely@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).