Gnus development mailing list
 help / color / mirror / Atom feed
* Getting rid of Subject: prefixes in news postings
@ 1999-01-06 13:03 Anders Melchiorsen
  1999-01-06 15:27 ` Jason L Tibbitts III
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Anders Melchiorsen @ 1999-01-06 13:03 UTC (permalink / raw)


Is there a way to make the Summary buffer chop off uninteresting parts
of Subject: lines (ie. automatic prefixes identifying mailing lists)?

The method (I forgot what it is called) I used for a mailing list
altered the file itself which is obviously not an option for news.

I also tried some of the fuzzy stuff but it seems to be only related
to sorting/threading the articles.
-- 
Regards, Anders
(address is valid)


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

* Re: Getting rid of Subject: prefixes in news postings
  1999-01-06 13:03 Getting rid of Subject: prefixes in news postings Anders Melchiorsen
@ 1999-01-06 15:27 ` Jason L Tibbitts III
  1999-01-07 12:44   ` Jari Aalto+mail.procmail
  1999-01-06 19:00 ` Lars Balker Rasmussen
  1999-01-07 15:03 ` Justin Sheehy
  2 siblings, 1 reply; 8+ messages in thread
From: Jason L Tibbitts III @ 1999-01-06 15:27 UTC (permalink / raw)


>>>>> "AM" == Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:

AM> Is there a way to make the Summary buffer chop off uninteresting parts
AM> of Subject: lines (ie. automatic prefixes identifying mailing lists)?

Probably not what you're looking for, but I use procmail rules like the
following when my mail is sorted; this takes "FVWM: " off of the subject.

:0
* ^TOfvwm@.*hpc.uh.edu
{
        :0 h
        SUBJECT=| formail -xSubject: | sed 's/FVWM: //'

        :0 fhw
        |formail -i "Subject:" -a "Subject:$SUBJECT"

        :0: 
        spool/fvwm.spool
}

 - J<


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

* Re: Getting rid of Subject: prefixes in news postings
  1999-01-06 13:03 Getting rid of Subject: prefixes in news postings Anders Melchiorsen
  1999-01-06 15:27 ` Jason L Tibbitts III
@ 1999-01-06 19:00 ` Lars Balker Rasmussen
  1999-01-08  3:35   ` Anders Melchiorsen
  1999-01-07 15:03 ` Justin Sheehy
  2 siblings, 1 reply; 8+ messages in thread
From: Lars Balker Rasmussen @ 1999-01-06 19:00 UTC (permalink / raw)



Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:
> Is there a way to make the Summary buffer chop off uninteresting parts
> of Subject: lines (ie. automatic prefixes identifying mailing lists)?

How about a variation of

	(defun my-fix-subject ()
	  (save-restriction 
	    (message-narrow-to-headers)
	    (goto-char (point-min))
	    (if (re-search-forward "\\(Subject: Re: \\)\\[[^]]+\\] ")
		(replace-match "\\1"))))
	(add-hook 'message-setup-hook 'my-fix-subject)
-- 
Lars Balker Rasmussen                                        "Woo hoo!?"
	
.



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

* Re: Getting rid of Subject: prefixes in news postings
  1999-01-06 15:27 ` Jason L Tibbitts III
@ 1999-01-07 12:44   ` Jari Aalto+mail.procmail
  1999-01-07 14:07     ` Karl Kleinpaste
  0 siblings, 1 reply; 8+ messages in thread
From: Jari Aalto+mail.procmail @ 1999-01-07 12:44 UTC (permalink / raw)


| 1999-01-06 Jason L Tibbitts III <tibbs@hpc.uh.edu> list.ding
| >>>>> "AM" == Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:
| 
| AM> Is there a way to make the Summary buffer chop off uninteresting parts
| AM> of Subject: lines (ie. automatic prefixes identifying mailing lists)?
| 
| Probably not what you're looking for, but I use procmail rules like the
| following when my mail is sorted; this takes "FVWM: " off of the subject.
| 
| :0
| * ^TOfvwm@.*hpc.uh.edu

[clip: procmail code]

There is also a heavy weight Subject line canoniliser procmail module
that wipes out all uninteresting words and prefixes

See pm-jasubject.rc at ftp://cs.uta.fi/pub/ssjaaa/pm-code.html

        ...

            Subject: re- Re^2: Re[32]: FW: Re: Re(15) Sv: Re[9]: -reply
                     (fwd) [fwd] <fwd> fw: [FWD:  [FWD:]]
                     -subj subj: subj: subj-
                     test
 
        This recipe standardizes any subject (like above) that has been
        replied to, to de facto format:
 
             Subject: Re: test
 
 
        You can use JA_SUBJECT_KILL to kill any additional words from the
        subject line. Eg. if you have good newsreader, you don't need the
        mailing list prefixes that some mailing lists add to the beginning
 
            Subject: [LIST-xxx] the subject here
 
        to remove that list prefix, you simply match it
 
            JA_SUBJECT_KILL = "(list-xxx|list-yyy)"
 
        Inportant: The regexp must be _all_ lowercase, because when match
        happens, the word has been converted to lowercase.

jari


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

