Gnus development mailing list
 help / color / mirror / Atom feed
From: sigurd@12move.de (Karl Pflästerer)
Subject: Re: #v+, #v-
Date: Sun, 15 Feb 2004 04:33:54 +0100	[thread overview]
Message-ID: <m3fzddf2gm.fsf@hamster.pflaesterer.de> (raw)
In-Reply-To: <87ad3ljofa.fsf@emptyhost.emptydomain.de>

On 14 Feb 2004, Kai Grossjohann <- kai@emptydomain.de wrote:

> lawrence mitchell <s0198183+ding@sms.ed.ac.uk> writes:

>> I believe they're not supported in other mail/newsreaders
>> though.

> Well, anyone up to doing it for Gnus?  Sounds like a cool feature.  We
> *do* already have MIME multiparts, but one feature more, what can it
> hurt...


Well I did a first study to see what maybe had to be done but had quick
some questions which I couldn't answer myself without deeply studying
the sources.

(defun gnus-article-search-verbose ()
  (let (verbose pt)
    (save-match-data
      (save-excursion
	(goto-char (point-min))
	(while (re-search-forward "^#v\\+" nil t)
	  (setq pt (match-beginning 0))
	  (and (re-search-forward "^#v\\(.\\)" nil t)
	       (string-equal (match-string 1) "-")
	       (push (cons pt (match-end 0)) verbose))
	  (unless (eobp) (goto-char (point-at-bol))))))
    (nreverse verbose)))

(defun gnus-article-highlight-verbose () 
  (dolist (region (gnus-article-search-verbose))
    (gnus-overlay-put (gnus-make-overlay (car region) (cdr region))
		      'face 'gnus-header-subject-face)))

(defvar gnus-treat-highlight-verbose t)
(put 'gnus-treat-highlight-verbose 'highlight t)

(setq gnus-treatment-function-alist
	(nconc gnus-treatment-function-alist
	       '((gnus-treat-highlight-verbose gnus-article-highlight-verbose))))


The above code finds the regions of interest and highlights them (I
choose some arbitrary face just to have an effect).

But we wanted more: wrapping (== filling) should be inhibited IIRC.  Can
this be done with overlays?  How should the highlighting be done? Like
here with just one face or do we want different faces for different
tokens?



   KP

-- 
Männer der Wissenschaft! Man sagt ihr viele nach, 
aber die meisten mit Unrecht.  
                             Karl Kraus 'Aphorismen'



      reply	other threads:[~2004-02-15  3:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-11 17:00 nnmaildir Thomas Schwinge
2004-02-11 17:42 ` nnmaildir Paul Jarc
2004-02-11 22:05   ` nnmaildir Thomas Schwinge
2004-02-11 23:23     ` nnmaildir Paul Jarc
2004-02-12 14:35       ` nnmaildir Thomas Schwinge
2004-02-12 16:36         ` nnmaildir Paul Jarc
2004-02-12 22:45           ` nnmaildir Thomas Schwinge
2004-02-12 22:57             ` nnmaildir Paul Jarc
2004-02-13 14:02               ` nnmaildir Thomas Schwinge
2004-02-14  3:34                 ` nnmaildir Paul Jarc
2004-02-14 18:26 ` nnmaildir Kai Grossjohann
2004-02-14 18:38   ` #v+, #v- (was: nnmaildir) lawrence mitchell
2004-02-14 22:18     ` #v+, #v- Kai Grossjohann
2004-02-15  3:33       ` Karl Pflästerer [this message]

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=m3fzddf2gm.fsf@hamster.pflaesterer.de \
    --to=sigurd@12move.de \
    /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).