unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* input-method completion is annoying.
@ 2007-03-07 14:35 Michaël Cadilhac
  2007-03-20  4:29 ` Kenichi Handa
  0 siblings, 1 reply; 2+ messages in thread
From: Michaël Cadilhac @ 2007-03-07 14:35 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 782 bytes --]

Hi!

Input method completion is sometimes like a PITA because it just
happens when you need it least.

For example, I use BBDB with Gnus, and a postfix input-method. Let's
say I want to search for Akim's mail contact.

I just type Aki and have a <TAB> (BBDB completion expected). Heck!
quail (quite unreadable) completion:
| Possible completion and corresponding characters are:
|  i: -
|    i^:(1/1) 1.î
|      i^^:(1/1) 1.i^
|    i":(1/1) 1.ï
|      i"":(1/1) 1.i"
`------------------------

Apart from the fact that this completion infos are kind of useless
(the echo area already prints the useful infos), the binding is
annoying.

I just propose to change this key to M-# (don't ask me why this key,
it's only a free key that can't be used by mistake):

[-- Attachment #1.1.2: input-method.patch --]
[-- Type: text/x-patch, Size: 5515 bytes --]

Index: lisp/international/quail.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/international/quail.el,v
retrieving revision 1.154
diff -B -w -c -r1.154 quail.el
*** lisp/international/quail.el	2 Feb 2007 11:43:31 -0000	1.154
--- lisp/international/quail.el	7 Mar 2007 13:18:31 -0000
***************
*** 266,273 ****
  (defvar quail-translation-keymap
    (let ((map (make-keymap))
  	(i 0))
!     (while (< i ?\ )
!       (define-key map (char-to-string i) 'quail-other-command)
        (setq i (1+ i)))
      (while (< i 127)
        (define-key map (char-to-string i) 'quail-self-insert-command)
--- 266,274 ----
  (defvar quail-translation-keymap
    (let ((map (make-keymap))
  	(i 0))
!     (while (< i ?\s)
!       (unless (= i meta-prefix-char)
! 	(define-key map (char-to-string i) 'quail-other-command))
        (setq i (1+ i)))
      (while (< i 127)
        (define-key map (char-to-string i) 'quail-self-insert-command)
***************
*** 285,291 ****
      (define-key map [left] 'quail-prev-translation)
      (define-key map [down] 'quail-next-translation-block)
      (define-key map [up] 'quail-prev-translation-block)
!     (define-key map "\C-i" 'quail-completion)
      (define-key map "\C-@" 'quail-select-current)
      ;; Following simple.el, Enter key on numeric keypad selects the
      ;; current translation just like `C-SPC', and `mouse-2' chooses
--- 286,292 ----
      (define-key map [left] 'quail-prev-translation)
      (define-key map [down] 'quail-next-translation-block)
      (define-key map [up] 'quail-prev-translation-block)
!     (define-key map "\M-#" 'quail-completion)
      (define-key map "\C-@" 'quail-select-current)
      ;; Following simple.el, Enter key on numeric keypad selects the
      ;; current translation just like `C-SPC', and `mouse-2' chooses
***************
*** 295,301 ****
      (define-key map [down-mouse-2] nil)
      (define-key map "\C-h" 'quail-translation-help)
      (define-key map [?\C- ] 'quail-select-current)
-     (define-key map [tab] 'quail-completion)
      (define-key map [delete] 'quail-delete-last-char)
      (define-key map [backspace] 'quail-delete-last-char)
      map)
--- 296,301 ----
***************
*** 338,344 ****
    (let ((map (make-keymap))
  	(i 0))
      (while (< i ?\ )
!       (define-key map (char-to-string i) 'quail-other-command)
        (setq i (1+ i)))
      (while (< i 127)
        (define-key map (char-to-string i) 'quail-self-insert-command)
--- 338,345 ----
    (let ((map (make-keymap))
  	(i 0))
      (while (< i ?\ )
!       (unless (= i meta-prefix-char)
! 	(define-key map (char-to-string i) 'quail-other-command))
        (setq i (1+ i)))
      (while (< i 127)
        (define-key map (char-to-string i) 'quail-self-insert-command)
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10783
diff -C0 -r1.10783 ChangeLog
*** lisp/ChangeLog	7 Mar 2007 12:50:23 -0000	1.10783
--- lisp/ChangeLog	7 Mar 2007 13:21:40 -0000
***************
*** 0 ****
--- 1,7 ----
+ 2007-03-07  Micha^[,Ak^[(Bl Cadilhac  <michael@cadilhac.name>
+ 
+ 	* international/quail.el (quail-translation-keymap): Don't bind
+ 	`meta-prefix-char' to `quail-othe-command', in order to bind
+ 	"\M-#" instead of <TAB> to quail-completion.
+ 	(quail-simple-translation-keymap): Ditto.
+ 
Index: leim/quail/latin-ltx.el
===================================================================
RCS file: /sources/emacs/emacs/leim/quail/latin-ltx.el,v
retrieving revision 1.27
diff -B -w -c -r1.27 latin-ltx.el
*** leim/quail/latin-ltx.el	16 Jan 2007 08:40:03 -0000	1.27
--- leim/quail/latin-ltx.el	7 Mar 2007 13:24:16 -0000
***************
*** 41,47 ****
   \\'a -> á  \\`{a} -> à
   \\pi -> π  \\int -> ∫  ^1 -> ¹"
  
!  '(("\t" . quail-completion))
   t t nil nil nil nil nil nil nil t)
  
  (quail-define-rules
--- 41,47 ----
   \\'a -> á  \\`{a} -> à
   \\pi -> π  \\int -> ∫  ^1 -> ¹"
  
!  '(("\M-#" . quail-completion))
   t t nil nil nil nil nil nil nil t)
  
  (quail-define-rules
Index: leim/quail/sgml-input.el
===================================================================
RCS file: /sources/emacs/emacs/leim/quail/sgml-input.el,v
retrieving revision 1.8
diff -B -w -c -r1.8 sgml-input.el
*** leim/quail/sgml-input.el	16 Jan 2007 08:40:03 -0000	1.8
--- leim/quail/sgml-input.el	7 Mar 2007 13:24:17 -0000
***************
*** 41,47 ****
  HTMLspecial and HTMLsymbol.
  
  E.g.: &aacute; -> á"
!  '(("\t" . quail-completion))
   t nil nil nil nil nil nil nil nil t)
  
  (quail-define-rules
--- 41,47 ----
  HTMLspecial and HTMLsymbol.
  
  E.g.: &aacute; -> á"
!  '(("\M-#" . quail-completion))
   t nil nil nil nil nil nil nil nil t)
  
  (quail-define-rules
Index: leim/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/leim/ChangeLog,v
retrieving revision 1.214
diff -C0 -r1.214 ChangeLog
*** leim/ChangeLog	11 Feb 2007 00:42:11 -0000	1.214
--- leim/ChangeLog	7 Mar 2007 13:25:10 -0000
***************
*** 0 ****
--- 1,6 ----
+ 2007-03-07  Micha^[,Ak^[(Bl Cadilhac  <michael@cadilhac.name>
+ 
+ 	* quail/latin-ltx.el ("TeX"): Use "\M-#" instead of <TAB> for
+ 	`quail-completion'.
+ 	* quail/sgml-input.el ("sgml"): Ditto.
+ 

[-- Attachment #1.1.3: Type: text/plain, Size: 70 bytes --]


Second little bug, the completion buffer isn't read-only. How about:

[-- Attachment #1.1.4: quail.patch --]
[-- Type: text/x-patch, Size: 1691 bytes --]

Index: lisp/international/quail.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/international/quail.el,v
retrieving revision 1.154
diff -B -w -c -r1.154 quail.el
*** lisp/international/quail.el	2 Feb 2007 11:43:31 -0000	1.154
--- lisp/international/quail.el	7 Mar 2007 13:14:23 -0000
***************
*** 2161,2170 ****
  		  ;; quail-completion-buf.
  		  (minibuffer-scroll-window nil))
  	      (scroll-other-window)))
! 	(setq quail-current-key key)
  	(erase-buffer)
  	(insert "Possible completion and corresponding characters are:\n")
  	(quail-completion-1 key map 1)
  	(goto-char (point-min))
  	(display-buffer (current-buffer))
  	(setq require-update t)))
--- 2161,2172 ----
  		  ;; quail-completion-buf.
  		  (minibuffer-scroll-window nil))
  	      (scroll-other-window)))
! 	(setq quail-current-key key
! 	      buffer-read-only nil)
  	(erase-buffer)
  	(insert "Possible completion and corresponding characters are:\n")
  	(quail-completion-1 key map 1)
+ 	(setq buffer-read-only t)
  	(goto-char (point-min))
  	(display-buffer (current-buffer))
  	(setq require-update t)))
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10783
diff -C0 -r1.10783 ChangeLog
*** lisp/ChangeLog	7 Mar 2007 12:50:23 -0000	1.10783
--- lisp/ChangeLog	7 Mar 2007 13:14:55 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2007-03-07  Michaël Cadilhac  <michael@cadilhac.name>
+ 
+ 	* international/quail.el (quail-completion): Set the buffer to be
+ 	read-only when needed.
+ 

[-- Attachment #1.1.5: Type: text/plain, Size: 335 bytes --]


TIA!

-- 
 |   Michaël `Micha' Cadilhac       |  La meilleure façon                    |
 |   http://michael.cadilhac.name   |     de ne pas avancer,                 |
 |   JID/MSN:                       |  c'est de suivre une idée fixe.        |
 `----  michael.cadilhac@gmail.com  |          -- Jacques Prévert       -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: input-method completion is annoying.
  2007-03-07 14:35 input-method completion is annoying Michaël Cadilhac
@ 2007-03-20  4:29 ` Kenichi Handa
  0 siblings, 0 replies; 2+ messages in thread
From: Kenichi Handa @ 2007-03-20  4:29 UTC (permalink / raw)
  To: Michaël Cadilhac; +Cc: emacs-devel

Sorry for the late response.

In article <87tzwxt93f.fsf@lrde.org>, michael@cadilhac.name (Michaël Cadilhac) writes:

> Input method completion is sometimes like a PITA because it just
> happens when you need it least.

> For example, I use BBDB with Gnus, and a postfix input-method. Let's
> say I want to search for Akim's mail contact.

> I just type Aki and have a <TAB> (BBDB completion expected). Heck!
> quail (quite unreadable) completion:
> | Possible completion and corresponding characters are:
> |  i: -
> |    i^:(1/1) 1.î
> |      i^^:(1/1) 1.i^
> |    i":(1/1) 1.ï
> |      i"":(1/1) 1.i"
> `------------------------

> Apart from the fact that this completion infos are kind of useless
> (the echo area already prints the useful infos), the binding is
> annoying.

I agree, but...

> I just propose to change this key to M-# (don't ask me why this key,
> it's only a free key that can't be used by mistake):

you change has bad effect of "ESC-" not echoed when you type
it after, for instance, '\' key.  I don't remember well, but
perhaps, it is the reason of binding with
quail-other-command.  For the moment, I don't know how to
fix it.  In addtion, as the release is close, I think
changing user interface is not good.  I recorded this issue
in my todo list.

By the way,

> Second little bug, the completion buffer isn't read-only. How about:

It seems that such a change is good and safe.  I've just
installed a different change to do the same thing.

---
Kenichi Handa
handa@m17n.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-20  4:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-07 14:35 input-method completion is annoying Michaël Cadilhac
2007-03-20  4:29 ` Kenichi Handa

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).