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

Re: `a' in a mail-and-news group



David S. Goldberg <dsg@mitre.org> writes:

> I use the following to decide when to add a "Mail-Copies-To: never"
> header.

Right.  I have now cooked up the following, which I hope is general
enough to be useful for others, as well.

I'm not sure that it catches all cases, though.  It seems that after
C-u a, the buffer-local value of gnus-newsgroup-name is "" but the
global value is the right group name.  Oh, well.

(defun kai-message-header-setup-hook ()
  (when (and (string-match "wide reply\\|mail" (buffer-name))
             (string-match "nnimap:" gnus-newsgroup-name)
             (not (string-match "nnimap:INBOX" gnus-newsgroup-name)))
    (message-remove-header "gcc")
    (goto-char (point-max))
    (string-match "nnimap:\\(.*\\)" gnus-newsgroup-name)
    (insert "Newsgroups: " (match-string 1 gnus-newsgroup-name) "\n")))
(add-hook 'message-header-setup-hook 'kai-message-header-setup-hook)

kai
-- 
I like BOTH kinds of music.