* Re: Getting rid of Subject: prefixes in news postings
  1999-01-07 12:44   ` Jari Aalto+mail.procmail
@ 1999-01-07 14:07     ` Karl Kleinpaste
  0 siblings, 0 replies; 8+ messages in thread
From: Karl Kleinpaste @ 1999-01-07 14:07 UTC (permalink / raw)


Jason L Tibbitts III <tibbs@hpc.uh.edu> list.ding
>> Probably not what you're looking for, but I use procmail rules like the
>> following when my mail is sorted; this takes "FVWM: " off of the subject.

jari.aalto@poboxes.com (Jari Aalto+mail.procmail) writes:
> There is also a heavy weight Subject line canoniliser procmail module
> that wipes out all uninteresting words and prefixes

These are interesting suggestions, but the original problem was
expressly for news and not mail.

Anders Melchiorsen writes:
>>> The method (I forgot what it is called) I used for a mailing list
>>> altered the file itself which is obviously not an option for news.

Gnus' own method uses nnmail-list-identifiers plus a related nnmail
hook, which does what the procmail solutions do.  But Anders needs
something for Summary-time hackery, on articles Gnus cannot alter.


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

* Re: Getting rid of Subject: prefixes in news postings
  1999-01-06 13:03 Getting rid of Subject: prefixes in news postings Anders Melchiorsen
  1999-01-06 15:27 ` Jason L Tibbitts III
  1999-01-06 19:00 ` Lars Balker Rasmussen
@ 1999-01-07 15:03 ` Justin Sheehy
  1999-01-08  3:14   ` Anders Melchiorsen
  2 siblings, 1 reply; 8+ messages in thread
From: Justin Sheehy @ 1999-01-07 15:03 UTC (permalink / raw)


Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:

> Is there a way to make the Summary buffer chop off uninteresting parts
> of Subject: lines (ie. automatic prefixes identifying mailing lists)?

The only solution to this that I can think of is to use a user defined
summary line specifier, as described in the last entry under
http://www.gnus.org/manual/gnus_3.html#SEC48 in the manual.

-- 
Justin Sheehy

In a cloud bones of steel.
  




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

* Re: Getting rid of Subject: prefixes in news postings
  1999-01-07 15:03 ` Justin Sheehy
@ 1999-01-08  3:14   ` Anders Melchiorsen
  0 siblings, 0 replies; 8+ messages in thread
From: Anders Melchiorsen @ 1999-01-08  3:14 UTC (permalink / raw)


Justin Sheehy <justin@linus.mitre.org> writes:

> Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:
> 
> > Is there a way to make the Summary buffer chop off uninteresting parts
> > of Subject: lines (ie. automatic prefixes identifying mailing lists)?
> 
> The only solution to this that I can think of is to use a user defined
> summary line specifier, as described in the last entry under
> http://www.gnus.org/manual/gnus_3.html#SEC48 in the manual.

So, I tried that, but I failed (somewhat). It seems like I will have
to recode the entire subject: mangling inside that function just
because I want to mangle it a little bit further?

While I probably could get that to work (copy from gnus' source), I
would not like the approach.

-- 
Regards, Anders
(address is valid)


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

* Re: Getting rid of Subject: prefixes in news postings
  1999-01-06 19:00 ` Lars Balker Rasmussen
@ 1999-01-08  3:35   ` Anders Melchiorsen
  0 siblings, 0 replies; 8+ messages in thread
From: Anders Melchiorsen @ 1999-01-08  3:35 UTC (permalink / raw)


Lars Balker Rasmussen <gnort@daimi.au.dk> writes:

> Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:
> > Is there a way to make the Summary buffer chop off uninteresting parts
> > of Subject: lines (ie. automatic prefixes identifying mailing lists)?
> 
> How about a variation of
> 
> 	(defun my-fix-subject ()
> 	  (save-restriction 
> 	    (message-narrow-to-headers)
> 	    (goto-char (point-min))
> 	    (if (re-search-forward "\\(Subject: Re: \\)\\[[^]]+\\] ")
> 		(replace-match "\\1"))))
> 	(add-hook 'message-setup-hook 'my-fix-subject)

For anyone interested, this solved the problem.

       (defun my-fix-subject ()
       	(save-restriction 
       	 (goto-char (point-min))
       	 (while (re-search-forward "\\[SSLUG[-A-Z]*\\][ \t]*" nil t)
       	   (replace-match ""))))
       (add-hook 'gnus-summary-prepare-hook 'my-fix-subject)
       
I am not certain that I find this solution entirely "clean". But when
I figure out a way to make it apply to just the groups which have the
problem, I can probably live with it.

Thanks!
-- 
Regards, Anders
(address is valid)


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

end of thread, other threads:[~1999-01-08  3:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-06 13:03 Getting rid of Subject: prefixes in news postings Anders Melchiorsen
1999-01-06 15:27 ` Jason L Tibbitts III
1999-01-07 12:44   ` Jari Aalto+mail.procmail
1999-01-07 14:07     ` Karl Kleinpaste
1999-01-06 19:00 ` Lars Balker Rasmussen
1999-01-08  3:35   ` Anders Melchiorsen
1999-01-07 15:03 ` Justin Sheehy
1999-01-08  3:14   ` Anders Melchiorsen

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