From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.help Subject: Re: Bug in mail-extract-address-components (mail-extr.el)? Date: Wed, 25 Sep 2002 00:06:57 +0200 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032906979 12135 127.0.0.1 (24 Sep 2002 22:36:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 24 Sep 2002 22:36:19 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17tyHy-00039X-00 for ; Wed, 25 Sep 2002 00:36:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17tyI1-0003Kv-00; Tue, 24 Sep 2002 18:36:21 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!small.news.tele.dk!129.240.148.23!uio.no!news.kth.se!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: tjatte.nada.kth.se User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-debian-linux-gnu) Cancel-Lock: sha1:HjivHJGMABm5k5ZiVFx++dJxm0k= Original-Xref: nntp.stanford.edu gnu.emacs.help:105269 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1823 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1823 Reiner Steib <4uce.02.r.steib@gmx.net> 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" > > 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 bounced...