GNU bug report logs - #7631
24.0.50; inconsistency in event-convert-list and event-basic-type

Previous Next

Package: emacs;

Reported by: Don March <don <at> ohspite.net>

Date: Mon, 13 Dec 2010 06:17:02 UTC

Severity: normal

Tags: moreinfo

Found in version 24.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Don March <don <at> ohspite.net>
Cc: 7631 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: bug#7631: 24.0.50; inconsistency in event-convert-list and event-basic-type
Date: Sun, 18 Jul 2021 12:09:43 -0400
Don March wrote:
> (event-convert-list
>  (append (event-modifiers event)
>         (list (event-basic-type event)))) ; => 116, not t
>
> In my mind, this should be an identity function (in the mathematical
> sense) for events;

In general, it literally can't be: there are several "equivalent"
representations of a given event and `event-convert-list` should return
a "canonical" version.  E.g. it should return `C-M-return` when `event`
is `M-C-return`.

There is no "canonical event" `t`, instead Emacs uses `?t` as the
canonical event for hitting the key `t`.

Lars wrote:
> So if this isn't a bug (and I think it would be problematic to change
> the return value at this point), the doc string is at least slightly
> misleading here, and shouldn't claim that it returns exactly the same
> base event type.

Fair enough,


        Stefan





This bug report was last modified 3 years and 306 days ago.

Previous Next


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