Gnus development mailing list
 help / color / mirror / Atom feed
From: Bastien <bzg@altern.org>
To: ding@gnus.org
Subject: Highlight words in the subject line?
Date: Wed, 05 Mar 2008 14:26:36 +0000	[thread overview]
Message-ID: <87hcfli6w3.fsf@bzg.ath.cx> (raw)

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



             reply	other threads:[~2008-03-05 14:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05 14:26 Bastien [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hcfli6w3.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).