[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Completion with (:exclusive 'no) is called twice, and doesn't pass o
From: |
Vitalie Spinu |
Subject: |
Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion. |
Date: |
Fri, 16 Mar 2012 13:18:55 +0100 |
User-agent: |
Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (gnu/linux) |
>>>> Vitalie Spinu <address@hidden>
>>>> on Fri, 16 Mar 2012 12:05:14 +0100 wrote:
> Hi,
> The completion in emacs 24 is called twice. For example
> (defun foo-completion ()
> (when (save-excursion (re-search-backward "\\<\\w*" (point-at-bol) t))
> (let ((token (match-string-no-properties 0))
> (beg (match-beginning 0))
> (end (match-end 0)))
> (message "%s:" token)
> (when (= end (point))
> (list beg end (list "aaaa" "aaaaaaa" "bbbb" "truncat") :exclusive
'no)))))
> (add-to-list 'completion-at-point-functions 'foo-completion)
> ;; it is now (foo-completion lisp-completion-at-point t)
> Place your point at the end of 'aaaa and you try to complete. I am
> getting
> aaa:
> aaaa:
> in my message buffer. Which means the completion is called twice. I hope
> this is not an intended behavior, as it might seriously interfere with
> custom completion. For example I might want to have a different behavior
> on the second consequent invocation of the completion (give a message,
> modify the candidates etc).
A related issue. Position after 'aaaa, try to complete. You will get a
"Sole completion" message. Press "space" or "M-b", or whatever, you will
get a message "aaaa:" which means that completion is repeated after any
other command. This is really bad, as my completion is calling an
external process and stalls emacs for a second, badly interfering with
the editing.
> Second problem is that if the completion is sole, the handling is not
> passed over. For example after 'truncat I am getting a message "Sole
> completion" and the lisp-completion-at-point is not reached at all. I
> believe it's not how it should work.
> In all the rest, new completion system is virtually perfect, thanks.
> Vitalie.
- Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Vitalie Spinu, 2012/03/16
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion.,
Vitalie Spinu <=
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Stefan Monnier, 2012/03/16
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Vitalie Spinu, 2012/03/17
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Stefan Monnier, 2012/03/17
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Lennart Borgman, 2012/03/17
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Vitalie Spinu, 2012/03/17
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Stefan Monnier, 2012/03/17
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Vitalie Spinu, 2012/03/18
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Stefan Monnier, 2012/03/18
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Vitalie Spinu, 2012/03/18
- Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion., Stefan Monnier, 2012/03/18