[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 7b31de4: Add hook for all events

From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 7b31de4: Add hook for all events
Date: Wed, 23 Jan 2019 21:06:14 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Short answer: input methods break completion provided by both company
> and my own pabbrev. For example, try copying the company-mode
> documentation into *scratch*, M-x text-mode, M-x company-mode, M-x
> set-input-method "italian-postfix". Now type "Comple". You should see
> something like:
> Compl
> Complements
> Complete
> Completing
> Completion
> Complex
> e_[]
> where e_ is e underscore and [] is the cursor and the lines in the
> middle are offered completions.
> The problem is that company uses pre-command-hook to remove old offered
> completions. But self-insert hasn't run yet, because the user hasn't
> decided whether to type "e" or "e'". With this hook, I can pick up the
> intermediate keypresses.

So, IIUC the issue is to detect when to pop down the completions offered
by the likes of company/pabbrev/...
And the idea is that those packages can stop using pre-command-hook and
use input-event-functions.

So, IIUC now company will pop down its menu as soon as you hit a prefix
key like C-x or C-c, right?  Is that a desirable or undesirable

I guess the previously available alternative was to use sit-for to wait
for the next event, right (and indeed, I think input-event-functions is
a better option than sit-for)?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]