From: Shuguang Sun <shuguang@gmail.com>
To: 29833@debbugs.gnu.org
Subject: bug#29833: icomplete re-build the completion table after each key press
Date: Sun, 24 Dec 2017 16:58:28 +0800 [thread overview]
Message-ID: <CACspjXfWqLKDW9OxXs98HaGm1WXg8YqLXzwnX0KmMyi=-LgjRQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1997 bytes --]
Hi,
The icomplete re-build the completion table
'completion-all-sorted-completions' after each key press. However, I think
it should keep the 'completion-all-sorted-completions' builded at beging
and re-use it afterwise.
At least in Windows, GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of
2017-12-09.
How to repeat it:
1: emacs -q
2: icomplete-mode (we can't find anything wired unless we call
dired-do-copy on a network-mapped remote file under a slow network)
3: modify function icomplete-exhibit to log as below:
insert '(print completion-all-sorted-completions)' between
'(save-excursion (goto-char (point-max))' and '(if (and (or
icomplete-show-matches-on-no-input', and C-M-x.
Then it will print 'nil' after each key press which means
'completion-all-sorted-completions' is empty.
4. modify function icomplete-completions to log as below:
insert '(print completion-all-sorted-completions)' at the begining of
the function body, prior to "(let* ((minibuffer-completion-table
candidates)'.
Then it will print 'nil' after each key press which means
'completion-all-sorted-completions' is empty.
Thereby, it has to call "(comps (completion-all-sorted-completions
(icomplete--field-beg) (icomplete--field-end)))' in function
icomplete-completions to re-build the completiong table after each key
press.
Thanks *Stefan Monnier *to point out it should be a bug in the help
maillist.
By the way, '(sequencep (icomplete--completion-table))' in function
icomplete-exhibit always returns 'nil', and the
icomplete-delay-completions-threshold actually has no effect.
(print (icomplete--completion-table)) just returns the table name (function
to generate the table), but not the content of the table.
By the way again, if call dired-do-copy or dired-do-rename,
icomplete-max-delay-chars counts the whole path of the file because, the
path has been put to the minibuffer automatically. This may not a bug,
however, I think it should be documented.
Best Regards,
Shuguang Sun
[-- Attachment #2: Type: text/html, Size: 2524 bytes --]
next reply other threads:[~2017-12-24 8:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-24 8:58 Shuguang Sun [this message]
2017-12-25 14:40 ` bug#29833: icomplete re-build the completion table after each key press Shuguang Sun
2018-01-06 7:27 ` Shuguang Sun
2020-09-21 14:27 ` Lars Ingebrigtsen
2020-09-21 17:47 ` Stefan Monnier
2021-07-23 12:51 ` Lars Ingebrigtsen
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='CACspjXfWqLKDW9OxXs98HaGm1WXg8YqLXzwnX0KmMyi=-LgjRQ@mail.gmail.com' \
--to=shuguang@gmail.com \
--cc=29833@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 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).