[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Setting gnus-message-archive-group in message-send-hook
From: |
Marcin Wlodarczak |
Subject: |
Setting gnus-message-archive-group in message-send-hook |
Date: |
Sat, 17 Sep 2011 13:41:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Hi,
I'm trying to set gnus-message-archive-group depending on the From:
address, using the message-send-hook. Here is what I've got so
far:
(add-hook 'message-send-hook 'my-select-archive-group)
(defun my-select-archive-group ()
(let ((from-address (mail-fetch-field "from")))
(cond ((search "uni" from-address)
(setq gnus-message-archive-group "nnimap+uni:Sent"))
((search "gmail" from-address)
(setq gnus-message-archive-group "nnimap+gmail:[Google Mail]/Sent
Mail")))))
The problem is, however, that this only sets the Gcc line for the
*following message* not the one being sent. What am I doing wrong
here?
Best,
Marcin
- Setting gnus-message-archive-group in message-send-hook,
Marcin Wlodarczak <=