From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel Subject: Re: mail-extract-address-components extract modified full name Date: Tue, 27 Jul 2004 21:39:14 +0900 Organization: Emacsen advocacy group Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <87wu0sk8aa.wl%yoichi@geiin.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1090932017 8321 80.91.224.253 (27 Jul 2004 12:40:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Jul 2004 12:40:17 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 27 14:40:07 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BpRFW-0006ZX-00 for ; Tue, 27 Jul 2004 14:40:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BpRIb-0001uG-Ca for ged-emacs-devel@m.gmane.org; Tue, 27 Jul 2004 08:43:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BpRIS-0001sx-NU for emacs-devel@gnu.org; Tue, 27 Jul 2004 08:43:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BpRIR-0001sd-05 for emacs-devel@gnu.org; Tue, 27 Jul 2004 08:43:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BpRIQ-0001sZ-TD for emacs-devel@gnu.org; Tue, 27 Jul 2004 08:43:06 -0400 Original-Received: from [137.153.0.32] (helo=ns6.sony.co.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BpREj-0006Kz-AL for emacs-devel@gnu.org; Tue, 27 Jul 2004 08:39:17 -0400 Original-Received: from mail1.sony.co.jp ([43.0.1.201]) Original-Received: from mail1.sony.co.jp (localhost [127.0.0.1]) by mail1.sony.co.jp (R8/Sony) with ESMTP id i6RCdFe23375 for ; Tue, 27 Jul 2004 21:39:15 +0900 (JST) Original-Received: from pastis.ga.sony.co.jp ([43.17.84.86]) by mail1.sony.co.jp (R8/Sony) with ESMTP id i6RCdEj23369 for ; Tue, 27 Jul 2004 21:39:14 +0900 (JST) Original-Received: from pastis.ga.sony.co.jp (localhost [127.0.0.1]) by pastis.ga.sony.co.jp (8.12.8/8.12.5) with ESMTP id i6RCdEdc024192 for ; Tue, 27 Jul 2004 21:39:14 +0900 Original-Received: (from yamaoka@localhost) by pastis.ga.sony.co.jp (8.12.8/8.12.8/Submit) id i6RCdEnx024190; Tue, 27 Jul 2004 21:39:14 +0900 Original-To: emacs-devel@gnu.org X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:U9uEGeQcc8a3BJzYlLexZtcKxAE= X-Hashcash: 0:040727:emacs-devel@gnu.org:300c06db32906dae X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26014 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26014 >>>>> In >>>>> Simon Josefsson wrote: > Katsumi Yamaoka writes: >> In my opinion, we need a much simpler function to replace the >> present mail-extract-address-components. > Good idea. I have disliked mail-extr* for a long time. It is both > complicated and not standards compliant. If we are not going for > standards compliance, it should be possible to do something simple, > like the approach you propose. I was encouraged reading your message. [...] > Quotation is what makes things complicated. Consider: > "foo \"baz bar" > "foo bar" > "foo '"'" bar" Wow! I saw myself trying them on the rfc2047 encoder. :-p > The standard permit even more weirder things, though, but we probably > don't have to support those. > Read me right, this is not critique of your idea, just something to > keep in mind. I see. In fact, I have many opportunities to encounter such things. So, we will probably be unable to ignore them, I think. > If you, or someone else, would like to implement the above idea, I > will try to assist and write a self test suite of it. Then we can > detect regression problems in the future. It is a big problem with > mail-extr* that you don't know how a small change might affect > practical use. Thanks a lot. I'm interested in writing the new code, although for the moment I'm not sure whether I have time for it... > Btw, I assume you are familiar with g-e-a-c. It is rather simple, > perhaps too simple. > (defun gnus-extract-address-components (from) > "Extract address components from a From header. Yes, it's too simple to parse two or more addresses in the argument. However, it can be an exemplar for writing a simple and fast code. -- Katsumi Yamaoka