GNU bug report logs - #13236
24.3.50; insert-char case-insensitivity damaged by completion customizations

Previous Next

Package: emacs;

Reported by: Carsten Bormann <cabo <at> tzi.org>

Date: Thu, 20 Dec 2012 12:57:02 UTC

Severity: normal

Tags: moreinfo

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 13236 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Carsten Bormann <cabo <at> tzi.org>
Cc: 13236 <at> debbugs.gnu.org
Subject: Re: bug#13236: 24.3.50; insert-char case-insensitivity damaged by
 completion customizations
Date: Fri, 16 Aug 2019 00:18:56 -0700
Carsten Bormann <cabo <at> 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




This bug report was last modified 5 years and 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.