Gnus development mailing list
 help / color / mirror / Atom feed
* A RE: SV: AW: "collapser", anyone...?
@ 2003-05-31 23:23 Steinar Bang
       [not found] ` <hhhe7ak6ph.fsf@blah.pl>
  0 siblings, 1 reply; 25+ messages in thread
From: Steinar Bang @ 2003-05-31 23:23 UTC (permalink / raw)


Does anyone know if there is functionality to do RE: SV: AW:
etc. "collapsing" in the Subjects of articles?

I've looked through the washing and hiding stuff in articles sections
in the documentation without finding anything.

Nor does there seem to be a Subject simplify function to do this.



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

* Re: A RE: SV: AW: "collapser", anyone...?
       [not found] ` <hhhe7ak6ph.fsf@blah.pl>
@ 2003-06-01 21:34   ` Steinar Bang
  2003-06-01 21:51     ` Steinar Bang
                       ` (2 more replies)
  2003-06-02 16:10   ` Randal L. Schwartz
  2003-06-03 11:49   ` Colin Marquardt
  2 siblings, 3 replies; 25+ messages in thread
From: Steinar Bang @ 2003-06-01 21:34 UTC (permalink / raw)


>>>>> Maciej Matysiak <phoner.ding@blah.pl>:

> there is, if you add the stuff to message-subject-re-regexp
> variable.  default value covers only english version of reply
> prefix.

Hm... grep tells me that this variable is used in
gnus-simplify-subject-re in gnus-sum.el, and in
message-strip-subject-re in message.el.

As far as I can tell this means that the collapsing will work as
desired for summary buffers (ie. remove them all).

For messages being composed, this will remove them all, while I would
like a single Re: to be left there.  Or perhaps this is inserted
elswhere into the Subject of the message being composed?

But this regular expression isn't used by any article washing
function, so I would have to write something there.

> i'm all for expanding it with localized prefixes (polish 'odp', swedish 'sv',
> and so on). for the beginning:

> (setq message-subject-re-regexp
>  "^[ \t]*\\(\\(\\([Aa][Ww]\\)\\|\\([Oo][Dd][Pp]\\)\\|\\([Rr][Ee]\\)\\|\\([Ss][Vv]\\)\\|\\)\\(\\[[0-9]*\\]\\)*:[ \t]*\\)*[ \t]*")

> (i don't know any more translated re's).

One I've seen is "Ad", by a Norwegian version of Lotus Notes.



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-01 21:34   ` Steinar Bang
@ 2003-06-01 21:51     ` Steinar Bang
  2003-06-02  9:37     ` Niklas Morberg
       [not found]     ` <hhn0gy39il.fsf@blah.pl>
  2 siblings, 0 replies; 25+ messages in thread
From: Steinar Bang @ 2003-06-01 21:51 UTC (permalink / raw)


>>>>> Steinar Bang <sb@dod.no>:

> As far as I can tell this means that the collapsing will work as
> desired for summary buffers (ie. remove them all).

Yes it did.  Excellent.

> For messages being composed, this will remove them all, while I would
> like a single Re: to be left there.  Or perhaps this is inserted
> elswhere into the Subject of the message being composed?

I ended up with a single "Re: ".  So obviously the latter.

> But this regular expression isn't used by any article washing
> function, so I would have to write something there.

That's still on, I guess.

But two out of three ain't bad. :-)

Thanx!


- Steinar



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-01 21:34   ` Steinar Bang
  2003-06-01 21:51     ` Steinar Bang
@ 2003-06-02  9:37     ` Niklas Morberg
       [not found]     ` <hhn0gy39il.fsf@blah.pl>
  2 siblings, 0 replies; 25+ messages in thread
From: Niklas Morberg @ 2003-06-02  9:37 UTC (permalink / raw)


Steinar Bang <sb@dod.no> writes:

>> i'm all for expanding it with localized prefixes (polish 'odp', swedish 'sv',
>> and so on). for the beginning:
>
>> (setq message-subject-re-regexp
>>  "^[ \t]*\\(\\(\\([Aa][Ww]\\)\\|\\([Oo][Dd][Pp]\\)\\|\\([Rr][Ee]\\)\\|\\([Ss][Vv]\\)\\|\\)\\(\\[[0-9]*\\]\\)*:[ \t]*\\)*[ \t]*")
>
>> (i don't know any more translated re's).
>
> One I've seen is "Ad", by a Norwegian version of Lotus Notes.

I've also seen "Réf". You might want to consider forwarded
articles as well. I'm using:

"^\\(\\(\\([Rr][Ee]\\|[Ss][Vv]\\|[Aa][Ww]\\|[Ff][Ww]d?\\|Réf\\. ?\\):\\)+ *\\)"

(maybe I should pay more attention to those \t's, but so
far I haven't had any problems).

Niklas




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

* Re: A RE: SV: AW: "collapser", anyone...?
       [not found] ` <hhhe7ak6ph.fsf@blah.pl>
  2003-06-01 21:34   ` Steinar Bang
@ 2003-06-02 16:10   ` Randal L. Schwartz
  2003-06-02 17:00     ` Lloyd Zusman
  2003-06-03  6:16     ` Kai Großjohann
  2003-06-03 11:49   ` Colin Marquardt
  2 siblings, 2 replies; 25+ messages in thread
From: Randal L. Schwartz @ 2003-06-02 16:10 UTC (permalink / raw)


>>>>> "Maciej" == Maciej Matysiak <phoner.ding@blah.pl> writes:

Maciej> i'm all for expanding it with localized prefixes (polish 'odp', swedish 'sv',
Maciej> and so on).

There are no such things as "localized prefixes".  Any software that
puts anything other than "Re:" is broken.  "Re" is latin... it's not
English.  There's no need to change it when going to a different
language.

And may the implementers in Redmond who thought otherwise burn in hell.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-02 16:10   ` Randal L. Schwartz
@ 2003-06-02 17:00     ` Lloyd Zusman
  2003-06-02 17:05       ` Lloyd Zusman
  2003-06-03  6:12       ` Kai Großjohann
  2003-06-03  6:16     ` Kai Großjohann
  1 sibling, 2 replies; 25+ messages in thread
