[Top][All Lists]

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

Re: lessen user alarm when coding system is questioned

From: Kenichi Handa
Subject: Re: lessen user alarm when coding system is questioned
Date: Tue, 25 Dec 2001 10:45:13 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

Richard Stallman <address@hidden> writes:

>>  "You have the right to appeal.  You may hit C-g now and type M-x
>>  find-the-offending-character."

> ISTR that at one point we set it up to display that character along
> with the message.  Did that feature go away?

Emacs 20 had that feature, but, is dropped in 21.  It worked
in 20 because a coding system had only safe-charsets
property in 20, thus that task was not that time consuming
(we got a list of charsets, then checked if they were
supported by a coding system).  In addition, Emacs 20 tried
only buffer-file-coding-system.

But, in 21, a coding system can have safe-chars property,
and select-safe-coding-system tries multiple coding systems.
That makes the task very complicated and time consuming.

Provided that select-safe-coding-system checks coding
systems A, B, and C, we must find which character is not
supported by A, which is not supported by B, which is not
supported by C.

> In any case, it would be a good feature to have.  Does
> anyone know HOW we would find that character?

One way is to add argument CODING-SYSTEMS to
find-coding-systems-region.  It is a list of coding systems
that select-safe-coding-system will silently try.  Then,
make find-coding-systems-region-internal also return
characters (or positions of characters) that are not
supported by each coding systems in CODING-SYSTEMS.

We also have to modify select-safe-coding-system to display
the result of above detection property to users.

Ken'ichi HANDA

reply via email to

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