GNU bug report logs - #74404
[PATCH] Give Completion Preview bindings higher precedence

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Sun, 17 Nov 2024 16:31:02 UTC

Severity: wishlist

Tags: patch

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 74404 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74404 <at> debbugs.gnu.org
Subject: Re: bug#74404: [PATCH] Give Completion Preview bindings higher
 precedence
Date: Sun, 17 Nov 2024 18:31:03 +0100
Hi,

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> To fix this issue, we need to give the active completion preview
>>> bindings higher precedence than keymaps of minor modes that where
>>> defined after loading completion-preview.el.  The patch below does that
>>> by using minor-mode-overriding-map-alist.  Any thoughts?
>>
>> Can't you instead use the 'keymap' text or overlay property?  That
>> would avoid the "arms race" of precedences.

I thought about that, but no, we can't easily use that, since the
overlay is not necessarily at point: it is generally at the end of the
symbol, and point may be at the middle of the symbol.

>> Adding Stefan, in case he has comments or suggestions.
>
> Assuming the minor mode is disabled as soon as point moves away from the
> completion, I wouldn't have a clear preference between `keymap` and
> `minor-mode-overriding-map-alist`.

Indeed, the minor mode is disabled as soon as the completion preview is
dismissed for whatever reason, including moving point elsewhere.

> BTW, maybe we should add some notion of minor mode precedence since such
> problems are actually fairly common.  We could do something similar to
> what we do with `add-hook`, so `add-minor-mode` takes care of obeying
> the ordering constraints.

That'd be nice, I think.


Thanks,

Eshel




This bug report was last modified 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.