[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mail-extract-address-components bug
From: |
Katsumi Yamaoka |
Subject: |
Re: mail-extract-address-components bug |
Date: |
Tue, 15 May 2007 18:00:43 +0900 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
>>>>> 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.
(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'.
Regards,
- mail-extract-address-components bug, Katsumi Yamaoka, 2007/05/13
- Re: mail-extract-address-components bug, Katsumi Yamaoka, 2007/05/14
- Re: mail-extract-address-components bug,
Katsumi Yamaoka <=
- Re: mail-extract-address-components bug, Kenichi Handa, 2007/05/15
- Re: mail-extract-address-components bug, Katsumi Yamaoka, 2007/05/15
- Re: mail-extract-address-components bug, Kenichi Handa, 2007/05/16
- Re: mail-extract-address-components bug, Katsumi Yamaoka, 2007/05/16
- Re: mail-extract-address-components bug, Stefan Monnier, 2007/05/17
- Re: mail-extract-address-components bug, Richard Stallman, 2007/05/17
- Re: mail-extract-address-components bug, Kenichi Handa, 2007/05/17
- Re: mail-extract-address-components bug, Katsumi Yamaoka, 2007/05/17
- Re: mail-extract-address-components bug, Kenichi Handa, 2007/05/17
- Re: mail-extract-address-components bug, Katsumi Yamaoka, 2007/05/18