Gnus development mailing list
 help / color / mirror / Atom feed
* "@" for addressed-to-you in summary line
@ 2005-08-11  7:14 Karl Chen
  2005-09-18 20:23 ` Michael Cook
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Chen @ 2005-08-11  7:14 UTC (permalink / raw)



I've been using the following code successfully for over a year to
mark mail addressed to me with a "@".  This is the same as the "+"
character used by pine and mutt.  To use add "%u+" to
gnus-summary-line-format.  I hope someone finds this useful.
Something similar is suitable for inclusion in Gnus.



(setq gnus-extra-headers '(To Cc Newsgroups Original-To))

(defun kc-mail-header-recipients (header)
  "Returns string of recipients extracted from To: and Cc: headers."
  (mapconcat (lambda (h) (gnus-extra-header h header)) '(To Cc Original-To) ", "))

(defvar kc-gnus-interesting-recipients nil
  "*Regexp of addresses for which to mark \"@\" in summary buffer.")

(defun kc-gnus-interesting-recipients-p (to)
  "Returns non-nil if any string in TO is \"interesting\".

A string is interesting if it is matched by `kc-gnus-interesting-recipients'"
  (and kc-gnus-interesting-recipients
       to
       (string-match kc-gnus-interesting-recipients to)))

(defun gnus-user-format-function-+ (header)
  (if (kc-gnus-interesting-recipients-p (kc-mail-header-recipients header))
      "@"
    " "))


-- 
Karl 2005-08-11 00:08




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-18 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-11  7:14 "@" for addressed-to-you in summary line Karl Chen
2005-09-18 20:23 ` Michael Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).