From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 7b31de4: Add hook for all events Date: Wed, 23 Jan 2019 21:06:14 -0500 Message-ID: References: <20190122214637.25164.20429@vcs0.savannah.gnu.org> <20190122214639.B2E13203DD@vcs0.savannah.gnu.org> <40f2dac5-f342-b9f0-a792-796a6baf9a56@dancol.org> <87fttj55t8.fsf@russet.org.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="149624"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 24 03:21:31 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmUe3-000cod-Nu for ged-emacs-devel@m.gmane.org; Thu, 24 Jan 2019 03:21:31 +0100 Original-Received: from localhost ([127.0.0.1]:45140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmUe2-0005KZ-Lh for ged-emacs-devel@m.gmane.org; Wed, 23 Jan 2019 21:21:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmUbW-0003Lv-5g for emacs-devel@gnu.org; Wed, 23 Jan 2019 21:18:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmUPZ-0000wz-0G for emacs-devel@gnu.org; Wed, 23 Jan 2019 21:06:34 -0500 Original-Received: from [195.159.176.226] (port=53008 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmUPW-0000vX-G4 for emacs-devel@gnu.org; Wed, 23 Jan 2019 21:06:31 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gmUPM-000MLG-5A for emacs-devel@gnu.org; Thu, 24 Jan 2019 03:06:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:P05X5mGUroedbsHIF7uqDsxnFdU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232664 Archived-At: > 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 side-effect? 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)? Stefan