bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13236: 24.3.50; insert-char case-insensitivity damaged by completion


From: Carsten Bormann
Subject: bug#13236: 24.3.50; insert-char case-insensitivity damaged by completion customizations
Date: Thu, 20 Dec 2012 13:55:52 +0100

insert-char prompts for a Unicode character name.

As those are typically all upper case, and the user is likely to enter
lower case input, the completion needs to be case-insensitive.

This works as long as there is no customization of the completion.
E.g., 
M-x insert-char RET gree TAB
shows a number of greek characters, and a number of characters whose
names start with "GREEN": GREEN APPLE, GREEN BOOK, GREEN HEART.


1) For

(setq completion-styles '(partial-completion initials))

M-x insert-char RET gree TAB
leads to:

completion--some: Internal error: GREEN BOOK doesn't match \`gree

(Note that

M-x insert-char RET asterism TAB

properly shows the only match, ASTERISM.)


2) For

(setq completion-pcm-complete-word-inserts-delimiters t)

M-x insert-char RET SPC ellipsis TAB

(note the SPC) at the prompt doesn't provide a match, while

M-x insert-char RET SPC ELLIPSIS TAB

shows several character names that contain the word ELLIPSIS.

                                   ⁂


I didn't try this exhaustively, but it seems there are several
interactions the current code does not consider.

Patching read-char-by-name like this seems to make work the cases 
I'm interested in:

   (let* ((enable-recursive-minibuffers t)
         (input
+          (let ((completion-ignore-case t)) ; HACK
          (completing-read

In GNU Emacs 24.3.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2012-12-17 on bob.porkrind.org
Bzr revision: 111254 rudalics@gmx.at-20121217075457-afkz5nrni0hvzfkj
Windowing system distributor `Apple', version 10.3.1187
Configured using:
 `configure '--host=x86_64-apple-darwin' '--build=i686-apple-darwin'
 '--with-ns' 'build_alias=i686-apple-darwin'
 'host_alias=x86_64-apple-darwin' 'CC=gcc -mmacosx-version-min=10.7
 -isystem
 
/Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/
 
-F/Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks''

Important settings:
  value of $LC_CTYPE: UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: InactiveMinibuffer

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils vc-rcs misearch multi-isearch help-mode easymenu
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)






reply via email to

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