GNU bug report logs - #64912
28.2; insert-kbd-macro creates a unicode character for Alt prefixed keysequences

Previous Next

Package: emacs;

Reported by: Johnathan Mantey <johnathanx.mantey <at> intel.com>

Date: Fri, 28 Jul 2023 07:12:01 UTC

Severity: normal

Tags: fixed

Found in version 28.2

Fixed in version 29.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Johnathan Mantey <johnathanx.mantey <at> intel.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 64912 <at> debbugs.gnu.org
Subject: Re: bug#64912: 28.2; insert-kbd-macro creates a unicode character for
 Alt prefixed keysequences
Date: Fri, 28 Jul 2023 07:01:12 -0700
On 7/28/23 02:57, Robert Pluim wrote:
>>>>>> On Thu, 27 Jul 2023 10:47:24 -0700, Johnathan Mantey <johnathanx.mantey <at> intel.com> said:
>      Johnathan> I created a keyboard macro that used the zap-to-char (Alt-z) keyboard
>      Johnathan> sequence.
>      Johnathan> The macro functions correctly in the session in which it was created.
>      Johnathan> The macro is given a name.
>      Johnathan> The macro is inserted into an elisp file using insert-kbd-macro.
>      Johnathan> The macro, abbreviated here, creates an invalid character.
>      Johnathan>    (fset 'test-macro
>      Johnathan>    (kmacro-lambda-form [?\C-a ?ú ?\; ?\C-k] 0 "%d"))
>      Johnathan> Evaluating this form causes the named macro to quit working.
>      Johnathan> Instead of performing zap-to-char ';' it inserts the unicode char.
>      Johnathan> Rerecording the macro using ESC, naming, and saving results in:
>      Johnathan> macro to function correctly.
>      Johnathan>    (fset 'test-macro
>      Johnathan>    (kmacro-lambda-form [?\C-a escape ?z ?\; ?\C-k] 0 "%d"))
>      Johnathan> Re-evaluating this source results in the macro functioning correctly.
>
> This works correctly in emacs-29, where the resulting macro form now
> uses the `key-parse' syntax instead of the internal vector syntax, so
> you get:
>
>      (defalias 'test-macro
>         (kmacro "C-a M-z ; C-k"))
>
>  From etc/NEWS:
>
> ** Kmacro
> Kmacros are now OClosures and have a new constructor 'kmacro' which
> uses the 'key-parse' syntax.  It replaces the old 'kmacro-lambda-form'
> (which is now declared obsolete).

I had a saved macro in the kmacro form. It must have been a result of 
compiling and using source code in active development. I had some issue 
with using the leading edge, and returned to my distributions 28.2 
released version. The two versions aren't in sync, and I forgot how I 
had an out of cycle Emacs in use, and probably active when I first 
created that keyboard macro.

Thank you for your triage, and response.

-- 
Johnathan Mantey
Senior Software Engineer
*azad te**chnology partners*
Contributing to Technology Innovation since 1992
Phone: (503) 712-6764
Email: johnathanx.mantey <at> intel.com





This bug report was last modified 2 years and 24 days ago.

Previous Next


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