From: Lloyd Zusman @ 2003-06-02 17:00 UTC (permalink / raw)


merlyn@stonehenge.com (Randal L. Schwartz) writes:

>>>>>> "Maciej" == Maciej Matysiak <phoner.ding@blah.pl> writes:
>
> Maciej> i'm all for expanding it with localized prefixes (polish 'odp', swedish 'sv',
> Maciej> and so on).
>
> There are no such things as "localized prefixes".  Any software that
> puts anything other than "Re:" is broken.  "Re" is latin... it's not
> English.  There's no need to change it when going to a different
> language.
>
> And may the implementers in Redmond who thought otherwise burn in hell.

One small point: "re" indeed is latin, but it's use in email stems from
a custom that existed long before the days of email, in written
correspondence and reports, where the letters "re" abbreviated the
English word "regarding".  The correspondence of this abbreviation with
the latin word "re" is coincidental.

Besides that small point, I am in 100 percent agreement with everything
else you have expressed here.

-- 
 Lloyd Zusman
 ljz@asfast.com



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-02 17:00     ` Lloyd Zusman
@ 2003-06-02 17:05       ` Lloyd Zusman
  2003-06-02 17:50         ` Harry Putnam
  2003-06-03  6:12       ` Kai Großjohann
  1 sibling, 1 reply; 25+ messages in thread
From: Lloyd Zusman @ 2003-06-02 17:05 UTC (permalink / raw)


Lloyd Zusman <ljz@asfast.com> writes:

