unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 11339@debbugs.gnu.org, Stefan Kangas <stefan@marxist.se>
Subject: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii
Date: Fri, 01 Nov 2019 23:37:54 +0100	[thread overview]
Message-ID: <87o8xvz0hp.fsf@gmx.net> (raw)
In-Reply-To: <83bltvl55x.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 01 Nov 2019 22:20:42 +0200")

On Fri, 01 Nov 2019 22:20:42 +0200 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stefan Kangas <stefan@marxist.se>
>> Date: Fri, 01 Nov 2019 20:57:30 +0100
>> Cc: 11339@debbugs.gnu.org
>> 
>> > 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.
>> 
>> I can reproduce this on current master using the simpler recipe:
>> 
>> 0. emacs -Q
>> 1. Evaluate (setq read-buffer-completion-ignore-case t)
>> 2. C-x b bäh RET
>> 3. C-x b bÄh RET
>> 4. C-x b bä TAB TAB
>> 
>> Result: Completes to "bäh" on first TAB, and on second TAB [Sole
>> completion] is displayed in minibuffer.
>> 
>> Expected result: The "*Completion*" buffer is displayed.
>
> I think your expectations are incorrect in this case.  Try having
> buffer names that differ (not in letter-case) in the 3rd letter.
>
> What I see here is entirely expected and reasonable.  I see no bug.

I think the expectation I had about the variables
read-{buffer,file-name}-completion-ignore-case was that they allow
getting information with less effort, in that by typing either a lower
or an upper case character, you would see names that have either or both
cases.  And that is apparently what I (thought I) had experienced with
ASCII characters but not with non-ASCII characters, which I assume is
what prompted my OP.  Unfortunately, the recipe in my OP did not include
the `bah' and `bAh' cases as a sanity check, and now I find the same
behavior with them as reported above for the non-ASCII cases.  So it
seems either the handling of the ASCII cases has changed since my OP, or
I was mistaken at the time in thinking there was a difference.  I also
followed up my OP more than a year later, reporting that the bug still
existed and adding a further observation
(https://lists.gnu.org/archive/html/bug-gnu-emacs/2013-07/msg00340.html).
And regarding the latter, on recent master that does indeed show a
difference between ASCII and non-ASCII characters:

0. touch /tmp/{bah,bAG,bäh,bÄg}
1. emacs-master -Q --eval '(setq read-buffer-completion-ignore-case t read-file-name-completion-ignore-case t)' /tmp/{bah,bAg,bäh,bÄg}
2. C-x b *scratch*
3a. C-x b ba TAB
   => *Completions* pops up showing `bAg' and `bah'
3b. C-x b bA TAB
   => *Completions* pops up showing `bAg' and `bah'
4a. C-g C-x b bä TAB
   => *Completions* pops up showing `bÄg' and `bäh'
4b. C-g C-x b bÄ TAB
   => *Completions* pops up showing `bÄg' and `bäh'
5a. C-g C-x C-f /tmp/ba TAB
   => *Completions* pops up showing `bAg' and `bah'
5b. C-g C-x C-f /tmp/bA TAB
   => *Completions* pops up showing `bAg' and `bah'
6a. C-g C-x C-f /tmp/bä TAB
  => completes to /tmp/bäh
6a. C-g C-x C-f /tmp/bÄ TAB
  => completes to /tmp/bÄg

Steve Berman





  reply	other threads:[~2019-11-01 22:37 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
2019-11-01 19:57 ` Stefan Kangas
2019-11-01 20:20   ` Eli Zaretskii
2019-11-01 22:37     ` Stephen Berman [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8xvz0hp.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=11339@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=stefan@marxist.se \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).