[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ensuring the subject lines contains a word?

From: Johann 'Myrkraverk' Oskarsson
Subject: Re: Ensuring the subject lines contains a word?
Date: Wed, 01 Apr 2009 17:46:42 +0000
User-agent: Gnus/5.1008 (Gnus v5.10.8) SXEmacs/22.1.9 (usg-unix-v)

Ted Zlatanov <> writes:

> I am sure integrating this with posting styles won't be too hard
> either.

I ended up with the following function, and using group parameters, to
have it in message-send-hook.

(defun my-assd-in-subject () (interactive)
  (let ((s (message-field-value "subject")))
    (unless (string-match "{ASSD}" s)
        (insert (concat "Subject: {ASSD} " s "\n"))))))

This function will probably fail if the subject line is empty.

I needed this too:

(add-to-list 'gnus-newsgroup-variables 'message-send-hook)

and these are the group parameters:

((message-send-hook 'my-assd-in-subject))

Which will need to be tweaked to allow more than one hook function.

Thank you,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]