Subject: muttprint: prints no headers if '}' in some of them

From: Gregor Zattler <[email-masked]>
Date: Mon, 11 Feb 2019 14:50:36 +0100

Package: muttprint
Version: 0.73-7
Severity: normal

Dear Maintainer,

muttprint does not print headers if '}' appears in one of the
hedaers which are to be printed.  I tested this with an email
with a Subject: -Line which contains a '}'. You might use just this
email for testing purposes.

Since something like '~b' is printed with '~' at superscript
position, I assume muttprint somehow evaluates TeX Commands in
header lines.

Actually I wanted to print via muttprint from emacs-notmuch.
This configures muttprint to print a 'Tags:' line along the email
headers.  I use '~' and '}=' as prefixes to some tags since
notmuch sorts tags alphabetically.  Headers from emails with this
tags are not printed.

Attached you find such an email.  Test it with command line:

muttprint -f eml  --printed-headers "Date_To_From_CC_Newsgroups_*Subject*_/Tags" --printer TO_FILE:eml.ps ; see eml.ps

Thanks for muttprint, which I use for years.

-- System Information:
Debian Release: 9.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages muttprint depends on:
ii  libtext-iconv-perl         1.7-5+b4
ii  perl                       5.24.1-3+deb9u5
ii  texlive-fonts-recommended  2016.20170123-5
ii  texlive-latex-extra        2016.20170123-5
ii  texlive-latex-recommended  2016.20170123-5

Versions of packages muttprint recommends:
ii  bsd-mailx [mail-reader]  8.1.2-0.20160123cvs-4
ii  emacs24 [mail-reader]    24.5+1-11+deb9u1
ii  emacs25 [mail-reader]    25.1+1-4+deb9u1
ii  jed [mail-reader]        1:0.99.19-7+b1
ii  libtimedate-perl         2.3000-2
ii  mailutils [mail-reader]  1:3.1.1-1
ii  mutt [mail-reader]       1.7.2-1+deb9u1

Versions of packages muttprint suggests:
pn  compface                         <none>
pn  dialog                           <none>
ii  emacs24 [news-reader]            24.5+1-11+deb9u1
ii  emacs25 [news-reader]            25.1+1-4+deb9u1
ii  imagemagick                      8:6.9.7.4+dfsg-11+deb9u6
ii  imagemagick-6.q16 [imagemagick]  8:6.9.7.4+dfsg-11+deb9u6
pn  muttprint-manual                 <none>
pn  ospics                           <none>
ii  psutils                          1.17.dfsg-4
pn  texlive-fonts-extra              <none>

-- no debconf information