From: Stephen Berman <stephen.berman@gmx.net>
To: 11339@debbugs.gnu.org
Subject: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii
Date: Tue, 09 Jul 2013 00:08:29 +0200 [thread overview]
Message-ID: <87d2qsaen6.fsf@rosalinde.fritz.box> (raw)
In-Reply-To: <87ehrbyg8t.fsf@escher.home> (Stephen Berman's message of "Wed, 25 Apr 2012 17:37:38 +0200")
On Wed, 25 Apr 2012 17:37:38 +0200 Stephen Berman <stephen.berman@gmx.net> wrote:
> -1. cd /tmp; touch bäh bÄh 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 => *Completions* buffer contains, as expected: bla bÄh bäh.
> 3. Visit files `bla', `bäh' and `bÄh', switch to buffer *scratch* and
> repeat step 2, replacing `C-x C-f' with `C-x b' => same results.
> 4. C-x C-f bä TAB => Emacs completes the input to "bäh".
> 5. TAB => Emacs incorrectly reports: "[Sole completion]".
> 6. C-x C-f bÄ TAB => Emacs completes the input to "bÄh".
> 7. TAB => Emacs incorrectly reports: "[Sole completion]".
> 8. Switch to buffer *scratch* and repeat step 4-7, replacing `C-x C-f'
> with `C-x b' => 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äh' and `bÄh' is being visited,
then `C-x b' completes correctly regardless of the case of the input;
i.e., if only `bÄh' is in a buffer `C-x b bä TAB' completes to it, and
likewise, if only `bäh' is in a buffer `C-x b bÄ TAB' completes to it.
But if only one of the files `bäh' and `bÄh' exists, `C-x C-f' still
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
next prev parent reply other threads:[~2013-07-08 22:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 15:37 bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Stephen Berman
2013-07-08 22:08 ` Stephen Berman [this message]
2019-11-01 19:57 ` Stefan Kangas
2019-11-01 20:20 ` Eli Zaretskii
2019-11-01 22:37 ` Stephen Berman
2019-11-02 7:11 ` Eli Zaretskii
2019-11-02 15:09 ` Stephen Berman
2019-11-03 16:16 ` Eli Zaretskii
2019-11-04 13:39 ` Stephen Berman
2019-11-04 16:21 ` Eli Zaretskii
2019-11-04 16:22 ` Stephen Berman
2019-11-04 17:12 ` Eli Zaretskii
2019-11-04 18:02 ` Stephen Berman
2019-11-06 16:58 ` Eli Zaretskii
2019-11-07 14:34 ` Stephen Berman
2019-11-07 14:49 ` Eli Zaretskii
2019-11-07 16:01 ` Stefan Monnier
2019-11-07 16:08 ` Eli Zaretskii
2019-11-07 16:27 ` Stefan Monnier
2019-11-07 18:12 ` Eli Zaretskii
2019-11-08 22:36 ` Stefan Monnier
2019-11-09 9:20 ` Eli Zaretskii
2019-11-09 17:56 ` Stephen Berman
2019-11-09 18:24 ` Stefan Monnier
2019-11-09 19:57 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2qsaen6.fsf@rosalinde.fritz.box \
--to=stephen.berman@gmx.net \
--cc=11339@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.