[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnus-summary-cancel-article
From: |
Teemu Likonen |
Subject: |
Re: gnus-summary-cancel-article |
Date: |
Thu, 04 Jul 2013 15:49:18 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Emanuel Berg [2013-07-04 13:18:03 +02:00] wrote:
> gnus-summary-cancel-article
>
> but it said
>
> Couldn't send message via news: 441 Invalid Control Message
My news server rejects Gnus's cancel messages unless I change the
control message's "Subject" field from "cmsg cancel" to "cancel". I do
this change automatically with message-cancel-hook (see below). Years
ago I browsed news server's control message group and learnt how to make
cancel messages work.
(add-hook 'message-cancel-hook 'tl-message-cancel-hook)
(defun tl-message-cancel-hook ()
(save-excursion
(save-restriction
(save-match-data
(message-narrow-to-head)
(let ((case-fold-search nil))
(when (re-search-forward "^Subject: \\(cmsg \\)cancel" nil t)
(delete-region (match-beginning 1) (match-end 1))))))))
pgp4jmeT6tRVv.pgp
Description: PGP signature