Gnus development mailing list
 help / color / mirror / Atom feed
* hiding remailer banners
@ 1999-01-28  5:35 Michael Cook
  1999-02-01 19:52 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Cook @ 1999-01-28  5:35 UTC (permalink / raw)


For many of the mailing lists I'm on, the remailer adds a big banner
to the end of each message.  In one case, the remailer adds a banner
at the beginning, too.

The following code lets you hide these banners.
On a group-local basis, you specify a regex that matches the banners.

(defun mc-article-hide-matched (&optional arg)
  "Hide text that matches `mc-text-to-hide' (a group-local variable).
If given a negative prefix, always show; if given a positive prefix,
always hide."
  (interactive (gnus-article-hidden-arg))
  (let ((re (gnus-group-get-parameter gnus-newsgroup-name 'mc-text-to-hide)))
    (if re
	(gnus-eval-in-buffer-window gnus-article-buffer
	  (unless (gnus-article-check-hidden-text 'mc-matched arg)
	    (save-excursion
	      (let ((buffer-read-only nil))
		(save-restriction
		  (widen)
		  (article-goto-body)
		  (while (search-forward-regexp re nil t)
		    (gnus-article-hide-text-type
		     (match-beginning 0) (match-end 0) 'mc-matched))))))))))
(add-hook 'gnus-part-display-hook 'mc-article-hide-matched)

Michael.


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

* Re: hiding remailer banners
  1999-01-28  5:35 hiding remailer banners Michael Cook
@ 1999-02-01 19:52 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-02-01 19:52 UTC (permalink / raw)


Michael Cook <cook@sightpath.com> writes:

> For many of the mailing lists I'm on, the remailer adds a big banner
> to the end of each message.  In one case, the remailer adds a banner
> at the beginning, too.
> 
> The following code lets you hide these banners.

I think this is a good idea, but I think it would be nice if there
were "shortcuts" that covered common banners.  (I'm thinking
especially of extra "signatures".)  And the banners should be totally
removed, so that the other highlighting can be done more easily.  So
I've included your function in 0.75, but I've rewritten it.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1999-02-01 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-28  5:35 hiding remailer banners Michael Cook
1999-02-01 19:52 ` Lars Magne Ingebrigtsen

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