GNU bug report logs - #68022
30.0.50; File cache completions accumulate instead of replacing minibuffer input

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: Eshel Yaron <me@HIDDEN>; dated Mon, 25 Dec 2023 06:55:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 68022) by debbugs.gnu.org; 25 Dec 2023 17:35:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 25 12:35:46 2023
Received: from localhost ([127.0.0.1]:55279 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rHorh-0005MA-V9
	for submit <at> debbugs.gnu.org; Mon, 25 Dec 2023 12:35:46 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:40560 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1rHorf-0005M2-Tq
 for 68022 <at> debbugs.gnu.org; Mon, 25 Dec 2023 12:35:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1703525736;
 bh=0Tz4j+b3v46zMENLbOlLkfo9OAjsj4Dsck7cy3UD4k0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=igs3S8EngO58NJ3zKngmzDRaoyIvd5yndX7jUs5imC/0qq6eVmsAQ0PP0ELRthLKf
 QoYyNCG4sRMx0QXlNdEHcp2tdHuTihkqYI+zJT2lGS7ax4mbHS+56bdDEMuSJBwBTZ
 isBb1EeX6J/cxnDLptd+IFInc7DmFWFmr8ThbySqyMxIFRYRbQJ8zGDbw5tnsQMIdw
 D6hGBVSG1hHscHCuYdkIhiBnmxW2vwN7zpHilwXubDj0C3fjavkEcjmjN7wbOfUtHv
 qpfjfjla0Q4Vn8UBjAMbOzzQXjyoVCNEqpd6ZB8Zce0YPindkDLlx9dTJvDaGvxjUF
 5aFMF6PbqH/0w==
From: Eshel Yaron <me@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#68022: 30.0.50; File cache completions accumulate instead
 of replacing minibuffer input
In-Reply-To: <83le9i9qgb.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 25 Dec
 2023 18:50:28 +0200")
References: <m17cl2db6p.fsf@HIDDEN> <8334vqbge3.fsf@HIDDEN>
 <m1jzp2xuk7.fsf@HIDDEN> <83sf3q9vbi.fsf@HIDDEN>
 <m134vqxpaw.fsf@HIDDEN> <83le9i9qgb.fsf@HIDDEN>
X-Hashcash: 1:20:231225:eliz@HIDDEN::1GE2ARf+zBzs2b0S:14Te
X-Hashcash: 1:20:231225:68022 <at> debbugs.gnu.org::lS35DCvLHeECHRO2:58Ki
Date: Mon, 25 Dec 2023 18:35:34 +0100
Message-ID: <m1tto6w5g9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 68022
Cc: 68022 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Eshel Yaron <me@HIDDEN>
>> Cc: 68022 <at> debbugs.gnu.org
>> Date: Mon, 25 Dec 2023 16:41:27 +0100
>>
>> Instead of using `file-cache-add-directory-using-find`, you can also set
>> `file-cache-alist` directly:
>>
>> --8<---------------cut here---------------start------------->8---
>> (setq file-cache-alist
>>       '(("bar" "/foo")
>>         ("baz" "/foo")
>>         ("bad" "/foo")
>>         ("bay" "/foo")
>>         ("ban" "/foo")))
>> --8<---------------cut here---------------end--------------->8---
>>
>> Then `C-x C-f ba C-TAB M-<down> M-<down> ...` should show the issue.
>>
>> Earlier I wrote that the same issue appears in Emacs 29.1, but now I
>> tested that again and I think I might have been mistaken.  In Emacs 29.1
>> I see a different issue: `M-<down>` in the above recipe emits an error:
>>
>> --8<---------------cut here---------------start------------->8---
>> Wrong type argument: number-or-marker-p, ""
>> --8<---------------cut here---------------end--------------->8---
>>
>> and doesn't change the minibuffer contents.
>
> That's what I see in Emacs 29.  So are we talking about one problem or
> two different problems?

Well, the same interaction yields two different unexpected results
depending on which Emacs you're running: in Emacs 29.1 we get an error,
and on master each completion candidate is appended to the previous one
in the minibuffer instead of replacing it.  In both cases, it seems that
`M-<down>` doesn't do the right thing when the *Completions* buffer is
showing file cache completions.




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

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


