all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13236: 24.3.50; insert-char case-insensitivity damaged by completion customizations
@ 2012-12-20 12:55 Carsten Bormann
  2019-08-16  7:18 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Bormann @ 2012-12-20 12:55 UTC (permalink / raw)
  To: 13236

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)






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

* bug#13236: 24.3.50; insert-char case-insensitivity damaged by completion customizations
  2012-12-20 12:55 bug#13236: 24.3.50; insert-char case-insensitivity damaged by completion customizations Carsten Bormann
@ 2019-08-16  7:18 ` Lars Ingebrigtsen
  2019-10-14  6:03   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-16  7:18 UTC (permalink / raw)
  To: Carsten Bormann; +Cc: 13236

Carsten Bormann <cabo@tzi.org> writes:

> 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

(I'm going through old bug reports that have unfortunately gotten no
responses yet.)

I tried reproducing this in Emacs 27, and I didn't get that error
message -- instead TAB seemed to complete as normal.

Are you still seeing this error in modern Emacsen?

> 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.

Ditto with this case -- I get lots of ELLIPSIS completions with "
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

Looks like pretty much this was done in 2013 -- the code now reads:

  (let* ((enable-recursive-minibuffers t)
	 (completion-ignore-case t)
	 (input

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#13236: 24.3.50; insert-char case-insensitivity damaged by completion customizations
  2019-08-16  7:18 ` Lars Ingebrigtsen
@ 2019-10-14  6:03   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-14  6:03 UTC (permalink / raw)
  To: Carsten Bormann; +Cc: 13236

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I tried reproducing this in Emacs 27, and I didn't get that error
> message -- instead TAB seemed to complete as normal.
>
> Are you still seeing this error in modern Emacsen?

More information was requested some weeks back, but no response was
given, so I'm closing this bug report.  If you're still seeing this
problem, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2019-10-14  6:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20 12:55 bug#13236: 24.3.50; insert-char case-insensitivity damaged by completion customizations Carsten Bormann
2019-08-16  7:18 ` Lars Ingebrigtsen
2019-10-14  6:03   ` Lars Ingebrigtsen

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.