[Top][All Lists]

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

Re: mail-extract-address-components bug

From: Kenichi Handa
Subject: Re: mail-extract-address-components bug
Date: Wed, 16 May 2007 10:28:13 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.0 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Sorry for the late response on this matter.

In article <address@hidden>, Katsumi Yamaoka <address@hidden> writes:

>>>>>> In <address@hidden> Katsumi Yamaoka wrote:
> > I hope this is fixed in Emacs 22.2 (or possibly 22.1).  I've been
> > annoyed that `mail-extract-address-component' sometimes fails to
> > parse addresses containing non-ASCII names correctly.  Japanese
> > people often use their native names in the From header.  Since
> > they sometimes use non-ASCII letters which are not specified as
> > words in the syntax table, Gnus, for example, fails to build the
> > recipient address when replying.

> [...]

> > The causes are

> [...]

> > and `m-e-a-c' uses `forward-word' to try to skip them even if
> > they are not words.

> I found another solution, which doesn't need to modify mail-extr.el:

> ;; Set the syntax of all non-ASCII characters to `word'
> ;; in the syntax tables that mail-extr.el uses.

If it solves the problem, should mail-extr.el be modified to
setup syntax tables as you did below?

> (eval-after-load "mail-extr"
>   '(let ((tables '(mail-extr-address-syntax-table
>                  mail-extr-address-comment-syntax-table
>                  mail-extr-address-domain-literal-syntax-table
>                  mail-extr-address-text-comment-syntax-table
>                  mail-extr-address-text-syntax-table))
>        table charsets generic-char)
>      (while tables
>        (setq table (symbol-value (car tables))
>            tables (cdr tables)
>            charsets charset-list)
>        (while charsets
>        (setq generic-char (make-char (car charsets))
>              charsets (cdr charsets))
>        (if (>= generic-char 128)
>            (modify-syntax-entry generic-char "w" table))))))

> This form also modifies the syntax of the Latin-1 nbsp character
> to `word' but it doesn't seem to be a problem.

> BTW, I think it should be documented that `modify-syntax-entry'
> allows the generic character of a charset as the first argument,
> as it is mentioned in the doc string of `make-char'.

I'm not sure.  It surely accepts a generic character now,
but the concept of generic character is deleted in
emacs-unicode-2 branch (and in comming Emacs 23).  So even
if we describe that feature now, it should be reverted quite

Kenichi Handa

reply via email to

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