unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11906: 24.1; completion-at-point failures
@ 2012-07-11  5:54 Leo
  2012-07-12 14:00 ` Stefan Monnier
  0 siblings, 1 reply; 34+ messages in thread
From: Leo @ 2012-07-11  5:54 UTC (permalink / raw)
  To: 11906

Hello Stefan,

Despite these critical points, I have witnessed great improvement over
completions in earlier versions of Emacs. So thanks.

Assume three candidates (ObjC selectors) for completion and
completion-cycle-threshold is 5:

  1. stringWithContentsOfFile:
  2. stringWithContentsOfFile:encoding:error:
  3. stringWithContentsOfFile:usedEncoding:error:

After cycling a few times, I see:
[NSString stringWithContentsOfFile:stringWithContentsOfFile:encoding:error:stringWithContentsOfFile:usedEncodin$

i.e. succeeding completion failed to remove previous one before
inserting its own, it is, in this case, due to : in the completions. But
the problem is general, completion-at-point can be tripped over by chars
in the completion candidates. I can imagine it fails too if completion
contains spaces.

I dug a bit and realised that completion-at-point depended too much on
members in completion-at-point-functions. Those functions are called
multiple times for each trigger of completion. So it can be extremely
slow when the calculation is slow. For example, preparing the completion
table in ObjC could take a few seconds for libclang to analyse the
source and turn the output into something suitable for consumption in
Emacs. It seems completion-at-point should be able to do its entire work
after obtaining once the data from those functions. This would free
users of completion-at-point-functions from worrying about caching.

completion-at-point also invokes those functions in order to decide when
to exit. This causes problems illustrated at the beginning of this
report and, for example, I have also experienced delay in inserting
space, dot, etc following a completion.

Leo





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

end of thread, other threads:[~2013-12-09  2:27 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-11  5:54 bug#11906: 24.1; completion-at-point failures Leo
2012-07-12 14:00 ` Stefan Monnier
2013-05-10  6:38   ` Leo Liu
2013-05-10 20:36     ` Stefan Monnier
2013-05-11  1:50       ` Leo Liu
2013-05-11  3:40         ` Stefan Monnier
2013-05-11  4:47           ` Leo Liu
2013-05-11 14:51             ` Stefan Monnier
2013-05-13  1:28               ` Leo Liu
2013-05-13 15:27                 ` Stefan Monnier
2013-05-14  0:56                   ` Leo Liu
2013-05-14  2:53                     ` Stefan Monnier
2013-05-14  3:30                       ` Leo Liu
2013-05-11 20:18             ` Andreas Röhler
2013-05-11 23:11           ` Daimrod
2013-05-13 15:28             ` Stefan Monnier
2013-05-21 23:39           ` Dmitry Gutov
2013-05-22 19:16             ` Stefan Monnier
2013-12-05  3:23               ` Dmitry Gutov
2013-12-05  4:33                 ` Stefan Monnier
2013-12-06  1:02                   ` Dmitry Gutov
2013-12-06  4:00                     ` Leo Liu
2013-12-06  4:32                       ` Dmitry Gutov
2013-12-06  5:36                         ` Leo Liu
2013-12-06 13:15                           ` Dmitry Gutov
2013-12-06 14:04                             ` Leo Liu
2013-12-06 17:35                               ` Stefan Monnier
2013-12-07  2:05                                 ` Leo Liu
2013-12-07 22:45                                   ` Stefan Monnier
2013-12-06 17:36                               ` Stefan Monnier
2013-12-07  2:02                               ` Dmitry Gutov
2013-12-07  2:40                                 ` Leo Liu
2013-12-07 16:13                                   ` Dmitry Gutov
2013-12-09  2:27                                     ` Leo Liu

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