Received: (at 68022) by debbugs.gnu.org; 25 Dec 2023 16:50:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 25 11:50:48 2023
Received: from localhost ([127.0.0.1]:55230 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rHoAC-0004oj-F7
	for submit <at> debbugs.gnu.org; Mon, 25 Dec 2023 11:50:48 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:39008)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rHoA9-0004oW-T8
 for 68022 <at> debbugs.gnu.org; Mon, 25 Dec 2023 11:50:46 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rHo9x-0002ww-Pj; Mon, 25 Dec 2023 11:50:33 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=mGsx09sxL2rsHSBqnras4ISQMnic88I/POxjPpgIZQE=; b=l/UqTSvn5V6o
 364pL18nCiTP7+QDWIgffA76jukhyqmyiSGMiMJI6Tcu4Xdt2GBV/2etzb6SfwUGdKwfpcRQlXOPd
 TmILc+qyCwCdqWwI7fSD0ajxxKwBktLWYHPigLjeX25jI2yX7pVo0ZX+tte8+bJJ3uU9N/CTuOlVZ
 g62WDYsL/3tolN8pA/lMYqcpyUng8BnPQsn+GMpowKvC06dNP1hWwo8ETo4qIO6DDbWFVN4dVSu/v
 c2ISm895055HPkLS8fgdL4t14cJPuuxyM8997DX7aEay1YoEDRDdsqodeGIbi46r/FoKXDoo2Eq4W
 X5pxZWg+vrjF6T14hMbEAw==;
Date: Mon, 25 Dec 2023 18:50:28 +0200
Message-Id: <83le9i9qgb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m134vqxpaw.fsf@HIDDEN> (message from Eshel Yaron on Mon, 
 25 Dec 2023 16:41:27 +0100)
Subject: Re: bug#68022: 30.0.50; File cache completions accumulate instead
 of replacing minibuffer input
References: <m17cl2db6p.fsf@HIDDEN> <8334vqbge3.fsf@HIDDEN>
 <m1jzp2xuk7.fsf@HIDDEN> <83sf3q9vbi.fsf@HIDDEN>
 <m134vqxpaw.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68022
Cc: 68022 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -3.3 (---)

> From: Eshel Yaron <me@HIDDEN>
> Cc: 68022 <at> debbugs.gnu.org
> Date: Mon, 25 Dec 2023 16:41:27 +0100
> 
> Instead of using `file-cache-add-directory-using-find`, you can also set
> `file-cache-alist` directly:
> 
> --8<---------------cut here---------------start------------->8---
> (setq file-cache-alist
>       '(("bar" "/foo")
>         ("baz" "/foo")
>         ("bad" "/foo")
>         ("bay" "/foo")
>         ("ban" "/foo")))
> --8<---------------cut here---------------end--------------->8---
> 
> Then `C-x C-f ba C-TAB M-<down> M-<down> ...` should show the issue.
> 
> Earlier I wrote that the same issue appears in Emacs 29.1, but now I
> tested that again and I think I might have been mistaken.  In Emacs 29.1
> I see a different issue: `M-<down>` in the above recipe emits an error:
> 
> --8<---------------cut here---------------start------------->8---
> Wrong type argument: number-or-marker-p, ""
> --8<---------------cut here---------------end--------------->8---
> 
> and doesn't change the minibuffer contents.

That's what I see in Emacs 29.  So are we talking about one problem or
two different problems?




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

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


