From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12615: 24.2.50; Non-ignored case in insert-char Date: Wed, 10 Oct 2012 20:56:00 -0400 Message-ID: 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 1349916984 21676 80.91.229.3 (11 Oct 2012 00:56:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2012 00:56:24 +0000 (UTC) Cc: 12615@debbugs.gnu.org To: Harald Hanche-Olsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 11 02:56:31 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 1TM74g-0006TF-UF for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Oct 2012 02:56:31 +0200 Original-Received: from localhost ([::1]:41634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM74a-0008Nm-Gu for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Oct 2012 20:56:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM74Y-0008Nd-Cm for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2012 20:56:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TM74X-0008RC-DU for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2012 20:56:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM74X-0008R7-AJ for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2012 20:56:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TM75C-0001tD-7e for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2012 20:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Oct 2012 00:57:02 +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.13499170097243 (code B ref 12615); Thu, 11 Oct 2012 00:57:02 +0000 Original-Received: (at 12615) by debbugs.gnu.org; 11 Oct 2012 00:56:49 +0000 Original-Received: from localhost ([127.0.0.1]:38375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TM74z-0001sm-HK for submit@debbugs.gnu.org; Wed, 10 Oct 2012 20:56:49 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:52864) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TM74y-0001sb-2Y for 12615@debbugs.gnu.org; Wed, 10 Oct 2012 20:56:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxLQG/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="201064358" Original-Received: from 69-196-180-6.dsl.teksavvy.com (HELO ceviche.home) ([69.196.180.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 10 Oct 2012 20:56:00 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 868CB660CA; Wed, 10 Oct 2012 20:56:00 -0400 (EDT) In-Reply-To: <20121010.173658.77853335142870486.hanche@math.ntnu.no> (Harald Hanche-Olsen's message of "Wed, 10 Oct 2012 17:36:58 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) 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 (newer, 2) 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:65477 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. Stefan === modified file 'lisp/international/mule-cmds.el' --- lisp/international/mule-cmds.el 2012-09-25 18:47:18 +0000 +++ lisp/international/mule-cmds.el 2012-10-11 00:54:27 +0000 @@ -2958,13 +2958,14 @@ This function also accepts a hexadecimal number of Unicode code point or a number in hash notation, e.g. #o21430 for octal, #x2318 for hex, or #10r8984 for decimal." - (let* ((completion-ignore-case t) - (input (completing-read + (let ((input + (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)))))) + (complete-with-action action (ucs-names) string pred))))))) (cond ((string-match-p "\\`[0-9a-fA-F]+\\'" input) (string-to-number input 16))