> merlyn@stonehenge.com (Randal L. Schwartz) writes:
>
>>>>>>> "Maciej" == Maciej Matysiak <phoner.ding@blah.pl> writes:
>>
>> Maciej> i'm all for expanding it with localized prefixes (polish 'odp', swedish 'sv',
>> Maciej> and so on).
>>
>> There are no such things as "localized prefixes".  Any software that
>> puts anything other than "Re:" is broken.  "Re" is latin... it's not
>> English.  There's no need to change it when going to a different
>> language.
>>
>> And may the implementers in Redmond who thought otherwise burn in hell.
>
> One small point: "re" indeed is latin, but it's use in email stems from
> a custom that existed long before the days of email, in written
> correspondence and reports, where the letters "re" abbreviated the
> English word "regarding".  The correspondence of this abbreviation with
> the latin word "re" is coincidental.
>
> Besides that small point, I am in 100 percent agreement with everything
> else you have expressed here.

... and it has just occurred to me that some M$ weenies might think that
"Re" stands for "Redmond".  :)

-- 
 Lloyd Zusman
 ljz@asfast.com



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-02 17:05       ` Lloyd Zusman
@ 2003-06-02 17:50         ` Harry Putnam
  0 siblings, 0 replies; 25+ messages in thread
From: Harry Putnam @ 2003-06-02 17:50 UTC (permalink / raw)


Lloyd Zusman <ljz@asfast.com> writes:

> ... and it has just occurred to me that some M$ weenies might think that
> "Re" stands for "Redmond".  :)

 or ... reboot




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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-02 17:00     ` Lloyd Zusman
  2003-06-02 17:05       ` Lloyd Zusman
@ 2003-06-03  6:12       ` Kai Großjohann
  1 sibling, 0 replies; 25+ messages in thread
From: Kai Großjohann @ 2003-06-03  6:12 UTC (permalink / raw)


Lloyd Zusman <ljz@asfast.com> writes:

> One small point: "re" indeed is latin, but it's use in email stems from
> a custom that existed long before the days of email, in written
> correspondence and reports, where the letters "re" abbreviated the
> English word "regarding".  The correspondence of this abbreviation with
> the latin word "re" is coincidental.

The German AW appears to stand for Antwort, which means reply.  It
seems the translators are confused ;-)
-- 
This line is not blank.



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-02 16:10   ` Randal L. Schwartz
  2003-06-02 17:00     ` Lloyd Zusman
@ 2003-06-03  6:16     ` Kai Großjohann
  2003-06-04 15:56       ` Martin Thornquist
  1 sibling, 1 reply; 25+ messages in thread
From: Kai Großjohann @ 2003-06-03  6:16 UTC (permalink / raw)


merlyn@stonehenge.com (Randal L. Schwartz) writes:

> There are no such things as "localized prefixes".  Any software that
> puts anything other than "Re:" is broken.  "Re" is latin... it's not
> English.  There's no need to change it when going to a different
> language.

However, whereas English letters and memos use `re', letters and
memos in other languages don't.  So I somehow see the point of the
people who want to translate things.

Of course, the right thing to do is to consider that the Subject
header's value has a syntax, too, and is not just free-form text.
Thus, the string `Re:' should be *displayed* in the local language,
but when sending a message, the Subject header should contain the
literal `Re:' string.
-- 
This line is not blank.



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

* Re: A RE: SV: AW: "collapser", anyone...?
       [not found] ` <hhhe7ak6ph.fsf@blah.pl>
  2003-06-01 21:34   ` Steinar Bang
  2003-06-02 16:10   ` Randal L. Schwartz
@ 2003-06-03 11:49   ` Colin Marquardt
  2003-06-03 12:13     ` Norbert Koch
  2003-06-04  5:34     ` Oystein Viggen
  2 siblings, 2 replies; 25+ messages in thread
From: Colin Marquardt @ 2003-06-03 11:49 UTC (permalink / raw)


