[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in mail-extract-address-components (mail-extr.el)?

From: Simon Josefsson
Subject: Re: Bug in mail-extract-address-components (mail-extr.el)?
Date: Wed, 25 Sep 2002 00:06:57 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-debian-linux-gnu)

Reiner Steib <address@hidden> writes:

> Recently I noticed, that the function fails for the following From:
> line (which seem to be correct according to RFC-822):
> | From: "Harald H.-J. Bongartz" <address@hidden>
> Instead of "Harald H.-J. Bongartz" I get "Harald H.":

Yes, mail-extr.el does (too) many things.  The code that fails in this
example is:

         ;; Fixup initials
         ((looking-at mail-extr-initial-pattern)
          (or (eq (following-char) (upcase (following-char)))
              (setq lower-case-flag t))
          (forward-char 1)
          (if (eq ?. (following-char))
              (forward-char 1)
            (insert ?.))
          (or (eq ?\  (following-char))
              (insert ?\ ))
          (setq word-found-flag t))

> Is this a bug in `mail-extract-address-components' or should I use a
> different function to get the full name?

mail-extr is not a clean RFC 2822 parser, it is a heuristic parser.
There is no complete RFC 2822 parser in Emacs AFAIK, only several
heuristic ones.

A real RFC 2822 parser would be good to have, it would improve Gnus'
header encoding which sometimes generate bad QP that causes mail to be

reply via email to

[Prev in Thread] Current Thread [Next in Thread]