all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 38458@debbugs.gnu.org
Subject: bug#38458: 27.0.50; case-insensitive substring completion
Date: Mon, 02 Dec 2019 22:37:19 +0100	[thread overview]
Message-ID: <87fti2v27k.fsf@rub.de> (raw)
In-Reply-To: <8336e2lanc.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 02 Dec 2019 22:45:11 +0200")

On Mon, 02 Dec 2019 22:45:11 +0200 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stephen Berman <stephen.berman@gmx.net>
>> Date: Mon, 02 Dec 2019 19:56:26 +0100
>>
>> Typing TAB for case-insensitive substring completion of file and buffer
>> names can put the cursor in the wrong position in the minibuffer.  To
>> reproduce:
>>
>> 0. $ mkdir /tmp/test; touch /tmp/test/{testing,Testing}
>> 1. $ emacs-master -Q --eval "(setq read-buffer-completion-ignore-case t
>>      read-file-name-completion-ignore-case t completion-category-overrides
>>      '((buffer (styles substring)) (file (styles substring))))"
>> 2. Type `C-x C-f /tmp/test/tes TAB'
>> => The minibuffer displays this, with point (^) after `s' in `testing':
>> Find file: /tmp/test/testing
>>                         ^
>> 3. Visit /tmp/test/testing and /tmp/test/Testing, then from a buffer
>> other than these, e.g. /temp/test, type `C-x b tes TAB'
>>
>> => The minibuffer displays this, with point (^) after `s' in `testing':
>> Switch to buffer (default *scratch*): testing
>>                                          ^
>>
>> I think these are unintended side effects of these two changes:
>
> If those changes caused this issue, then I think there was already a
> bug in the substring completion style, which was just exposed by those
> changes.
>
> CC'ing Stefan in the hope that he could show us the light.

FWIW, when I step through completion--do-completion at step 2 in the
above recipe, the return value of completion-try-completion is
("/tmp/test/testing" . 17) in builds before commit 0b21ecdb5e and
("/tmp/test/testing" . 13) in builds after that commit.  Consequently,
on executing (forward-char (- comp-pos (length completion))) later in
completion--do-completion, point moves back 4 characters in later builds
and stays put in earlier builds.

Steve Berman





  reply	other threads:[~2019-12-02 21:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 18:56 bug#38458: 27.0.50; case-insensitive substring completion Stephen Berman
2019-12-02 20:45 ` Eli Zaretskii
2019-12-02 21:37   ` Stephen Berman [this message]
2019-12-03 14:47   ` Stefan Monnier
2019-12-03 15:51     ` Eli Zaretskii
2019-12-03 17:01     ` Stephen Berman
2019-12-03 18:03       ` Stefan Monnier

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=87fti2v27k.fsf@rub.de \
    --to=stephen.berman@gmx.net \
    --cc=38458@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.