Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* relax the comparison of subject lines
@ 2006-06-11 19:56 Urs Thuermann
  2006-06-11 21:33 ` Reiner Steib
  0 siblings, 1 reply; 4+ messages in thread
From: Urs Thuermann @ 2006-06-11 19:56 UTC (permalink / raw)


I'd like to modify the comparison of subject lines, which determines
if the subject line in a summary buffer is the same as the previous
one (and therefore not repeatedly printed) or not.

AFAIK, the usual comparison considers two subject lines equal, if they
are exactly identical or if they only differ in that one of them has a
"Re: " prepended.

I am on one mailing list, where the mailing list server inserts a
space after the colon of the "subject:" header of each message posted.
This causes Gnus to consider the subjects to be different, as they
appear as

  "Subject:  foo"
  "Subject:  Re: foo"   or   "Subject:  Re:  foo"

i.e. it looks like a " Re:" or a " Re: " has been prepended.  I have
written to the list and asked this to be fixed, but don't know if and
when it will be done.

Micro$hit loves to disturb many mailing list users by using "AW: " for
the german word "Antwort" which means reply, instead of the "Re: "
which is described in some RFC (forgot the number, probably 2822).
Others use "RE: " instead of "Re: ".

I have seen some MUAs append a space to the subject line when replying
to a mail.

All these bugs should of course better be fixed in the broken MUAs and
mailing list servers, but since they mostly will not, it would be nice
if I could configure Gnus to consider all these subjects equal, i.e.
two subjects should be equal, if one of them has " *([Rr][Ee]|AW): *"
prepended and/or if it has " *" appended.

It would further be nice, if replying to a subject "AW: foo" would
cause Gnus to generate a subject "Re: foo" in the reply instead of
"Re: AW: foo".

Can this be done?


urs

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

* Re: relax the comparison of subject lines
  2006-06-11 19:56 relax the comparison of subject lines Urs Thuermann
@ 2006-06-11 21:33 ` Reiner Steib
  2006-06-13 11:07   ` Urs Thuermann
  0 siblings, 1 reply; 4+ messages in thread
From: Reiner Steib @ 2006-06-11 21:33 UTC (permalink / raw)


On Sun, Jun 11 2006, Urs Thuermann wrote:

> AFAIK, the usual comparison considers two subject lines equal, if they
> are exactly identical or if they only differ in that one of them has a
> "Re: " prepended.
[...]
>   "Subject:  foo"
>   "Subject:  Re: foo"   or   "Subject:  Re:  foo"

,----[ (info "(gnus)Loose Threads") ]
| `gnus-simplify-subject-functions'
|      If non-`nil', this variable overrides
|      `gnus-summary-gather-subject-limit'.  This variable should be a
|      list of functions to apply to the `Subject' string iteratively to
|      arrive at the simplified version of the string.
| 
|      Useful functions to put in this list include:
| 
|     `gnus-simplify-subject-re'
|           Strip the leading `Re:'.
| 
|     `gnus-simplify-subject-fuzzy'
|           Simplify fuzzily.
| 
|     `gnus-simplify-whitespace'
|           Remove excessive whitespace.
| 
|     `gnus-simplify-all-whitespace'
|           Remove all whitespace.
| 
|      You may also write your own functions, of course.
`----

> It would further be nice, if replying to a subject "AW: foo" would
> cause Gnus to generate a subject "Re: foo" in the reply instead of
> "Re: AW: foo".

See `gnus-simplify-subject-re' above which uses
`message-subject-re-regexp':

,----[ (info "(message)Message Headers") ]
| `message-subject-re-regexp'
|      Responses to messages have subjects that start with `Re: '.  This
|      is _not_ an abbreviation of the English word "response", but is
|      Latin, and means "in response to".  [...]
| 
|      Here's an example of a value to deal with these headers when
|      responding to a message:
| 
|           (setq message-subject-re-regexp
|                 (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]*"
|                  ))
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: relax the comparison of subject lines
  2006-06-11 21:33 ` Reiner Steib
@ 2006-06-13 11:07   ` Urs Thuermann
  2006-06-13 14:13     ` Reiner Steib
  0 siblings, 1 reply; 4+ messages in thread
From: Urs Thuermann @ 2006-06-13 11:07 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:

> ,----[ (info "(gnus)Loose Threads") ]
> | `gnus-simplify-subject-functions'


> See `gnus-simplify-subject-re' above which uses
> `message-subject-re-regexp':

Thanks, I will look into it.  Is it possible to set these and other
variables per-group?


urs

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

* Re: relax the comparison of subject lines
  2006-06-13 11:07   ` Urs Thuermann
@ 2006-06-13 14:13     ` Reiner Steib
  0 siblings, 0 replies; 4+ messages in thread
From: Reiner Steib @ 2006-06-13 14:13 UTC (permalink / raw)


On Tue, Jun 13 2006, Urs Thuermann wrote:

> Reiner Steib <reinersteib+gmane@imap.cc> writes:
>
>> ,----[ (info "(gnus)Loose Threads") ]
>> | `gnus-simplify-subject-functions'
>
>> See `gnus-simplify-subject-re' above which uses
>> `message-subject-re-regexp':
>
> Thanks, I will look into it.  Is it possible to set these and other
> variables per-group?

Sure...

,----[ (info "(gnus)Group Parameters") ]
|    Use the `G p' or the `G c' command to edit group parameters of a
| group.  (`G p' presents you with a Lisp-based interface, `G c' presents
| you with a Customize-like interface.  The latter helps avoid silly Lisp
| errors.)  You might also be interested in reading about topic
| parameters (*note Topic Parameters::).
| 
|    Group parameters can be set via the `gnus-parameters' variable too.
| But some variables, such as `visible', have no effect (For this case
| see `gnus-permanently-visible-groups' as an alternative.).  For example:
| 
|      (setq gnus-parameters
|            '(("mail\\..*"
|               (gnus-show-threads nil)
|               (gnus-use-scoring nil)
|               (gnus-summary-line-format
|                "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
|               (gcc-self . t)
|               (display . all))
| 
|              ("^nnimap:\\(foo.bar\\)$"
|               (to-group . "\\1"))
| 
|              ("mail\\.me"
|               (gnus-use-scoring  t))
| 
|              ("list\\..*"
|               (total-expire . t)
|               (broken-reply-to . t))))
| 
|    String value of parameters will be subjected to regexp substitution,
| as the `to-group' example shows.
`----

When using `G c', scroll down to the bottom:

,----[ `G c' | `gnus-group-customize' ]
| [...]
|
| Variables:
| Set variables local to the group you are entering. [More]
| [INS]
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

end of thread, other threads:[~2006-06-13 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-11 19:56 relax the comparison of subject lines Urs Thuermann
2006-06-11 21:33 ` Reiner Steib
2006-06-13 11:07   ` Urs Thuermann
2006-06-13 14:13     ` Reiner Steib

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