> Uwe Brauer via "Announcements and discussions for GNUS, the GNU Emacs > Usenet newsreader (in English)" <info-gnus-english@gnu.org> writes:
> Sorry I meant the 'message-wide-reply-to-function' in the same page. > On the face of it, it seems to cover this use case: Hm on a second thought I could to this (defun check-my-to-field (&optional arg) "Warn if your email address is not in the To field, unless it's a newsgroup post." (interactive "P") (save-window-excursion (gnus-summary-select-article-buffer) (let ((to-field (message-fetch-field "To")) (newsgroup-field (message-fetch-field "Newsgroups"))) (unless (or (and to-field (string-match-p (regexp-quote user-mail-address) to-field)) newsgroup-field) ; Do not warn if it's a newsgroup (if (y-or-n-p "Warning: Followup? But you are not on the TO field, you FOOL, proceed?") (message "I hope you are sure.") (error (progn (message "Aborted, you are not in the To: field!!!")))))))) Which is the final version of the function I came up with (setq message-reply-to-function #'check-my-to-field) Instead of using advice. -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine.
smime.p7s
Description: S/MIME cryptographic signature