From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66434 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.gnus.general Subject: Highlight words in the subject line? Date: Wed, 05 Mar 2008 14:26:36 +0000 Message-ID: <87hcfli6w3.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204789140 889 80.91.229.12 (6 Mar 2008 07:39:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Mar 2008 07:39:00 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14924@lists.math.uh.edu Thu Mar 06 08:39:22 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1JXAhC-0000l5-Dv for ding-account@gmane.org; Thu, 06 Mar 2008 08:39:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1JXAfm-0006T3-J0; Thu, 06 Mar 2008 01:37:50 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1JWua3-0001mj-2p for ding@lists.math.uh.edu; Wed, 05 Mar 2008 08:26:51 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1JWuZu-0006ku-WC for ding@lists.math.uh.edu; Wed, 05 Mar 2008 08:26:51 -0600 Original-Received: from ug-out-1314.google.com ([66.249.92.174]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1JWua1-0006xm-00 for ; Wed, 05 Mar 2008 15:26:49 +0100 Original-Received: by ug-out-1314.google.com with SMTP id y2so3178058uge.8 for ; Wed, 05 Mar 2008 06:26:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject:user-agent:date:message-id:mime-version:content-type:sender; bh=mwmIE4c4uLzjfIzHu24dqAAp1N6uFVQVyo+ENpcWf0o=; b=fgGc1yRgScrJSyu2+hqvIaT1/+OHlTt5CAcsphTcEp2QirKkhf7DoF+lFfhdzeW8hYj5kAu30yXHzZm5DRtTKGPQz8OCOvRju7DcS8rkzEEfa6JEXCa1kDBT/932Z6/mnaWs1Z9E1SPrZ3Tdv62AveWv1A6HHP9oG+FE10S7dPc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:user-agent:date:message-id:mime-version:content-type:sender; b=uOiyjQAaLAMJvCqoXm795FSMMc0ABnG/kA1tfbHoWcnlC+mhG1Y1bOs2dcsuGwpUiNa/ClgkrSM84E1Sqv98Yu4QZZ/UEGmk3OYrlPwO2ZrPwNvm3Xok4si4kGHjT0TOh6srTP/+opPTAv7Jdahb63RSczUxHRXfaB/W5B0meQ0= Original-Received: by 10.78.201.8 with SMTP id y8mr6748506huf.18.1204727200393; Wed, 05 Mar 2008 06:26:40 -0800 (PST) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id y37sm1741654iky.7.2008.03.05.06.26.38 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Mar 2008 06:26:39 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id 6469E1575BD; Wed, 5 Mar 2008 14:26:36 +0000 (GMT) User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66434 Archived-At: 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