all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#61647: edit-kbd-macro: Wrong type argument: characterp, 134217785
@ 2023-02-20  5:31 Eduardo Ochs
  2023-02-20 11:39 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Eduardo Ochs @ 2023-02-20  5:31 UTC (permalink / raw)
  To: 61647

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

Hi all, I found a keyboard macro on which edit-kbd-macro fails with
this error:

  edit-kbd-macro: Wrong type argument: characterp, 134217785

To reproduce the error run any of these two setqs - they should be
equivalent -

  (setq last-kbd-macro [134217847 134217785 134217785 134217834 5 32
    25 1 67108896 down 134217847 134217777 134217834 return 25
    134217803 134217803])

  (setq last-kbd-macro (kbd "M-w M-99 M-j C-e SPC C-y C-a C-SPC <down>
    M-w M-1 M-j RET C-y 2*M-K"))

and then run `M-x edit-kbd-macro C-x e'.

The error happens in this version of Emacs,

  GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
  3.24.24, cairo version 1.16.0) of 2023-02-20

but not in an Emacs28. Here's the output of uname -a:

  Linux scylla 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21)
  x86_64 GNU/Linux

Cheers,
  Eduardo Ochs
  http://anggtwu.net/#eev

[-- Attachment #2: Type: text/html, Size: 1132 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#61647: edit-kbd-macro: Wrong type argument: characterp, 134217785
  2023-02-20  5:31 bug#61647: edit-kbd-macro: Wrong type argument: characterp, 134217785 Eduardo Ochs
@ 2023-02-20 11:39 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-02-20 12:18   ` Mattias Engdegård
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-20 11:39 UTC (permalink / raw)
  To: Eduardo Ochs; +Cc: mattiase, 61647

Eduardo Ochs <eduardoochs@gmail.com> writes:

> Hi all, I found a keyboard macro on which edit-kbd-macro fails with
> this error:
>
>   edit-kbd-macro: Wrong type argument: characterp, 134217785
>
> To reproduce the error run any of these two setqs - they should be
> equivalent -
>
>   (setq last-kbd-macro [134217847 134217785 134217785 134217834 5 32
>     25 1 67108896 down 134217847 134217777 134217834 return 25
>     134217803 134217803])
>
>   (setq last-kbd-macro (kbd "M-w M-99 M-j C-e SPC C-y C-a C-SPC <down>
>     M-w M-1 M-j RET C-y 2*M-K"))
>
> and then run `M-x edit-kbd-macro C-x e'.
>

This is the commit that introduced this regression:

commit e5695faec4a43f10be3b56fa7fd436d5f54a5761
Author: Mattias Engdegård <mattiase@acm.org>
Date:   Fri Aug 19 13:27:53 2022 +0200

    * lisp/edmacro.el (edmacro-sanitize-for-string): Fix condition.
    
    This is of little consequence in practice since the input is always a
    vector of keys representing a prefix, where bit 7 isn't likely to be
    set when higher bits are set, but it silences a (justified) warning.

diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index efffab9b30b..26a5d2347f0 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -626,7 +626,7 @@ edmacro-sanitize-for-string
 This function assumes that the events can be stored in a string."
   (setq seq (copy-sequence seq))
   (cl-loop for i below (length seq) do
-           (when (logand (aref seq i) 128)
+           (when (/= (logand (aref seq i) 128) 0)
              (setf (aref seq i) (logand (aref seq i) 127))))
   seq)
 
Adding Mattias to the CC.





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#61647: edit-kbd-macro: Wrong type argument: characterp, 134217785
  2023-02-20 11:39 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-20 12:18   ` Mattias Engdegård
  2023-02-20 13:05     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Mattias Engdegård @ 2023-02-20 12:18 UTC (permalink / raw)
  To: Daniel Martín; +Cc: Eduardo Ochs, 61647-done

20 feb. 2023 kl. 12.39 skrev Daniel Martín <mardani29@yahoo.es>:

> This is the commit that introduced this regression:

Sorry about that mistake, and thank you very much for finding it!
Now fixed on master.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#61647: edit-kbd-macro: Wrong type argument: characterp, 134217785
  2023-02-20 12:18   ` Mattias Engdegård
@ 2023-02-20 13:05     ` Eli Zaretskii
  2023-02-21  9:33       ` Mattias Engdegård
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-02-20 13:05 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: 61647, eduardoochs

> Resent-To: bug-gnu-emacs@gnu.org
> Cc: Eduardo Ochs <eduardoochs@gmail.com>, 61647-done@debbugs.gnu.org
> From: Mattias Engdegård <mattiase@acm.org>
> Date: Mon, 20 Feb 2023 13:18:33 +0100
> 
> 20 feb. 2023 kl. 12.39 skrev Daniel Martín <mardani29@yahoo.es>:
> 
> > This is the commit that introduced this regression:
> 
> Sorry about that mistake, and thank you very much for finding it!
> Now fixed on master.

Thanks, but the bug exists also on the emacs-29 branch, so I think it
should be fixed there.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#61647: edit-kbd-macro: Wrong type argument: characterp, 134217785
  2023-02-20 13:05     ` Eli Zaretskii
@ 2023-02-21  9:33       ` Mattias Engdegård
  0 siblings, 0 replies; 5+ messages in thread
From: Mattias Engdegård @ 2023-02-21  9:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 61647, eduardoochs

20 feb. 2023 kl. 14.05 skrev Eli Zaretskii <eliz@gnu.org>:

> Thanks, but the bug exists also on the emacs-29 branch, so I think it
> should be fixed there.

Certainly, now backported.






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-21  9:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-20  5:31 bug#61647: edit-kbd-macro: Wrong type argument: characterp, 134217785 Eduardo Ochs
2023-02-20 11:39 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-20 12:18   ` Mattias Engdegård
2023-02-20 13:05     ` Eli Zaretskii
2023-02-21  9:33       ` Mattias Engdegård

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.