Subject: bug#49115: closed (Re: Mumi inserts spurious underscore in bug title)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 01 Jan 2023 15:12:04 +0000

Your bug report

#49115: Mumi inserts spurious underscore in bug title

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
49115: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49115
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: Mumi inserts spurious underscore in bug title
From: Ricardo Wurmus <[email-masked]>
To: Arun Isaac <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sun, 01 Jan 2023 13:15:02 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Arun,

> Thanks for the bug report!
>
> It's very strange, but I'm not able to reproduce this.

Thank you for your analysis!

> Even at https://issues.guix.gnu.org/49114 , only the "bug title" has the
> spurious underscore. The subject of the first message does not. Is the
> bug title something stored in the xapian index? Could it be that this
> was an older bug that has corrupted the xapian index?

As part of #60410 I rebuilt the xapian database (deleted it and then ran
“mumi fetch”), so it’s not that.

[… time passes …]

I think I found the culprit in mumi/debbugs.scm:

    (define qp-pattern "=\\?UTF-8\\?Q\\?([^?]+)\\?=")
    …
    (let ((subject (or (assoc-ref properties "Subject") "")))
      (if (string-contains subject "=?UTF-8?Q?")
          (or (false-if-exception
               (utf8->string
                (quoted-printable-decode
                 (regexp-substitute/global #f qp-pattern
                                           subject 'pre 1 'post))))
              subject)
          subject))

I’m probably not using quoted-printable-decode correctly.  My apologies
for assuming a bug in Guile Email.  I changed this with commit
9d7eb3c5efe6427a1a89fb3e4c7165259edff4dd, using parse-email-headers.

> If I understand correctly, mumi does not rebuild its xapian index. I
> think it should do so from time to time. It would help prevent old bugs
> from getting persisted in storage.

True.  I’ll be sure to rebuild the index on the next upgrade.

> Cheers, and wish you a Happy New Year! :-)

Thank you, and a Happy New Year to you too!

-- 
Ricardo

Subject: Mumi inserts spurious underscore in bug title
From: Tobias Geerinckx-Rice <[email-masked]>
To: Bug Guix <[email-masked]>
Date: Sat, 19 Jun 2021 13:37:50 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Guix,

See <http://issues.guix.gnu.org/49114>, which Mumi currently 
titles

  ‘guix_ lint’ should catch certificate validation exceptions

There's no underscore in the original subject.  It's also rendered 
correctly in the grey ‘mail view’ div:

  Tobias Geerinckx-Rice wrote seconds ago
  ‘guix lint’ should catch certificate validation exceptions

Perhaps due to my use of Unicode quotes.  There's nothing 
suspicious in the HTML.

Kind regards,

T G-R