GNU bug report logs - #11339
24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Stephen Berman <stephen.berman@HIDDEN>; dated Wed, 25 Apr 2012 15:39:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 11339 <at> debbugs.gnu.org:


Received: (at 11339) by debbugs.gnu.org; 8 Jul 2013 22:08:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 08 18:08:41 2013
Received: from localhost ([127.0.0.1]:40304 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UwJbs-0005Rc-RH
	for submit <at> debbugs.gnu.org; Mon, 08 Jul 2013 18:08:41 -0400
Received: from mout.gmx.net ([212.227.17.22]:50579)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <stephen.berman@HIDDEN>) id 1UwJbq-0005RL-2q
 for 11339 <at> debbugs.gnu.org; Mon, 08 Jul 2013 18:08:39 -0400
Received: from rosalinde.fritz.box ([89.245.117.113]) by mail.gmx.com
 (mrgmx002) with ESMTPSA (Nemesis) id 0MEWPx-1UyBHz1eAr-00Fo6c for
 <11339 <at> debbugs.gnu.org>; Tue, 09 Jul 2013 00:08:31 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: 11339 <at> debbugs.gnu.org
Subject: Re: bug#11339: 24.1.50;
 read-{buffer,file-name}-completion-ignore-case fails on non-ascii
References: <87ehrbyg8t.fsf@HIDDEN>
Date: Tue, 09 Jul 2013 00:08:29 +0200
In-Reply-To: <87ehrbyg8t.fsf@HIDDEN> (Stephen Berman's message of "Wed,
 25 Apr 2012 17:37:38 +0200")
Message-ID: <87d2qsaen6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K0:iaHCkyyceCjkdXQ3NxoSVmQ8qMiidZSxRfqUK2/sZVkUoMyDoTq
 JibucSWE63QowdKayecBWBrQqngBRLTetaHz2UFb4phLm/5J/uJxxP4uTH8W7hejQNqMvjw
 VfPKYWlrLRtNaNJ8DQen82vNovQMalc1A2UET6qRSSx5LwLhXA0kwPTxLvYngsWlA3f0LwF
 bZo7vY5uAuc+SVotWcI/g==
X-Spam-Score: -0.3 (/)
X-Debbugs-Envelope-To: 11339
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

On Wed, 25 Apr 2012 17:37:38 +0200 Stephen Berman <stephen.berman@HIDDEN> =
wrote:

> -1. cd /tmp; touch b=C3=A4h b=C3=84h bla
> 0. emacs -Q
> 1. M-x customize-option RET read-buffer-completion-ignore-case RET.
>    Toggle to "on", set for the current session.
>    M-x customize-option RET read-file-name-completion-ignore-case RET.
>    Toggle to "on", set for the current session.
> 2. C-x C-f b TAB =3D> *Completions* buffer contains, as expected: bla b=
=C3=84h b=C3=A4h.=20=20=20=20=20=20=20=20=20
> 3. Visit files `bla', `b=C3=A4h' and `b=C3=84h', switch to buffer *scratc=
h* and
>    repeat step 2, replacing `C-x C-f' with `C-x b' =3D> same results.
> 4. C-x C-f b=C3=A4 TAB =3D> Emacs completes the input to "b=C3=A4h".=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20
> 5. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20
> 6. C-x C-f b=C3=84 TAB =3D> Emacs completes the input to "b=C3=84h".
> 7. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20
> 8. Switch to buffer *scratch* and repeat step 4-7, replacing `C-x C-f'
>    with `C-x b' =3D> same results.

This bug still exists in the current trunk.  I have an additional
observation, which I don't know if I just overlooked in my OP or if
there's been a code change since then that's responsible for this
observation: if only one of the files `b=C3=A4h' and `b=C3=84h' is being vi=
sited,
then `C-x b' completes correctly regardless of the case of the input;
i.e., if only `b=C3=84h' is in a buffer `C-x b b=C3=A4 TAB' completes to it=
, and
likewise, if only `b=C3=A4h' is in a buffer `C-x b b=C3=84 TAB' completes t=
o it.
But if only one of the files `b=C3=A4h' and `b=C3=84h' exists, `C-x C-f' st=
ill
only completes if the case of the input matches the case of the file
name, as above.

Here is part of the call chain of find-file:

find-file (files.el) -> find-file-read-args -> read-file-name
(minibuffer.el) -> read-file-name-default -> completing-read ->
read-file-name-internal -> completion-table-in-turn ->
completion--file-name-table -> completion-file-name-table ->
file-name-completion (dired.c) -> file_name_completion ->
fast_string_match_ignore_case (search.c) -> compile_pattern with argument
Vascii_canon_table

The argument Vascii_canon_table looks suspicious, but maybe it's already
been overridden earlier, though I don't see where; or maybe I just don't
understand its import here.  Anyway, the call chain of switch-to-buffer
is quite different:

switch-to-buffer (window.el) -> read-buffer-to-switch ->
internal-complete-buffer-except (minibuffer.el) -> internal-complete-buffer
(minibuf.c) -> (try-completion | all-completions | test-completion) ->
Fcompare_strings

(file_name_completion also calls Fcompare_strings later, but there's no
use of Vascii_canon_table there.)

I don't know how to debug this.

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#11339; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Apr 2012 15:38:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 25 11:38:58 2012
Received: from localhost ([127.0.0.1]:52885 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SN4Iz-0003S4-Kt
	for submit <at> debbugs.gnu.org; Wed, 25 Apr 2012 11:38:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34805)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <stephen.berman@HIDDEN>) id 1SN4Iw-0003Rr-57
	for submit <at> debbugs.gnu.org; Wed, 25 Apr 2012 11:38:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1SN4Hy-0005s7-5w
	for submit <at> debbugs.gnu.org; Wed, 25 Apr 2012 11:37:55 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:58271)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1SN4Hy-0005rx-3H
	for submit <at> debbugs.gnu.org; Wed, 25 Apr 2012 11:37:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39075)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1SN4Ht-0001pJ-7c
	for bug-gnu-emacs@HIDDEN; Wed, 25 Apr 2012 11:37:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1SN4Hm-0005qA-Nq
	for bug-gnu-emacs@HIDDEN; Wed, 25 Apr 2012 11:37:48 -0400