Maciej Matysiak <phoner.ding@blah.pl> writes:

> (setq message-subject-re-regexp
>  "^[ \t]*\\(\\(\\([Aa][Ww]\\)\\|\\([Oo][Dd][Pp]\\)\\|\\([Rr][Ee]\\)\\|\\([Ss][Vv]\\)\\|\\)\\(\\[[0-9]*\\]\\)*:[ \t]*\\)*[ \t]*")
>
> (i don't know any more translated re's).

I have just seen "Antw:" (Novel Groupwise I think). 
Also, using regexp-opt might be nice here to keep the regexp readable.

Cheers,
  Colin



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-03 11:49   ` Colin Marquardt
@ 2003-06-03 12:13     ` Norbert Koch
  2003-06-04  5:34     ` Oystein Viggen
  1 sibling, 0 replies; 25+ messages in thread
From: Norbert Koch @ 2003-06-03 12:13 UTC (permalink / raw)


Colin Marquardt <c.marquardt@alcatel.de> writes:

> I have just seen "Antw:" (Novel Groupwise I think). 
> Also, using regexp-opt might be nice here to keep the regexp readable.

Notes, which I have to cope with here at my ork-place, uses the
complete 'Antwort:' [a], but AFAIK that's up to the admin folk's whims.

norbert.


Footnotes: 
[a] even worse, it looks like Notes uses exactly this string to
    recognise threads.  Dunno why they have a database underneath it.




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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-03 11:49   ` Colin Marquardt
  2003-06-03 12:13     ` Norbert Koch
@ 2003-06-04  5:34     ` Oystein Viggen
  1 sibling, 0 replies; 25+ messages in thread
From: Oystein Viggen @ 2003-06-04  5:34 UTC (permalink / raw)


* [Colin Marquardt] 

> I have just seen "Antw:" (Novel Groupwise I think). 
> Also, using regexp-opt might be nice here to keep the regexp readable.

To add to the collection, the Norwegian version of Novell GroupWise
seems to use "Ang:".

I guess this is short for "angående", a translation of "regarding".

Øystein
-- 
This message was brought to you by the letter ß and the number e.



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

* Re: A RE: SV: AW: "collapser", anyone...?
       [not found]     ` <hhn0gy39il.fsf@blah.pl>
@ 2003-06-04  7:33       ` Niklas Morberg
       [not found]         ` <hh8yshzuup.fsf@blah.pl>
  2003-06-04 13:56       ` A RE: SV: " Johan Bockgård
  1 sibling, 1 reply; 25+ messages in thread
From: Niklas Morberg @ 2003-06-04  7:33 UTC (permalink / raw)


Maciej Matysiak <phoner.ding@blah.pl> writes:

