What are you using for showing command completions? That looks a like which-key. If that's the case, I think you should modify which-key-idle-delay:
Delay (in seconds) for which-key buffer to popup. This
variable should be set before activating which-key-mode.
A value of zero might lead to issues, so a non-zero value is
This answer is for using command icicle-find-file-absolute, which is similar in most regards to icicle-locate.
But icicle-locate uses a prefix arg differently, passing it to system-command locate. So icicle-locate doesn't handle the use of a prefix arg to make multi-completion candidates include also a last modification-date middle component.
I don't know if this is the best solution, but it works.
(defun evil*-complete-previous () (interactive)
(let ((old (string (char-syntax ?_))))
(modify-syntax-entry ?_ "w")
(modify-syntax-entry ?_ old)))
(define-key evil-insert-state-map (kbd "M-p") 'evil*-complete-previous)
IIRC, Currently, the only way icomplete offers to control it is via icomplete-with-completion-tables which is rather inflexible. Of course, you could enable/disable it for specific commands by advising those commands and temporarily rebinding icomplete-with-completion-tables accordingly.
This is a modified version of @chen-bin's answer which uses a wrapper function instead of using advice (avoids interfering with other uses). It also generalizes the syntax checking to allow checking for other kinds of syntax.
(defun company-complete-common-use-context ()
(faces-found (face-at-point nil t))
You can use hippie-expand:
(setq hippie-expand-try-functions-list '(try-expand-line))
(global-set-key (kbd "C-;") 'hippie-expand)
Now C-; should expand to the closest matching line. Repeating the command will get you all the matches.
Finally, if you want a popup menu with the choices listed there are some hacky ways of plugging hippie-expand into company-...
Your completion-function is a function, but not a proper completion table (it does not obey all the expected behavior).
I recommend you use completion-table-dynamic to build a proper completion table function from a function that simply lists all the possible completions.
(defun my-completion-function (prefix)
;; You can just ignore the prefix
abbrev can abbreviate text. Use a numeric argument to say how many words before point should be taken as the expansion. For example, to abbreviate the sentence "The cat and the mooon." as x, put the point at the end and do
C-u 5 C-x a g x <RET>
The emacs manual (info) for Abbrevs gives the details.