Keyboard Maestro macro bound to Hot Key does not work inside a gnuemacs window

I have a macro which Inserts Text by Typing bound to Hot Key Opt-u. This Hot Key works fine in a Terminal window. It inserts the text I specified. But it doesn't work at all in a gnuemacs window, no matter what the buffer type.It's emacs 27.2 (9.0) on MacOs Big Sur 11.6. Please advise.

Hi Deron

When you say it doesn't work, I assume you mean that the text does not get inserted… but do you get a system beep? Have you checked the logs¹ for any messages getting sent to them at the same time as you run the command?


¹ Logs can be found here:

There is no beep. Also, there is nothing appearing in the logs.

Hey @Deron,

There's more than one variety of EMACS.

Which one are you using?

In the terminal or stand alone?

Please provide an appropriate link.

-Chris

It's emacs 27.2 (9.0) on MacOs Big Sur 11.6. Specifically the windowed version.

It's the distribution and GUI embedding that we need to know, rather than the version of emacs – I think that's why @ccstone asked you for a link.

It is this distribution:

https://emacsformacosx.com

?

1 Like

Yes. I believe this is what I used to download it. However, I am not 100% sure--It's been a while since I downloaded it. Is there any way to tell for sure?

Screenshot of the window ?

Hi @Deron. I just download and installed Emacs on my iMac—Mojave 10.14.6.

I created a one action macro to type the current date. It uses: Insert Text by Typing.

It worked!

On the other hand, if I used Insert Text by Pasting it did not.


EDIT: I should have read your posts more carefully. I triggered mine with a string: ,,date

I’ll try a Hot Key tomorrow.


EDIT2: I did more testing this morning. It works with both methods, i.e., typing or pasting. I'm not sure why the pasting method failed yesterday. Maybe I used a This string is typed trigger that had a special meaning in Emacs. (Or maybe I was just sleepy when I tested). Sorry if my message yesterday caused any confusion. I will create a new message with my test macro and screenshot.

1 Like

Is this running in X11 / XQuartz?

If so then my experience of using Insert Text By Typing (or Pasting) is VERY hit and miss. I put it down to X11 rather than Keyboard Maestro. But I could be wrong.

I've now tested on two Macs:

  • Monterey, v12.1; Mojave 10.14.16
  • Keyboard Maestro, v10.0.2
  • MacBookPro16,1, Macmini6,2
  • Emacs, Version 27.2 (9.0)

Here's my test macro and the screenshot of the results:

Emacs Test.kmmacros (3.6 KB)

Macro-image