Gnus development mailing list
 help / color / mirror / Atom feed
* Highlight words in the subject line?
@ 2008-03-05 14:26 Bastien
  2008-03-06 14:02 ` Wes Hardaker
  0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2008-03-05 14:26 UTC (permalink / raw)
  To: ding

Hi,

I'm using this to highlight words in the subject line:

,----
| (add-hook 'gnus-summary-prepared-hook 'highlight-my-words)
| 
| (defun highlight-my-words nil
|   "Highlight some words."
|   (let (buffer-read-only)
|     (save-excursion
|       (goto-char (point-min))
|       (while (re-search-forward "ducation\\|OLPC\\|wiki" nil t)
| 	(add-text-properties 
| 	 (match-beginning 0) (match-end 0)
| 	 (list 'face my-summary-highlight-words)))))
|   (setq buffer-read-only t))
| 
| (setq my-summary-highlight-words '((t (:foreground "yellow"))))
`----

But this is only a workaround.  It would be nice to have it implemented
in Gnus, maybe with a new group parameter: `highlight-summary-words'.

In the meanwhile, how can I access the group parameters from the
prepared summary, and use the value of highlight-words instead of a
default regexp?

Thanks for any pointer,

-- 
Bastien



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

end of thread, other threads:[~2008-03-09  3:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-05 14:26 Highlight words in the subject line? Bastien
2008-03-06 14:02 ` Wes Hardaker
2008-03-06 14:29   ` Bastien
2008-03-07 20:38     ` Wes Hardaker
2008-03-07 22:36   ` Reiner Steib
2008-03-09  3:12     ` Wes Hardaker

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).