unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29833: icomplete re-build the completion table after each key press
@ 2017-12-24  8:58 Shuguang Sun
  2017-12-25 14:40 ` Shuguang Sun
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Shuguang Sun @ 2017-12-24  8:58 UTC (permalink / raw)
  To: 29833

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-23 12:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-24  8:58 bug#29833: icomplete re-build the completion table after each key press Shuguang Sun
2017-12-25 14:40 ` 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

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).