Subject: bug#11906: 24.1; completion-at-point failures

From: Leo Liu <[email-masked]>
Date: Fri, 06 Dec 2013 22:04:43 +0800

On 2013-12-06 21:15 +0800, Dmitry Gutov wrote:
> But that function is fast! Compared to doing the actual completion,
> the time it takes to `(funcall hookfun)' should be negligible:
>
> ELISP> (js2-time (setq ocap (with-current-buffer "*Inferior Octave*"
> (octave-completion-at-point))))
> 0.0
> ELISP> (js2-time (with-current-buffer "*Inferior Octave*" (funcall
> (nth 2 ocap) "a" nil t)))
> 0.0055

I see. Let's consider the performance issue fixed for now.

Another issue as mentioned in the report is when you complete, for
example, 'abc' to 'aa bb cc' (or whatever strange chars are in the
completion candidate) and the completion function fails to go back to
the start.

Can this be improved? On a case to base basis the completion function
could use a marker so that it can subsequently find the starting point.
But can minibuffer.el handle this so that all completion function don't
need to worry about this?

Also instead of calling completion function to check if start has
changed to decide to exit completion-in-region-mode, how about let any
char insertion or deletion exit the mode instead?

Leo