From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#12615: 24.2.50; Non-ignored case in insert-char Date: Sun, 30 Dec 2012 00:56:05 +0200 Organization: JURTA Message-ID: <87d2xsxy9q.fsf@mail.jurta.org> References: <20121010.173658.77853335142870486.hanche@math.ntnu.no> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356823033 13364 80.91.229.3 (29 Dec 2012 23:17:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Dec 2012 23:17:13 +0000 (UTC) Cc: 12615@debbugs.gnu.org, Harald Hanche-Olsen To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 30 00:17:29 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tp5ee-0005MV-EF for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Dec 2012 00:17:24 +0100 Original-Received: from localhost ([::1]:59531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tp5eP-0005fD-H2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Dec 2012 18:17:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tp5eL-0005et-L2 for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 18:17:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tp5eH-0007rq-Bl for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 18:17:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tp5eH-0007rh-8R for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 18:17:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tp5fF-0005J3-MD for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 18:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Dec 2012 23:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12615 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12615-submit@debbugs.gnu.org id=B12615.135682305820367 (code B ref 12615); Sat, 29 Dec 2012 23:18:01 +0000 Original-Received: (at 12615) by debbugs.gnu.org; 29 Dec 2012 23:17:38 +0000 Original-Received: from localhost ([127.0.0.1]:36462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tp5er-0005IQ-4l for submit@debbugs.gnu.org; Sat, 29 Dec 2012 18:17:37 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:49287 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tp5ep-0005IJ-3x for 12615@debbugs.gnu.org; Sat, 29 Dec 2012 18:17:35 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 776B4451CE1D; Sat, 29 Dec 2012 15:16:32 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Wed, 10 Oct 2012 20:56:00 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69177 Archived-At: >> Some observations: C-x 8 C-m is bound to insert-char, a C function. >> And insert-char calls read-char-by-name, which let-binds >> completion-ignore-case to t. The clear intention is that unicode name >> searches should always be case insensitive, and this seems always to >> be the case if completion-ignore-case is not buffer local. > > Indeed, a buffer-local setting of completion-ignore-case can > bring surprises. I think the patch below will fix this problem for this > particular case. I just stumbled upon the case where this fix causes the regression: typing `C-x 8 RET *acc TAB' results in "[No match]". I don't know why this case disobeys the let-binding of `completion-ignore-case' and whether a simpler fix is possible, but at least this patch fixes it for the emacs-24 branch: === modified file 'lisp/international/mule-cmds.el' --- lisp/international/mule-cmds.el 2012-10-11 20:05:47 +0000 +++ lisp/international/mule-cmds.el 2012-12-29 22:45:12 +0000 @@ -2946,10 +2946,12 @@ (defun read-char-by-name (prompt) point or a number in hash notation, e.g. #o21430 for octal, #x2318 for hex, or #10r8984 for decimal." (let ((input + (minibuffer-with-setup-hook + (lambda () + (set (make-local-variable 'completion-ignore-case) t)) (completing-read prompt (lambda (string pred action) - (let ((completion-ignore-case t)) (if (eq action 'metadata) '(metadata (category . unicode-name)) (complete-with-action action (ucs-names) string pred)))))))