Gnus development mailing list
 help / color / mirror / Atom feed
From: "Garreau\, Alexandre" <galex-713@galex-713.eu>
To: "Adam Sjøgren" <asjo@koldfront.dk>
Cc: ding@gnus.org
Subject: Re: Where’s Gnus function cutting too-long subject lines
Date: Sun, 28 Oct 2018 19:58:30 +0100	[thread overview]
Message-ID: <874ld599ux.fsf@portable.galex-713.eu> (raw)
In-Reply-To: <87r2gac68q.fsf@tullinup.koldfront.dk> ("Adam \=\?utf-8\?Q\?Sj\?\= \=\?utf-8\?Q\?\=C3\=B8gren\=22's\?\= message of "Sun, 28 Oct 2018 18:48:21 +0100")

Le 28/10/2018 à 18h48, Adam Sjøgren a écrit :
> Alexandre writes:
>
>> do anyone know which function do that?
>
> Perhaps message.el around L309 where the variable
> message-subject-trailing-was-query is defined, and L2162 where the
> function message-strip-subject-trailing-was is defined can lead you to
> what you are looking for?

Yes! Actually this one is pretty simple.  I just had no chance to find
it by grepping for string content.

Okay: so I didn’t find because `message-subject-trailing-was-ask-regexp'
("[ 	]*\\((*[Ww][Aa][Ss]:[ 	]*.*)\\)") looks a bit obfuscated: so
why not putting a “let ((case-fold-search t))” around the string-match
in `message-strip-subject-trailing-was'?

Also, I don’t understand why `message-subject-trailing-was-ask-regexp'
and `message-subject-trailing-was-regexp' are different, while their
name reflect their usage rather than their meaning: should they better
be named lax and strict (or the other way around, I’m not sure).

Btw I don’t understand very well why don’t they match parenthesis and
brackets (“foo was: bar)” has “was: bar)” removed): wouldn’t it be
acceptable behavior not to work correctly when the subject line is
mal-formed (shouldn’t it be configurable to do so)?

Why aren’t bracket matched by default?  parenthesis can be used in
normal phrasing content, while bracket are more common in mail subjects
to indicate special metadata, so they appears more useful to use with
“was:”, or is the true standard to use parenthesis?.

It would have seem more understandable to me to have something such as 
"[ 	]*\\([([]was\\(:\\|[ 	]\\)[ 	]*.*[])]\\)", imho.

Or better: wouldn’t there a non-regular extended regexp, or non-regexp
way, of removing this while matching parenthesis and brackets?  Would a
such thing be acceptable (after all this is to be used interactively, or
while composing an answer: nothing critical)?

> This, however, just strips "(was: blablabla)" from the subject - it
> doesn't do any "intelligent" handling of words, as far as I can see.

Not yet ;) and even if it doesn’t, I find interesting to reuse
functions: that way interfaces are consistent.  If org-mode used this
function, it would be consistent with, perhaps more semantical and
special-tailored, handling of mail convention by Gnus, without being
complexified by mail-specific stuff.

So if Gnus progress here, org-mode will too, and if org-mode need
something better, it will be encouraged to improve Gnus.



      reply	other threads:[~2018-10-28 18:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-28 17:05 Garreau, Alexandre
2018-10-28 17:48 ` Adam Sjøgren
2018-10-28 18:58   ` Garreau, Alexandre [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=874ld599ux.fsf@portable.galex-713.eu \
    --to=galex-713@galex-713.eu \
    --cc=asjo@koldfront.dk \
    --cc=ding@gnus.org \
    /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).