GNU bug report logs - #74619
macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw

Previous Next

Package: emacs;

Reported by: Yoichi Nakayama <yoichi.nakayama <at> gmail.com>

Date: Sat, 30 Nov 2024 07:42:02 UTC

Severity: normal

Tags: fixed

Fixed in version 31.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Yoichi Nakayama <yoichi.nakayama <at> gmail.com>, 74619 <at> debbugs.gnu.org
Subject: bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
Date: Mon, 02 Dec 2024 15:49:18 +0100
Robert Pluim <rpluim <at> gmail.com> writes:

>>>>>> On Sat, 30 Nov 2024 16:40:53 +0900, Yoichi Nakayama <yoichi.nakayama <at> gmail.com> said:
>
>     Yoichi> I found that bug#55940 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55940)
>     Yoichi> has not been fixed on Emacs started by "emacs -nw"
>
>     Yoichi> (substitute-command-keys "\\[customize]")
>     Yoichi> #("<ns-show-prefs>" 0 15 (font-lock-face help-key-binding face
>     Yoichi> help-key-binding))
>
>     Yoichi> I think this is because make-non-key-event for ns-* is not called
>     Yoichi> in this situation.
>
> Right, but OTOH typical terminal setups donʼt allow you to use super
> as a modifier anyway (unless Gerd has a magic recipe). I guess it
> couldnʼt do too much harm to call the ns-specific portion of
> `x-setup-function-keys' even when not in a graphical frame, but Iʼm
> not sure where we could hook that into.
>
> Robert

I think I have even 2 magic recipes :-).

1. Use a terminal like iTerm that supports the Kitty Keyboard Protocol,
and use kkp.el in Emacs. Example from my Emacs C-h k Command-M g ives

  s-m runs the command magit-file-dispatch (found in global-map), which
  is an autoloaded interactive native-comp-function in ‘magit-files.el’.

That requires some fiddling with iTerm key settings so that iTerm itself
doesn't use the Command keys one wants to define.

  https://sw.kovidgoyal.net/kitty/keyboard-protocol/
  https://github.com/benjaminor/kkp


2. Use something like Devil

  https://github.com/susam/devil/blob/main/devil.el

In short, that can map input like `. x' to `s-x'. I think there is at
least one other similar package named God, but I haven't tried that.




This bug report was last modified 165 days ago.

Previous Next


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