From: Eli Zaretskii <eliz@gnu.org>
To: Eshel Yaron <me@eshelyaron.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: jm@pub.pink, 68213@debbugs.gnu.org
Subject: bug#68213: 30.0.50; completion-preview-tests failure in --without-x build
Date: Fri, 05 Jan 2024 13:54:57 +0200 [thread overview]
Message-ID: <83ttnsuh9q.fsf@gnu.org> (raw)
In-Reply-To: <m1y1d4s0z7.fsf@dazzs-mbp.home> (message from Eshel Yaron on Fri, 05 Jan 2024 08:17:32 +0100)
> From: Eshel Yaron <me@eshelyaron.com>
> Cc: jm@pub.pink, 68213@debbugs.gnu.org
> Date: Fri, 05 Jan 2024 08:17:32 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Eshel Yaron <me@eshelyaron.com>
> >>
> >> Eli Zaretskii <eliz@gnu.org> writes:
> >>
> >> > . does the problem happen only in a --without-x build?
> >> > . what "duplicate" definitions do we have there and why?
> >>
> >> The definition of `completion-preview--mouse-map` binds the events
> >> specified by both `mouse-wheel-up-event` and
> >> `mouse-wheel-up-alternate-event` to `completion-preview-prev-candidate`
> >> (using `defvar-keymap`). When these two variables have the same value,
> >> as apparently happens in John's `--without-x` build but could probably
> >> also occur in other setups, `defvar-keymap` complains (signals an error)
> >> about a duplicate definition. The duplication itself is harmless in
> >> this case, but there doesn't seem to be a way to tell `defvar-keymap`
> >> not to worry about it.
> >
> > We should try not to produce duplicate bindings here.
>
> I'm not sure how to do that without giving up on using `defvar-keymap`
> to define this keymap, which seems less elegant. That's why I asked for
> other ideas a couple of messages ago :)
>
> > Is there a real possibility that these will be the same events in GUI
> > builds?
>
> I don't know. It's certainly possible, but I can't tell how common it
> is for it to happen in practice.
I think the fact that we didn't hear about such problems means the
answer is NO. This problem happens only on TTY frames.
> > If so, the definition of bindings should detect that and avoid
> > duplicate bindings. But if this can only happen in a --without-x
> > build, then a solution can be much simpler: avoid binding any mwheel
> > events at all. That's why I asked that first question.
>
> Either way, `defvar-keymap` doesn't let us make this kind of choices.
> Should we drop it and instead use good old `defvar` along with
> `make-sparse-keymap` and `define-key` in this case?
>
> > In any case, I don't think this issue is significant enough to justify
> > any infrastructure changes in defvar-keymap.
>
> IIUC, `defvar-keymap` is not flexible enough to support this use case,
> or any case in which the programmer cannot guarantee in advance that all
> keys are distinct, which they can mostly do only if all keys are static.
> It's fairly easy to lift this limitation and make `defvar-keymap` useful
> in more situations, including this one, but if you prefer to keep
> `defvar-keymap` intact, I can propose a patch for this specific instance
> that'll make use of lower level interfaces instead of `defvar-keymap`.
Adding Stefan to the discussion in case he has any suggestions.
next prev parent reply other threads:[~2024-01-05 11:54 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 16:42 bug#68213: 30.0.50; completion-preview-tests failure in --without-x build john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-02 17:11 ` Eli Zaretskii
2024-01-02 17:20 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-02 17:42 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-03 7:20 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-03 17:27 ` Eli Zaretskii
2024-01-03 18:45 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-03 19:18 ` Eli Zaretskii
2024-01-05 7:17 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-05 11:54 ` Eli Zaretskii [this message]
2024-01-07 17:15 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-07 17:19 ` Eli Zaretskii
2024-01-07 16:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-08 1:51 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-08 3:19 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-08 6:16 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-08 12:48 ` Eli Zaretskii
2024-01-08 14:20 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-08 17:12 ` Eli Zaretskii
2024-01-09 1:01 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-08 15:21 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-09 1:39 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-09 4:11 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-09 6:07 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-09 14:44 ` Drew Adams
2024-01-02 17:48 ` Eli Zaretskii
2024-01-07 16:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-02 17:48 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-02 19:15 ` Eli Zaretskii
2024-01-02 22:49 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-06 9:42 ` Eli Zaretskii
2024-01-07 17:03 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-07 17:09 ` Eli Zaretskii
2024-01-07 17:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-13 0:16 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-13 6:55 ` Eli Zaretskii
2024-01-13 7:17 ` Stefan Kangas
2024-01-20 9:15 ` Eli Zaretskii
2024-01-20 20:19 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83ttnsuh9q.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=68213@debbugs.gnu.org \
--cc=jm@pub.pink \
--cc=me@eshelyaron.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.