From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88194 Path: news.gmane.org!.POSTED!not-for-mail From: "Garreau\, Alexandre" Newsgroups: gmane.emacs.gnus.general Subject: Re: =?utf-8?Q?Where=E2=80=99s?= Gnus function cutting too-long subject lines Date: Sun, 28 Oct 2018 19:58:30 +0100 Message-ID: <874ld599ux.fsf@portable.galex-713.eu> References: <87d0ru9f3s.fsf@portable.galex-713.eu> <87r2gac68q.fsf@tullinup.koldfront.dk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1540753037 28434 195.159.176.226 (28 Oct 2018 18:57:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2018 18:57:17 +0000 (UTC) User-Agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian Cc: ding@gnus.org To: Adam =?utf-8?Q?Sj=C3=B8gren?= Original-X-From: ding-owner+M36408@lists.math.uh.edu Sun Oct 28 19:57:13 2018 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGqFN-0007C7-6S for ding-account@gmane.org; Sun, 28 Oct 2018 19:57:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.90_1) (envelope-from ) id 1gGqGr-00034k-Fs; Sun, 28 Oct 2018 13:58:45 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gGqGi-00031v-CW for ding@lists.math.uh.edu; Sun, 28 Oct 2018 13:58:36 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1gGqGg-0006Zu-Gp for ding@lists.math.uh.edu; Sun, 28 Oct 2018 13:58:36 -0500 Original-Received: from portable.galex-713.eu ([89.234.186.82]) by quimby.gnus.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGqGd-0005t9-PZ for ding@gnus.org; Sun, 28 Oct 2018 19:58:31 +0100 Original-Received: from localhost ([::1] helo=portable.galex-713.eu) by portable.galex-713.eu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gGqGc-0007de-Bd; Sun, 28 Oct 2018 19:58:30 +0100 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") PGP-FINGERPRINT: E109 9988 4197 D7CB B0BC 5C23 8DEB 24BA 867D 3F7F Accept-Language: fr, en, eo, it, br X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88194 Archived-At: Le 28/10/2018 =C3=A0 18h48, Adam Sj=C3=B8gren a =C3=A9crit=C2=A0: > 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=E2=80=99t find because `message-subject-trailing-was-ask-re= gexp' ("[ ]*\\((*[Ww][Aa][Ss]:[ ]*.*)\\)") looks a bit obfuscated: so why not putting a =E2=80=9Clet ((case-fold-search t))=E2=80=9D around the s= tring-match in `message-strip-subject-trailing-was'? Also, I don=E2=80=99t understand why `message-subject-trailing-was-ask-rege= xp' 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=E2=80=99m not sure). Btw I don=E2=80=99t understand very well why don=E2=80=99t they match paren= thesis and brackets (=E2=80=9Cfoo was: bar)=E2=80=9D has =E2=80=9Cwas: bar)=E2=80=9D r= emoved): wouldn=E2=80=99t it be acceptable behavior not to work correctly when the subject line is mal-formed (shouldn=E2=80=99t it be configurable to do so)? Why aren=E2=80=99t 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 =E2=80=9Cwas:=E2=80=9D, or is the true standard to use parenthesis?. It would have seem more understandable to me to have something such as=20 "[ ]*\\([([]was\\(:\\|[ ]\\)[ ]*.*[])]\\)", imho. Or better: wouldn=E2=80=99t there a non-regular extended regexp, or non-reg= exp 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=E2=80=99t, 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.