emacs-devel
[Top][All Lists]
Advanced

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

AGAIN: Can't isearch 'ö'


From: Kenichi Handa
Subject: AGAIN: Can't isearch 'ö'
Date: Thu, 08 Dec 2005 11:25:22 +0900

About a half year ago, we discussed this.

> The original problem was that when a user have `ö' of
> iso-8859-15 in a buffer of iso-8859-15 coding system, he
> can't isearch that character by typing `ö' on his keyboard
> because that key is recognized as `ö' of iso-8859-1.
> 
> Stefan's proposal is to translate a character by
> translation-table-for-input in read_char ().  This is a
> generic solution, but it makes read_char () return different
> character depending on the buffer-file-coding-system of the
> current buffer, which may or may not cause anther problem.
> 
> My proposal is to translate a character by
> translate-table-for-input in isearch-process-search-char.
> This is a limitted solution only for the current problem.

And, RMS wrote:

> Suppose we use the latter solution.  We probably would want to use it
> in other places as well, but which ones?  Can you suggest a rule for
> programmers to decide whether to translate the result from read-char
> thru translate-table-for-input, and when not to?

> Could you look thru the calls to read-char in Emacs, and see which
> ones clearly should do this translation, which ones clearly should
> not, and which ones would work right either with or without the
> translation?

As I didn't have a time for such a heavy study, I didn't
respond anything, and the discussion has been inconclusive.

At least, the rule is to trasnalte the result from read-char
if it is compared with the characters in the current buffer.

And, Luc correctly pointed out:

> There is something that has not been pointed out in the summary Handa
> gave, but which I believe may be relevant.  If I understood correctly,
> the problem in question will automatically completely disappear with
> Unicode and hence with Emacs 23.  (Unless I misunderstood.)

I still don't have a time for the above study, but the
problem should be fixed somehow.  So, unless someone else
can take over this matter, I propose again to install this
change.

Index: isearch.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.277
diff -c -r1.277 isearch.el
*** isearch.el  30 Nov 2005 22:53:00 -0000      1.277
--- isearch.el  8 Dec 2005 02:21:52 -0000
***************
*** 1809,1814 ****
--- 1809,1816 ----
     ((eq   char ?|)       (isearch-fallback t nil t)))
  
    ;; Append the char to the search string, update the message and re-search.
+   (if (char-table-p translation-table-for-input)
+       (setq char (or (aref translation-table-for-input char) char)))
    (isearch-process-search-string
     (char-to-string char)
     (if (>= char ?\200)

---
Kenichi Handa
address@hidden




reply via email to

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