Gnus development mailing list
 help / color / mirror / Atom feed
* Posting Styles: message-fetch-reply-field always returns nil
@ 1999-04-18 20:16 Peter von der Ahé
  1999-04-19  6:29 ` Lars Magne Ingebrigtsen
  1999-04-22 15:22 ` David S. Goldberg
  0 siblings, 2 replies; 5+ messages in thread
From: Peter von der Ahé @ 1999-04-18 20:16 UTC (permalink / raw)


Hi!

I have set up a posting style, which needs to look at the headers of
the mail being replied to:

(defun reply-to-ahedk-p ()
  "Return nil if not replying to a mail sent to ahe.dk"
  (save-excursion
    (and gnus-article-buffer
	 (set-buffer (get-buffer-create gnus-article-buffer))
	 (let ((to (gnus-fetch-field "to")))
	   (and to
		(string-match "@hatespam.ahe.dk" to))))))

(setq gnus-posting-styles
      '((reply-to-ahedk-p
	 (address "peter@hatespam.ahe.dk"))))

I think the reply-to-ahedk-p is kind of an ugly solution, it would
have been nicer to just write:

(defun reply-to-ahedk-p ()
  "Return nil if not replying to a mail sent to ahe.dk"
  (let ((to (message-fetch-reply-field "to")))
    (and to
	 (string-match "@hatespam.ahe.dk" to))))

Would it be possible to setup the posting styles when
message-fetch-reply-field can return something interesting?

Kind Regards
Peter


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-04-22 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-18 20:16 Posting Styles: message-fetch-reply-field always returns nil Peter von der Ahé
1999-04-19  6:29 ` Lars Magne Ingebrigtsen
1999-04-19 12:58   ` Kai.Grossjohann
1999-04-21 19:01     ` Lars Magne Ingebrigtsen
1999-04-22 15:22 ` David S. Goldberg

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).