Received: from mailout-de.gmx.net ([213.165.64.22]:58520)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1SN4Hm-0005pf-EW
	for bug-gnu-emacs@HIDDEN; Wed, 25 Apr 2012 11:37:42 -0400
Received: (qmail invoked by alias); 25 Apr 2012 15:37:40 -0000
Received: from i59F5438B.versanet.de (EHLO escher.home) [89.245.67.139]
	by mail.gmx.net (mp002) with SMTP; 25 Apr 2012 17:37:40 +0200
X-Authenticated: #20778731
X-Provags-ID: V01U2FsdGVkX18MTMAF86kMdNAvzrzxbR/0SuHvuFtPstceCv4/kV
	n0LysK/osl6hrx
From: Stephen Berman <stephen.berman@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.1.50;
	read-{buffer,file-name}-completion-ignore-case fails on non-ascii
Date: Wed, 25 Apr 2012 17:37:38 +0200
Message-ID: <87ehrbyg8t.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.118.235.17
X-Spam-Score: -6.9 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

-1. cd /tmp; touch b=C3=A4h b=C3=84h bla
0. emacs -Q
1. M-x customize-option RET read-buffer-completion-ignore-case RET.
   Toggle to "on", set for the current session.
   M-x customize-option RET read-file-name-completion-ignore-case RET.
   Toggle to "on", set for the current session.
2. C-x C-f b TAB =3D> *Completions* buffer contains, as expected: bla b=C3=
=84h b=C3=A4h.=20=20=20=20=20=20=20=20=20
3. Visit files `bla', `b=C3=A4h' and `b=C3=84h', switch to buffer *scratch*=
 and
   repeat step 2, replacing `C-x C-f' with `C-x b' =3D> same results.
4. C-x C-f b=C3=A4 TAB =3D> Emacs completes the input to "b=C3=A4h".=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20
5. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
6. C-x C-f b=C3=84 TAB =3D> Emacs completes the input to "b=C3=84h".
7. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
8. Switch to buffer *scratch* and repeat step 4-7, replacing `C-x C-f'
   with `C-x b' =3D> same results.


In GNU Emacs 24.1.50.1 (i686-suse-linux-gnu, GTK+ Version 2.24.7)
 of 2012-04-18 on escher
Bzr revision: 107959 cyd@HIDDEN
Windowing system distributor `The X.Org Foundation', version 11.0.11004000
Configured using:
 `configure '--without-toolkit-scroll-bars' 'CFLAGS=3D-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=3Dlocal
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t




Acknowledgement sent to Stephen Berman <stephen.berman@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#11339; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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