> the following regexp succeeded removing all the "re" variations from
> subject "Re[3]: Réf: Odp: SV[6]: Antw: blah", so i assume it works :)
>
> (setq message-subject-re-regexp
>       (concat
>        "^[ \t]*"
>          "\\("
>            "\\("
>              "\\([Aa][Nn][Tt][Ww]\\)\\|"              ; antw

Question: Are the parentheses really necessary? Isn't it
enough to say:

              "[Aa][Nn][Tt][Ww]\\|"              ; antw

I don't know.

>              "\\([Aa][Ww]\\)\\|"                      ; aw
>              "\\([Ff][Ww]d\\)\\|"                     ; fwd

The `d' is not always used. If it is, it is always (?) lower
case. Given that the `\\(' can be discarded this would be:

              "[Ff][Ww]d?\\|"                     ; fwd

>              "\\([Oo][Dd][Pp]\\)\\|"                  ; odp
>              "\\([Rr][Ee]\\)\\|"                      ; re
>              "\\([Rr]"                                ; réf
>                 (char-to-string (int-to-char '233))

Will this handle both upper and lower case (é and É)? I'm
not sure it's necessary, but since both `f' and `F' is
allowed maybe it should be there.

>              "[Ff]\\)\\|"
>              "\\([Ss][Vv]\\)"                         ; sv
>            "\\)"
>            "\\(\\[[0-9]*\\]\\)"
>            "*:[ \t]*"
>          "\\)"
>        "*[ \t]*"
>        ))

Breaking the regexp up made it much more readable, nice work.

Niklas




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

* Re: A RE: SV: AW: "collapser", anyone...?
       [not found]     ` <hhn0gy39il.fsf@blah.pl>
  2003-06-04  7:33       ` Niklas Morberg
@ 2003-06-04 13:56       ` Johan Bockgård
  1 sibling, 0 replies; 25+ messages in thread
From: Johan Bockgård @ 2003-06-04 13:56 UTC (permalink / raw)


Maciej Matysiak <phoner.ding@blah.pl> writes:

> note to self: i had to use (char-to-string (int-to-char '233)) to
> get the "é", because leaving it as a letter in my .gnus with
> iso-8859-2 characters caused strange things happen :/ (some kind
> escape codes here and there, i'm not sure what it was).

Doesn't work here (Emacs 21.2): "Debugger entered--Lisp error:
(void-function int-to-char)".

But you could use the character code in the string, e.g.
"[\311\351]" == "[Éé]".

-- 
The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners. -- Ernst Jan Plugge



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-03  6:16     ` Kai Großjohann
@ 2003-06-04 15:56       ` Martin Thornquist
  0 siblings, 0 replies; 25+ messages in thread
From: Martin Thornquist @ 2003-06-04 15:56 UTC (permalink / raw)


[ Kai Großjohann ]

> However, whereas English letters and memos use `re', letters and
> memos in other languages don't.  So I somehow see the point of the
> people who want to translate things.

I actually think `re' has been used in Norwegian letters etc. `SV'
most certainly hasn't. (SV, on the other hand, is a Norwegian
political party, which means subject simplification actually needs AI
to decide if a `SV' should be removed or not.)


Martin
-- 
"An ideal world is left as an exercise to the reader."
                                                 -Paul Graham, On Lisp




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

* Re: A RE: SV: AW: "collapser", anyone...?
       [not found]         ` <hh8yshzuup.fsf@blah.pl>
@ 2003-06-05  5:53           ` Steinar Bang
  2003-06-05  6:48             ` Niklas Morberg
  2003-06-05 17:25             ` A " Ted Stern
  0 siblings, 2 replies; 25+ messages in thread
From: Steinar Bang @ 2003-06-05  5:53 UTC (permalink / raw)


>>>>> Maciej Matysiak <phoner.ding@blah.pl>:


>> But you could use the character code in the string, e.g.
>> "[\311\351]" == "[Éé]".

> that's much nicer solution. is there a function in lisp which changes the
> characters into \xyz strings?

I don't know, but perhaps something can be picked from the
what-cursor-position function? 

BTW good work on the improved concat'ed regexp!  Might be a good idea
to add it as an example to the manual entry for message-subject-re-regexp? 



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-05  5:53           ` Steinar Bang
@ 2003-06-05  6:48             ` Niklas Morberg
  2003-06-09 20:26               ` Steinar Bang
  2003-06-15 12:06               ` Kai Großjohann
  2003-06-05 17:25             ` A " Ted Stern
  1 sibling, 2 replies; 25+ messages in thread
From: Niklas Morberg @ 2003-06-05  6:48 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

Steinar Bang <sb@dod.no> writes:

> Might be a good idea to add it as an example to the manual
> entry for message-subject-re-regexp?

It certainly would. Here's a patch to message.texi.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: More read- and useable example for message-subject-re-regexp --]
[-- Type: text/x-patch, Size: 978 bytes --]

cd h:/pgnus/texi/
diff -u -b "h:/pgnus/texi/message.texi~" "h:/pgnus/texi/message.texi"
--- h:/pgnus/texi/message.texi~	2003-05-20 14:58:45.000000000 +0200
+++ h:/pgnus/texi/message.texi	2003-06-05 08:45:03.000000000 +0200
@@ -1340,7 +1340,23 @@
 
 @lisp
 (setq message-subject-re-regexp
-     "^\\(\\(\\([Rr][Ee]\\|[Ss][Vv]\\|[Aa][Ww]\\): *\\)+\\)")
+      (concat
+       "^[ \t]*"
+         "\\("
+           "\\("
+             "[Aa][Nn][Tt][Ww]\\.?\\|"     ; antw
+             "[Aa][Ww]\\|"                 ; aw
+             "[Ff][Ww][Dd]?\\|"            ; fwd
+             "[Oo][Dd][Pp]\\|"             ; odp
+             "[Rr][Ee]\\|"                 ; re
+             "[Rr][\311\351][Ff]\\.?\\|"   ; ref
+             "[Ss][Vv]"                    ; sv
+           "\\)"
+           "\\(\\[[0-9]*\\]\\)"
+           "*:[ \t]*"
+         "\\)"
+       "*[ \t]*"
+       ))
 @end lisp
 
 @item message-subject-trailing-was-query

Diff finished at Thu Jun 05 08:45:09

[-- Attachment #3: Type: text/plain, Size: 8 bytes --]


Niklas

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

* Re: A RE: AW: "collapser", anyone...?
  2003-06-05  5:53           ` Steinar Bang
  2003-06-05  6:48             ` Niklas Morberg
@ 2003-06-05 17:25             ` Ted Stern
       [not found]               ` <hh7k7z4yeq.fsf@blah.pl>
  1 sibling, 1 reply; 25+ messages in thread
From: Ted Stern @ 2003-06-05 17:25 UTC (permalink / raw)


On 4 Jun 2003, Steinar Bang wrote:
> BTW good work on the improved concat'ed regexp!  Might be a good idea
> to add it as an example to the manual entry for message-subject-re-regexp?

Why not use either regexp-opt or make-regexp?  The former is included with
Emacs, the latter can be found at
http://wuarchive.wustl.edu/languages/elisp/functions/make-regexp.el.gz 

In other words, write the expressions you want readably, then process using
regexp-opt for actual use.

Ted
-- 
 Ted Stern                                 Applications Group
 Cray Inc.                               office: 206-701-2182
 411 First Avenue South, Suite 600         cell: 206-383-1049
 Seattle, WA 98104-2860                     FAX: 206-701-2500

 Frango ut patefaciam -- I break that I may reveal
 (The Paleontological Society motto, equally apropos for debugging)




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

* Re: A RE: AW: "collapser", anyone...?
       [not found]               ` <hh7k7z4yeq.fsf@blah.pl>
@ 2003-06-06 10:11                 ` lawrence mitchell
       [not found]                   ` <hhd6hpxel9.fsf@blah.pl>
  0 siblings, 1 reply; 25+ messages in thread
From: lawrence mitchell @ 2003-06-06 10:11 UTC (permalink / raw)


Maciej Matysiak wrote:

[...]

> could you please provide an example: how do i get with regexp-opt
> the equivalent of "[Aa][Nn][Tt][Ww]\\.?"? maybe it's simpler to use
> that function, but one needs to type a lot and think of at least few
> possible variations (in this particular case). the above regexp takes
> care of everything and doesn't look scary (imho).

You don't :).  You (let ((case-fold-search t)) ...) in
`message-strip-subject-re'.

Then you can do things like:
(regexp-opt
 '("antw." "aw" "sv" "re"))
    => "a\\(?:ntw\\.\\|w\\)\\|re\\|sv"

Which I think is certainly easier to read than all the grouping
constructs, and, as an extra bonus, it's more efficient at
matching.

Additionally, this makes it easier to customize
`message-subject-re-regexp', since one can just ask for a list
of strings, and then do some magic behind the scenes.  The user
need not know the ins and outs of Emacs' regexps.

> i think that the message-subject-re-regexp i've made up with
> concatenated regexp is quite readable. but ymmv :)

perlist ;).

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



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-05  6:48             ` Niklas Morberg
@ 2003-06-09 20:26               ` Steinar Bang
  2003-06-15 12:07                 ` Kai Großjohann
  2003-06-15 12:06               ` Kai Großjohann
  1 sibling, 1 reply; 25+ messages in thread
From: Steinar Bang @ 2003-06-09 20:26 UTC (permalink / raw)


>>>>> Niklas Morberg <niklas.morberg@axis.com>:

> Steinar Bang <sb@dod.no> writes:

>> Might be a good idea to add it as an example to the manual entry
>> for message-subject-re-regexp?

> It certainly would. Here's a patch to message.texi.

Let's hope someone with CVS write priviledges will apply it to CVS.



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

* Re: A RE: AW: "collapser", anyone...?
       [not found]                   ` <hhd6hpxel9.fsf@blah.pl>
@ 2003-06-09 20:47                     ` Steinar Bang
  0 siblings, 0 replies; 25+ messages in thread
From: Steinar Bang @ 2003-06-09 20:47 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

>>>>> Maciej Matysiak <phoner.ding@blah.pl>:

> On the 6th of June 2003 at 12:11, lawrence mitchell <s0198183+ding#sms.ed.ac.uk> wrote:
>> You (let ((case-fold-search t)) ...) in `message-strip-subject-re'.

Will this affect the global setting of case-fold-search?

> oh, nice :) just i need to know how to do that. is that what 'lambda' is for?

It requires a Gnus patch, I think.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Do case insensitive regexp matching in message-strip-subject-re. --]
[-- Type: text/x-patch, Size: 744 bytes --]

*** message.el	7 May 2003 19:29:01 -0000	6.339
--- message.el	9 Jun 2003 20:55:50 -0000
***************
*** 1612,1620 ****
  
  (defun message-strip-subject-re (subject)
    "Remove \"Re:\" from subject lines in string SUBJECT."
!   (if (string-match message-subject-re-regexp subject)
!       (substring subject (match-end 0))
!     subject))
  
  ;;; Start of functions adopted from `message-utils.el'.
  
--- 1612,1621 ----
  
  (defun message-strip-subject-re (subject)
    "Remove \"Re:\" from subject lines in string SUBJECT."
!   (let ((case-fold-search t))
!     (if (string-match message-subject-re-regexp subject)
! 	(substring subject (match-end 0))
!       subject)))
  
  ;;; Start of functions adopted from `message-utils.el'.
  

[-- Attachment #3: Type: text/plain, Size: 60 bytes --]


Should change the summary use of the regexp as well then.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: Do case insensitive regexp matching in gnus-simplify-subject-re --]
[-- Type: text/x-patch, Size: 800 bytes --]

*** gnus-sum.el	6 May 2003 00:43:56 -0000	6.343
--- gnus-sum.el	9 Jun 2003 21:01:08 -0000
***************
*** 1463,1471 ****
  
  (defsubst gnus-simplify-subject-re (subject)
    "Remove \"Re:\" from subject lines."
!   (if (string-match message-subject-re-regexp subject)
!       (substring subject (match-end 0))
!     subject))
  
  (defun gnus-simplify-subject (subject &optional re-only)
    "Remove `Re:' and words in parentheses.
--- 1463,1472 ----
  
  (defsubst gnus-simplify-subject-re (subject)
    "Remove \"Re:\" from subject lines."
!   (let ((case-fold-search t))
!     (if (string-match message-subject-re-regexp subject)
! 	(substring subject (match-end 0))
!       subject)))
  
  (defun gnus-simplify-subject (subject &optional re-only)
    "Remove `Re:' and words in parentheses.

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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-05  6:48             ` Niklas Morberg
  2003-06-09 20:26               ` Steinar Bang
@ 2003-06-15 12:06               ` Kai Großjohann
  1 sibling, 0 replies; 25+ messages in thread
From: Kai Großjohann @ 2003-06-15 12:06 UTC (permalink / raw)


Niklas Morberg <niklas.morberg@axis.com> writes:

> It certainly would. Here's a patch to message.texi.

Committed.
-- 
This line is not blank.



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-09 20:26               ` Steinar Bang
@ 2003-06-15 12:07                 ` Kai Großjohann
  2003-06-20  5:17                   ` Steinar Bang
  0 siblings, 1 reply; 25+ messages in thread
From: Kai Großjohann @ 2003-06-15 12:07 UTC (permalink / raw)


Steinar Bang <sb@dod.no> writes:

> Let's hope someone with CVS write priviledges will apply it to CVS.

It took quite long, but now it's done.

I'm getting the feeling that a todo list for Gnus is becoming
necessary.  Otherwise, useful patches might easily be dropped on the
floor.
-- 
This line is not blank.



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

* Re: A RE: SV: AW: "collapser", anyone...?
  2003-06-15 12:07                 ` Kai Großjohann
@ 2003-06-20  5:17                   ` Steinar Bang
  0 siblings, 0 replies; 25+ messages in thread
From: Steinar Bang @ 2003-06-20  5:17 UTC (permalink / raw)


>>>>> kai.grossjohann@gmx.net (Kai Großjohann):

> Steinar Bang <sb@dod.no> writes:
>> Let's hope someone with CVS write priviledges will apply it to CVS.

> It took quite long, but now it's done.

> I'm getting the feeling that a todo list for Gnus is becoming
> necessary.  Otherwise, useful patches might easily be dropped on the
> floor.

In this same thread are some patches for me that attempts to ensure
that uses of this regexp are made case insensitive, in which case this
regexp can be seriously simplified.

The problem with these patches is that I don't know if they work, or
have any side effects...;-)



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

end of thread, other threads:[~2003-06-20  5:17 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-31 23:23 A RE: SV: AW: "collapser", anyone...? Steinar Bang
     [not found] ` <hhhe7ak6ph.fsf@blah.pl>
2003-06-01 21:34   ` Steinar Bang
2003-06-01 21:51     ` Steinar Bang
2003-06-02  9:37     ` Niklas Morberg
     [not found]     ` <hhn0gy39il.fsf@blah.pl>
2003-06-04  7:33       ` Niklas Morberg
     [not found]         ` <hh8yshzuup.fsf@blah.pl>
2003-06-05  5:53           ` Steinar Bang
2003-06-05  6:48             ` Niklas Morberg
2003-06-09 20:26               ` Steinar Bang
2003-06-15 12:07                 ` Kai Großjohann
2003-06-20  5:17                   ` Steinar Bang
2003-06-15 12:06               ` Kai Großjohann
2003-06-05 17:25             ` A " Ted Stern
     [not found]               ` <hh7k7z4yeq.fsf@blah.pl>
2003-06-06 10:11                 ` lawrence mitchell
     [not found]                   ` <hhd6hpxel9.fsf@blah.pl>
2003-06-09 20:47                     ` Steinar Bang
2003-06-04 13:56       ` A RE: SV: " Johan Bockgård
2003-06-02 16:10   ` Randal L. Schwartz
2003-06-02 17:00     ` Lloyd Zusman
2003-06-02 17:05       ` Lloyd Zusman
2003-06-02 17:50         ` Harry Putnam
2003-06-03  6:12       ` Kai Großjohann
2003-06-03  6:16     ` Kai Großjohann
2003-06-04 15:56       ` Martin Thornquist
2003-06-03 11:49   ` Colin Marquardt
2003-06-03 12:13     ` Norbert Koch
2003-06-04  5:34     ` Oystein Viggen

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