From: Sean Whitton <spwhitton@spwhitton.name>
To: Eli Zaretskii <eliz@gnu.org>
Cc: joaotavora@gmail.com, 72826@debbugs.gnu.org, juri@linkov.net
Subject: bug#72826: 30.0.90; icomplete-in-buffer becomes unusably slow in large Eshell
Date: Fri, 04 Oct 2024 22:09:54 +0800 [thread overview]
Message-ID: <87bk00x8lp.fsf@melete.silentflame.com> (raw)
In-Reply-To: <86o740xeyy.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Oct 2024 14:52:21 +0300")
[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]
Hello,
On Fri 04 Oct 2024 at 02:52pm +03, Eli Zaretskii wrote:
> I actually wonder whether the current code does TRT when there are
> embedded newlines, regardless of whether it's slow or not. Can you
> look at that? If the current code works correctly, then I think your
> analysis of what is wrong with it might not be correct/complete, and
> there's some other factor at work here.
>
> IOW, I think we should understand the issue and its root causes
> completely before we discuss the solution.
I played around with this a bit.
Firstly, I previously mentioned newlines in the input or candidates.
But Icomplete isn't really meant to work at all with candidates
containing newlines, so this part of the display algorithm certainly
doesn't. So let's ignore that. It's an extreme edge case.
(I'm not sure any of the completion infrastructure in Emacs is meant to
be able to handle candidates containing newlines.)
So, what we are interested in is the case of embedded newlines in the
minibuffer prompt, where the last line of the prompt is shorter than
previous lines, such that (string-width (buffer-string)) would give an
answer that's too large.
1. emacs -q
2. M-x icomplete-mode
3. (setopt icomplete-show-matches-on-no-input t)
4. (completing-read "Here we go: " obarray)
[-- Attachment #2: melete_2024-10-04_22.04.57.png --]
[-- Type: image/png, Size: 19406 bytes --]
[-- Attachment #3: Type: text/plain, Size: 91 bytes --]
5. C-g
6. (completing-read "Here we go here we go
here we go: " obarray)
This displays:
[-- Attachment #4: melete_2024-10-04_22.06.00.png --]
[-- Type: image/png, Size: 17791 bytes --]
[-- Attachment #5: Type: text/plain, Size: 192 bytes --]
This is wrong -- fewer candidates are displayed than there is space for,
and there is a big empty gap.
I believe this supports my analysis and the patch I posted.
Thanks.
--
Sean Whitton
next prev parent reply other threads:[~2024-10-04 14:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 7:26 bug#72826: 30.0.90; icomplete-in-buffer becomes unusably slow in large Eshell Sean Whitton
2024-08-27 12:43 ` Eli Zaretskii
2024-10-03 14:28 ` Sean Whitton
2024-10-03 15:16 ` Eli Zaretskii
2024-10-04 0:20 ` Sean Whitton
2024-10-04 6:11 ` Eli Zaretskii
2024-10-04 9:02 ` Sean Whitton
2024-10-04 10:53 ` Eli Zaretskii
2024-10-04 11:02 ` Sean Whitton
2024-10-04 11:52 ` Eli Zaretskii
2024-10-04 14:09 ` Sean Whitton [this message]
2024-10-04 14:33 ` Eli Zaretskii
2024-10-05 0:21 ` Sean Whitton
2024-10-05 7:16 ` Eli Zaretskii
2024-10-05 7:44 ` Sean Whitton
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=87bk00x8lp.fsf@melete.silentflame.com \
--to=spwhitton@spwhitton.name \
--cc=72826@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joaotavora@gmail.com \
--cc=juri@linkov.net \
/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.