* message-reply-headers and posting styles @ 2002-05-21 9:32 Dmitry Bely 2002-05-21 10:45 ` Kai Großjohann 0 siblings, 1 reply; 4+ messages in thread From: Dmitry Bely @ 2002-05-21 9:32 UTC (permalink / 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: message-reply-headers and posting styles 2002-05-21 9:32 message-reply-headers and posting styles Dmitry Bely @ 2002-05-21 10:45 ` Kai Großjohann 2002-05-21 11:07 ` Dmitry Bely 0 siblings, 1 reply; 4+ messages in thread From: Kai Großjohann @ 2002-05-21 10:45 UTC (permalink / raw) Cc: ding Dmitry Bely <dbely@mail.ru> writes: > But this does not work. message-reply-headers variable is nil inside > lambda. Could you explain me what am I doing wrong? So the lambda is executed? Hm. kai -- Silence is foo! ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: message-reply-headers and posting styles 2002-05-21 10:45 ` Kai Großjohann @ 2002-05-21 11:07 ` Dmitry Bely 2002-05-21 13:07 ` Kai Großjohann 0 siblings, 1 reply; 4+ messages in thread From: Dmitry Bely @ 2002-05-21 11:07 UTC (permalink / raw) Cc: ding Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes: >> But this does not work. message-reply-headers variable is nil inside >> lambda. Could you explain me what am I doing wrong? > > So the lambda is executed? Yes, but message-reply-headers is not bound (yet?), so the runtime error happens. It looks like a Gnus bug? Hope to hear from you soon, Dmitry ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: message-reply-headers and posting styles 2002-05-21 11:07 ` Dmitry Bely @ 2002-05-21 13:07 ` Kai Großjohann 0 siblings, 0 replies; 4+ messages in thread From: Kai Großjohann @ 2002-05-21 13:07 UTC (permalink / raw) Cc: ding Dmitry Bely <dbely@mail.ru> writes: > Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes: > >>> But this does not work. message-reply-headers variable is nil inside >>> lambda. Could you explain me what am I doing wrong? >> >> So the lambda is executed? > > Yes, but message-reply-headers is not bound (yet?), so the runtime error > happens. It looks like a Gnus bug? Yes, it looks like that. kai -- Silence is foo! ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-05-21 13:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-05-21 9:32 message-reply-headers and posting styles Dmitry Bely 2002-05-21 10:45 ` Kai Großjohann 2002-05-21 11:07 ` Dmitry Bely 2002-05-21 13:07 ` Kai Großjohann
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).