all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-pretest-bug@gnu.org, thorn+news@fastmail.fm
Subject: Re: 23.0.60; Cannot isearch for non-ascii chars with emacs -nw -Q
Date: Thu, 28 Feb 2008 11:02:56 +0900	[thread overview]
Message-ID: <E1JUY6q-0007y7-Rd@etlken.m17n.org> (raw)
In-Reply-To: <jwv8x162xdz.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Wed, 27 Feb 2008 11:13:18 -0500)

In article <jwv8x162xdz.fsf-monnier+emacs@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> > It seems that something is broken in isearch-x.el (although
> > unicode merge didn't change it).  I'm now investigating.

I found that when isearch-printing-char is called,
last-command-char is already what decoded by
encoded-kbd-mode.  But, when I wrote isearch-x.el,
last-command-char was the first byte of utf-8 sequence.  So,
isearch-x.el pushed back that byte in unread-command-events
and re-read the whole utf-8 sequence.

It seems that something in handling keyboard input has been
changed.  I've just installed the attached change.  Tassilo,
could you please try again with the latest code?

> > But, perhaps, it's time to implement the decoding of
> > keyboard input by C.  After multi-tty merge, we have the
> > function tty_read_avail_input.  I think that is the right
> > place to do that decoding.

> Now that we've moved the keyboard decoding to input-event-map,

Ah!  Is that the change I wrote above?

> I'm not sure what would be the benefit.  Of course, if we
> can just reuse C code and get rid of the encoded-kbd code,
> that's good.

Yes.  I think it can be done by adding less than 100 lines
of C code (mostly for handling meta-key) in
tty_read_avail_input and removing most of encoded-kb.el (we
still need the code of calling set-input-mode property).

---
Kenichi Handa
handa@ni.aist.go.jp

2008-02-28  Kenichi Handa  <handa@ni.aist.go.jp>

	* isearch.el (isearch-printing-char): Don't check
	keyboard-coding-system.  Call
	isearch-process-search-multibyte-characters only when
	current-input-method is non-nil.

Index: isearch.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.312
retrieving revision 1.313
diff -u -r1.312 -r1.313
--- isearch.el	25 Feb 2008 00:01:41 -0000	1.312
+++ isearch.el	28 Feb 2008 01:57:42 -0000	1.313
@@ -1842,15 +1842,9 @@
   (let ((char last-command-char))
     (if (= char ?\S-\ )
 	(setq char ?\s))
-    (if (and enable-multibyte-characters
-	     (>= char ?\200)
-	     (<= char ?\377))
-	(if (keyboard-coding-system)
-	    (isearch-process-search-multibyte-characters char)
-	  (isearch-process-search-char (unibyte-char-to-multibyte char)))
-      (if current-input-method
-	  (isearch-process-search-multibyte-characters char)
-	(isearch-process-search-char char)))))
+    (if current-input-method
+	(isearch-process-search-multibyte-characters char)
+      (isearch-process-search-char char))))
 
 (defun isearch-process-search-char (char)
   ;; * and ? are special in regexps when not preceded by \.




  reply	other threads:[~2008-02-28  2:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25 22:19 23.0.60; Cannot isearch for non-ascii chars with emacs -nw -Q Tassilo Horn
2008-02-27  3:10 ` Stefan Monnier
2008-02-27  7:28   ` Kenichi Handa
2008-02-27 16:13     ` Stefan Monnier
2008-02-28  2:02       ` Kenichi Handa [this message]
2008-02-28  4:05         ` Stefan Monnier
2008-02-28  5:03           ` Kenichi Handa
2008-02-28  8:12         ` Tassilo Horn
2008-02-27  8:13   ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1JUY6q-0007y7-Rd@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=thorn+news@fastmail.fm \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.