Received: (at 68022) by debbugs.gnu.org; 25 Dec 2023 15:41:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 25 10:41:40 2023
Received: from localhost ([127.0.0.1]:55127 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rHn5H-0006TI-UR
	for submit <at> debbugs.gnu.org; Mon, 25 Dec 2023 10:41:40 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:36388 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1rHn5E-0006T7-NM
 for 68022 <at> debbugs.gnu.org; Mon, 25 Dec 2023 10:41:38 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1703518889;
 bh=eWrOcRJ5gjR397CssXPTNfvXswh2R48cWiQROMxRcGE=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=ainISWcesv2mTMSdJRa6DUdDoghkrYxQc/QWyT0zogdjV0x9FaJXuG2g1AEqr0BiY
 I+t5NdKUktbdNi9+1Snnbw8hlj5dqQKE6DtkX3MM4VauOJNwpdkaIWn7vn+iYqal6G
 bhUpnvO6fxOldzGHsUDTZMdIpregj14EdzXMusFeESD+IIUKNgTANnT9Ec7pe/iQs9
 8ZpaSXO/n8MH09aNcPJKysrwdztxqTr8kHekW25Eh466QzaO07NVibBIW8gg/vP8vE
 IWggPp2dT2xhXoVELLG8f0OMct9JTel/gTEKwualDyFgSrobt/xhtx+PgCIakz/vTX
 VfF6FVlhOV5yA==
From: Eshel Yaron <me@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#68022: 30.0.50; File cache completions accumulate instead
 of replacing minibuffer input
In-Reply-To: <83sf3q9vbi.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 25 Dec
 2023 17:05:21 +0200")
References: <m17cl2db6p.fsf@HIDDEN> <8334vqbge3.fsf@HIDDEN>
 <m1jzp2xuk7.fsf@HIDDEN> <83sf3q9vbi.fsf@HIDDEN>
Date: Mon, 25 Dec 2023 16:41:27 +0100
Message-ID: <m134vqxpaw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 68022
Cc: 68022 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Eshel Yaron <me@HIDDEN>
>> Cc: 68022 <at> debbugs.gnu.org
>> Date: Mon, 25 Dec 2023 14:47:52 +0100
>>
>> Eli Zaretskii <eliz@HIDDEN> writes:
>>
>> >> Date: Mon, 25 Dec 2023 07:54:22 +0100
>> >> From:  Eshel Yaron
>> >>
>> >> With emacs -Q:
>> >>
>> >> 1. M-x file-cache-add-directory-using-find /path/to/emacs/
>> >> 2. C-x C-f mini C-TAB
>> >> 3. Observe the *Completions* buffer pop up with file cache
>> >> completions, suggesting as usual to "type M-<down> or M-<up> to move
>> >> point between completions."
>> >> 4. M-<down> M-<down> M-<up> ...
>> >> 5. Each candidate you highlight this way is inserted in the minibuffer
>> >> after the current input, instead of replacing the appropriate part of
>> >> the input.
>> >>
>> >> I see this already in Emacs 29.1, FWIW.
>> >
>> > Something is missing in the recipe above, because I get "No match"
>> > when I press C-TAB in step 2.  What did I miss?
>>
>> Hmm, I'm not sure.  Perhaps `file-cache-add-directory-using-find` didn't
>> do its job for some reason?
>
> How do I verify that?

`M-x file-cache-display` should show the cache contents.

> Could you perhaps show at least some of the cache and tell how to
> compare that with what I get here?

Sure, here's what I see after `M-x keep-lines RET mini RET` in the
output buffer of `M-x file-cache-display`:

--8<---------------cut here---------------start------------->8---
/Users/eshelyaron/emacs-29.1/src/deps/minibuf.d
/Users/eshelyaron/emacs-29.1/src/minibuf.c
/Users/eshelyaron/emacs-29.1/native-lisp/29_1_50-1fe1a1fd/preloaded/minibuffer-1b0f548b-7af20c5f.eln
/Users/eshelyaron/emacs-29.1/doc/emacs/mini.texi
/Users/eshelyaron/emacs-29.1/doc/lispref/minibuf.texi
/Users/eshelyaron/emacs-29.1/lib/mini-gmp.c
/Users/eshelyaron/emacs-29.1/lib/mini-gmp.h
/Users/eshelyaron/emacs-29.1/lib/mini-gmp-gnulib.c
/Users/eshelyaron/emacs-29.1/test/src/minibuf-tests.el
/Users/eshelyaron/emacs-29.1/test/lisp/minibuffer-tests.el
/Users/eshelyaron/emacs-29.1/test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion
/Users/eshelyaron/emacs-29.1/test/lisp/minibuffer-resources/lisp/cedet/semantic-utest-c.test
/Users/eshelyaron/emacs-29.1/test/lisp/minibuffer-resources/lisp/cedet/semantic-utest.test
/Users/eshelyaron/emacs-29.1/test/lisp/minibuffer-resources
/Users/eshelyaron/emacs-29.1/lisp/minibuf-eldef.el
/Users/eshelyaron/emacs-29.1/lisp/minibuffer.el
/Users/eshelyaron/emacs-29.1/lisp/use-package/use-package-diminish.el
--8<---------------cut here---------------end--------------->8---

>> > Is the above supposed to work in any Emacs source tree?  Also, what
>> > should be the default-directory in step 1 (if it's important) --
>> > should it be the root of the Emacs source tree?
>>
>> That shouldn't matter, I think, as long as you have several files with
>> "mini" in their names in the cache.
>
> If I invoke 'find' from the shell prompt, I get this:
>
>   D:\gnu\git\emacs\branch>find . -name "mini*"
>   ./doc/emacs/mini.texi
>   ./doc/lispref/minibuf.texi
>   ./lib/mini-gmp-gnulib.c
>   ./lib/mini-gmp.c
>   ./lib/mini-gmp.h
>   ./lisp/minibuf-eldef.el
>   ./lisp/minibuf-eldef.elc
>   ./lisp/minibuffer.el
>   ./lisp/minibuffer.elc
>   ./src/deps/minibuf.d
>   ./src/minibuf.c
>   ./src/minibuf.o
>   ./test/lisp/minibuffer-resources
>   ./test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion
>   ./test/lisp/minibuffer-tests.el
>   ./test/lisp/minibuffer-tests.elc
>   ./test/src/minibuf-tests.el
>
> Do you get something very different?

No, I get more or less the same.


Instead of using `file-cache-add-directory-using-find`, you can also set
`file-cache-alist` directly:

--8<---------------cut here---------------start------------->8---
(setq file-cache-alist
      '(("bar" "/foo")
        ("baz" "/foo")
        ("bad" "/foo")
        ("bay" "/foo")
        ("ban" "/foo")))
--8<---------------cut here---------------end--------------->8---

Then `C-x C-f ba C-TAB M-<down> M-<down> ...` should show the issue.

Earlier I wrote that the same issue appears in Emacs 29.1, but now I
tested that again and I think I might have been mistaken.  In Emacs 29.1
I see a different issue: `M-<down>` in the above recipe emits an error:

--8<---------------cut here---------------start------------->8---
Wrong type argument: number-or-marker-p, ""
--8<---------------cut here---------------end--------------->8---

and doesn't change the minibuffer contents.


Thanks,

Eshel




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

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


Received: (at 68022) by debbugs.gnu.org; 25 Dec 2023 15:05:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 25 10:05:43 2023
Received: from localhost ([127.0.0.1]:55073 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rHmWU-0000JC-MF
	for submit <at> debbugs.gnu.org; Mon, 25 Dec 2023 10:05:43 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:49136)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rHmWP-0000Iv-13
 for 68022 <at> debbugs.gnu.org; Mon, 25 Dec 2023 10:05:40 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rHmWC-0004He-UE; Mon, 25 Dec 2023 10:05:24 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=ptCx5mkDIJacvrnwWhVpXkkFl9Jt9ma7Lb3IYsKgR9M=; b=VkZ8Oc9lNN+c
 5sDkixvli13FLOgiyL4dq31e+RgYCykQmTHOOWeoaE3NtL+ZTaIQ6Z+iJgrslf0eUMS3ekUtTAtsU
 Ofj6hxIrdPEoiOWtLrW2J67pRkZIDTnM+KwJw6tOG+u0J15KeT26gFeQyvGtEbSXauYhSKDKZtXGJ
 tRPcH0UmekDYeIB219oXNtw+NuPRcH94lSey4YltBbNB9/+zp+srncnzJU6eZVxXqCTeSRiuRCDEE
 FVFrKdh0g/wDY9Vuo0m2Jwfn2jUDsRVevCUX2t7yzlXs+GpgTDj+BNu3WIzeCfQhJV0Eq2sQd3SPI
 vVn4hLEBg4/YoQP+N/vhLw==;
Date: Mon, 25 Dec 2023 17:05:21 +0200
Message-Id: <83sf3q9vbi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m1jzp2xuk7.fsf@HIDDEN> (message from Eshel Yaron on Mon, 
 25 Dec 2023 14:47:52 +0100)
Subject: Re: bug#68022: 30.0.50; File cache completions accumulate instead
 of replacing minibuffer input
References: <m17cl2db6p.fsf@HIDDEN> <8334vqbge3.fsf@HIDDEN>
 <m1jzp2xuk7.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68022
Cc: 68022 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -3.3 (---)

> From: Eshel Yaron <me@HIDDEN>
> Cc: 68022 <at> debbugs.gnu.org
> Date: Mon, 25 Dec 2023 14:47:52 +0100
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> Date: Mon, 25 Dec 2023 07:54:22 +0100
> >> From:  Eshel Yaron
> >>
> >> With emacs -Q:
> >>
> >> 1. M-x file-cache-add-directory-using-find /path/to/emacs/
> >> 2. C-x C-f mini C-TAB
> >> 3. Observe the *Completions* buffer pop up with file cache
> >> completions, suggesting as usual to "type M-<down> or M-<up> to move
> >> point between completions."
> >> 4. M-<down> M-<down> M-<up> ...
> >> 5. Each candidate you highlight this way is inserted in the minibuffer
> >> after the current input, instead of replacing the appropriate part of
> >> the input.
> >>
> >> I see this already in Emacs 29.1, FWIW.
> >
> > Something is missing in the recipe above, because I get "No match"
> > when I press C-TAB in step 2.  What did I miss?
> 
> Hmm, I'm not sure.  Perhaps `file-cache-add-directory-using-find` didn't
> do its job for some reason?

How do I verify that?  Could you perhaps show at least some of the
cache and tell how to compare that with what I get here?

> > Is the above supposed to work in any Emacs source tree?  Also, what
> > should be the default-directory in step 1 (if it's important) --
> > should it be the root of the Emacs source tree?
> 
> That shouldn't matter, I think, as long as you have several files with
> "mini" in their names in the cache.

If I invoke 'find' from the shell prompt, I get this:

  D:\gnu\git\emacs\branch>find . -name "mini*"
  ./doc/emacs/mini.texi
  ./doc/lispref/minibuf.texi
  ./lib/mini-gmp-gnulib.c
  ./lib/mini-gmp.c
  ./lib/mini-gmp.h
  ./lisp/minibuf-eldef.el
  ./lisp/minibuf-eldef.elc
  ./lisp/minibuffer.el
  ./lisp/minibuffer.elc
  ./src/deps/minibuf.d
  ./src/minibuf.c
  ./src/minibuf.o
  ./test/lisp/minibuffer-resources
  ./test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion
  ./test/lisp/minibuffer-tests.el
  ./test/lisp/minibuffer-tests.elc
  ./test/src/minibuf-tests.el

Do you get something very different?




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

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


Received: (at 68022) by debbugs.gnu.org; 25 Dec 2023 13:48:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 25 08:48:08 2023
Received: from localhost ([127.0.0.1]:54187 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rHlJP-0001lC-N6
	for submit <at> debbugs.gnu.org; Mon, 25 Dec 2023 08:48:08 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:44778 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1rHlJK-0001kZ-82
 for 68022 <at> debbugs.gnu.org; Mon, 25 Dec 2023 08:48:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1703512075;
 bh=qIhOYJpu7dLeZeAWWU2Gkcv1viUJEysiRFdbqBoR768=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=fxrVezzGuCKCfDKrmuvqx9mwVUqhZLuBCDTkTLICziuB90dq/xaiKYR5ZMygSUblS
 NbmcB9LH3csPjquH8jPrTd9X8cp+s2mwwWadYWhCXbP+kOB01RKvdFpd3MMq8PVK+u
 tD4IZEgk0WiyAWY/LMA+dUzU/bAuI8nISWAupUpzOOMR2vHAXiTyAJLBoDIHrTodnQ
 O7J/zJ89nm1PCBwgcsIFatRN+ZFG8fSTRwWYG3JZHsZe5icIKgCMIFag9DBR70MZFu
 slcQ6V+DwakiMDOq4PfRAcCMNkiaMROc4MS3kMoo98EmUGH8e6+Rbh54LShGHjgzwe
 lfqxSqm3VLhSA==
From: Eshel Yaron <me@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#68022: 30.0.50; File cache completions accumulate instead
 of replacing minibuffer input
In-Reply-To: <8334vqbge3.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 25 Dec
 2023 14:44:52 +0200")
References: <m17cl2db6p.fsf@HIDDEN> <8334vqbge3.fsf@HIDDEN>
Date: Mon, 25 Dec 2023 14:47:52 +0100
Message-ID: <m1jzp2xuk7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 68022
Cc: 68022 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Date: Mon, 25 Dec 2023 07:54:22 +0100
>> From:  Eshel Yaron
>>
>> With emacs -Q:
>>
>> 1. M-x file-cache-add-directory-using-find /path/to/emacs/
>> 2. C-x C-f mini C-TAB
>> 3. Observe the *Completions* buffer pop up with file cache
>> completions, suggesting as usual to "type M-<down> or M-<up> to move
>> point between completions."
>> 4. M-<down> M-<down> M-<up> ...
>> 5. Each candidate you highlight this way is inserted in the minibuffer
>> after the current input, instead of replacing the appropriate part of
>> the input.
>>
>> I see this already in Emacs 29.1, FWIW.
>
> Something is missing in the recipe above, because I get "No match"
> when I press C-TAB in step 2.  What did I miss?

Hmm, I'm not sure.  Perhaps `file-cache-add-directory-using-find` didn't
do its job for some reason?  The point is just to add a bunch of file
names to the cache.

> Is the above supposed to work in any Emacs source tree?  Also, what
> should be the default-directory in step 1 (if it's important) --
> should it be the root of the Emacs source tree?

That shouldn't matter, I think, as long as you have several files with
"mini" in their names in the cache.  Any other invocation of `C-TAB`
that pops the *Completions* buffer should show the same behavior AFAICT.






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

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


Received: (at 68022) by debbugs.gnu.org; 25 Dec 2023 12:45:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 25 07:45:13 2023
Received: from localhost ([127.0.0.1]:54118 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rHkKX-0004UF-1E
	for submit <at> debbugs.gnu.org; Mon, 25 Dec 2023 07:45:13 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:38176)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rHkKS-0003xs-8E
 for 68022 <at> debbugs.gnu.org; Mon, 25 Dec 2023 07:45:11 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rHkKG-0003ru-3a; Mon, 25 Dec 2023 07:44:56 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=4I90W5+e1P41yH/JK74rUQxdIi4bq1hV4Q1yzxK34FM=; b=fOqS0zl7GB7t
 /O92DSD5BEQxNOxCGHXGA+S344mdzo4bQgCX3kE60wTj+ge33/IXyCnburtfojdNmjyA5UNBhAWvr
 1/HlX/+m5yitCcv/4jPXGkDkPOevp9+xuVBxo2VF78mkNg6vp6Iid5PR+kWQNSA+rquf/FiCTMMRP
 wouQdn8gQez/TYDqVCINHqkCUq3z4nFkPJNlvLtgXVE8bhMK4v0XqFuWsqFv1lOcxtjqlC8sXlk47
 i3nGDZeZ4gZ8cRZSBUXfVisRT4Xe5s56okVakn+k6YkPw31AojweentRwIJcO+fdKZWhB7nYqvzE5
 Di5vcyVZD9L5P8NomBLyEg==;
Date: Mon, 25 Dec 2023 14:44:52 +0200
Message-Id: <8334vqbge3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m17cl2db6p.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#68022: 30.0.50;
 File cache completions accumulate instead of replacing minibuffer
 input
References: <m17cl2db6p.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68022
Cc: 68022 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -3.3 (---)

> Date: Mon, 25 Dec 2023 07:54:22 +0100
> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> 
> With emacs -Q:
> 
> 1. M-x file-cache-add-directory-using-find /path/to/emacs/
> 2. C-x C-f mini C-TAB
> 3. Observe the *Completions* buffer pop up with file cache
> completions, suggesting as usual to "type M-<down> or M-<up> to move
> point between completions."
> 4. M-<down> M-<down> M-<up> ...
> 5. Each candidate you highlight this way is inserted in the minibuffer
> after the current input, instead of replacing the appropriate part of
> the input.
> 
> I see this already in Emacs 29.1, FWIW.

Something is missing in the recipe above, because I get "No match"
when I press C-TAB in step 2.  What did I miss?  Is the above supposed
to work in any Emacs source tree?  Also, what should be the
default-directory in step 1 (if it's important) -- should it be the
root of the Emacs source tree?

Thanks.

P.S. Btw, C-TAB doesn't get bound on a TTY, even though I can emulate
C-TAB by typing "C-x @ c TAB".




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

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


Received: (at submit) by debbugs.gnu.org; 25 Dec 2023 06:54:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 25 01:54:45 2023
Received: from localhost ([127.0.0.1]:53818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rHerM-0001u5-SU
	for submit <at> debbugs.gnu.org; Mon, 25 Dec 2023 01:54:45 -0500
Received: from lists.gnu.org ([2001:470:142::17]:34024)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1rHerI-0001to-QB
 for submit <at> debbugs.gnu.org; Mon, 25 Dec 2023 01:54:43 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1rHer5-0003wS-JW
 for bug-gnu-emacs@HIDDEN; Mon, 25 Dec 2023 01:54:27 -0500
Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1rHer4-0004v2-83
 for bug-gnu-emacs@HIDDEN; Mon, 25 Dec 2023 01:54:27 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1703487264;
 bh=ddcVVAyKdnyiWqVjEABTPnTeQ+IrAAXNR829LcIMgWg=;
 h=From:To:Subject:Date:From;
 b=q/rigjp+ikzpA/BPgkT7bcs5AsDyMKKzf5kY1MQy3rB9/G5knsrN83bKTn/8CqrAh
 aFek0pm4zt0BCvn12S1RBVxwZ0W0+j3W1A+lQyjYVJzxn1NFM32OgdhDXrAdJ58VXJ
 3bv8gcwpuWCkL72GT5McE2CmIAxdACttu3Gwas6q1TIHPGuViWEVG0zUH4zzJr8O+5
 M0kZNOhRBM/j3rM4+LbXESeuxqU6AMHiSVJ5cZmYaJffHJ/C4/vsyiDEWggZTffjA3
 K6N24IhHoaOKLlXdmjEwljbW9DGNfo0HZ5OegQ6F5BYqrTchMdnBWIq0oWACnU9YVt
 lxP4OJCvnE0Sg==
From: Eshel Yaron <me@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; File cache completions accumulate instead of replacing
 minibuffer input
X-Debbugs-Cc: 
Date: Mon, 25 Dec 2023 07:54:22 +0100
Message-ID: <m17cl2db6p.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN;
 helo=eshelyaron.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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.1 (/)


With emacs -Q:

1. M-x file-cache-add-directory-using-find /path/to/emacs/
2. C-x C-f mini C-TAB
3. Observe the *Completions* buffer pop up with file cache
completions, suggesting as usual to "type M-<down> or M-<up> to move
point between completions."
4. M-<down> M-<down> M-<up> ...
5. Each candidate you highlight this way is inserted in the minibuffer
after the current input, instead of replacing the appropriate part of
the input.

I see this already in Emacs 29.1, FWIW.


Best,

Eshel


In GNU Emacs 30.0.50 (build 7, x86_64-apple-darwin23.0.0, NS
 appkit-2487.00 Version 14.0 (Build 23A344)) of 2023-12-23
Repository revision: 1727e1f8462009b461976f45957e47de6d34c6eb
Repository branch: main
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.0




Acknowledgement sent to Eshel Yaron <me@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#68022; 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: Sat, 20 Jan 2024 12:30:02 UTC

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