* bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
@ 2024-11-30 7:40 Yoichi Nakayama
2024-12-02 14:09 ` Robert Pluim
0 siblings, 1 reply; 8+ messages in thread
From: Yoichi Nakayama @ 2024-11-30 7:40 UTC (permalink / raw)
To: 74619
I found that bug#55940 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55940)
has not been fixed on Emacs started by "emacs -nw"
(substitute-command-keys "\\[customize]")
#("<ns-show-prefs>" 0 15 (font-lock-face help-key-binding face
help-key-binding))
I think this is because make-non-key-event for ns-* is not called
in this situation.
Tested environment:
GNU Emacs 29.4 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60
Version 12.6.6 (Build 21G646)) of 2024-08-03
--
Yoichi NAKAYAMA
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
2024-11-30 7:40 bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw Yoichi Nakayama
@ 2024-12-02 14:09 ` Robert Pluim
2024-12-02 14:49 ` Gerd Möllmann
2024-12-04 13:53 ` Yoichi Nakayama
0 siblings, 2 replies; 8+ messages in thread
From: Robert Pluim @ 2024-12-02 14:09 UTC (permalink / raw)
To: Yoichi Nakayama; +Cc: Gerd Möllmann, 74619
>>>>> On Sat, 30 Nov 2024 16:40:53 +0900, Yoichi Nakayama <yoichi.nakayama@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
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
2024-12-02 14:09 ` Robert Pluim
@ 2024-12-02 14:49 ` Gerd Möllmann
2024-12-04 13:53 ` Yoichi Nakayama
1 sibling, 0 replies; 8+ messages in thread
From: Gerd Möllmann @ 2024-12-02 14:49 UTC (permalink / raw)
To: Robert Pluim; +Cc: Yoichi Nakayama, 74619
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Sat, 30 Nov 2024 16:40:53 +0900, Yoichi Nakayama <yoichi.nakayama@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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
2024-12-02 14:09 ` Robert Pluim
2024-12-02 14:49 ` Gerd Möllmann
@ 2024-12-04 13:53 ` Yoichi Nakayama
2024-12-04 14:38 ` Robert Pluim
1 sibling, 1 reply; 8+ messages in thread
From: Yoichi Nakayama @ 2024-12-04 13:53 UTC (permalink / raw)
To: Robert Pluim; +Cc: Gerd Möllmann, 74619
> Right, but OTOH typical terminal setups donʼt allow you to use super
> as a modifier anyway (unless Gerd has a magic recipe).
It's not true. We can run commands that use super with "C-x @ s" instead.
I think there is no way to enter ns-*.
On Mon, Dec 2, 2024 at 11:09 PM Robert Pluim <rpluim@gmail.com> wrote:
>
> >>>>> On Sat, 30 Nov 2024 16:40:53 +0900, Yoichi Nakayama <yoichi.nakayama@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
> --
--
Yoichi NAKAYAMA
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
2024-12-04 13:53 ` Yoichi Nakayama
@ 2024-12-04 14:38 ` Robert Pluim
2024-12-06 13:46 ` Yoichi Nakayama
0 siblings, 1 reply; 8+ messages in thread
From: Robert Pluim @ 2024-12-04 14:38 UTC (permalink / raw)
To: Yoichi Nakayama; +Cc: Gerd Möllmann, 74619
>>>>> On Wed, 4 Dec 2024 22:53:43 +0900, Yoichi Nakayama <yoichi.nakayama@gmail.com> said:
>> Right, but OTOH typical terminal setups donʼt allow you to use super
>> as a modifier anyway (unless Gerd has a magic recipe).
Yoichi> It's not true. We can run commands that use super with "C-x @ s" instead.
Yoichi> I think there is no way to enter ns-*.
Thatʼs true, Iʼd forgotten about that.
So calling the right bits of `x-setup-function-keys' would fix this,
but I have no clue where we could call that from. Perhaps we can add a
"term/ns-common.el" and load that from "loadup.el" when (featurep 'ns)
? Except then it would probably end up being called twice when using
GUI emacs on macOS.
Robert
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
2024-12-04 14:38 ` Robert Pluim
@ 2024-12-06 13:46 ` Yoichi Nakayama
2024-12-06 15:16 ` Robert Pluim
0 siblings, 1 reply; 8+ messages in thread
From: Yoichi Nakayama @ 2024-12-06 13:46 UTC (permalink / raw)
To: Robert Pluim; +Cc: Gerd Möllmann, 74619
I think it is not necessary to call `x-setup-function-keys` for emacs -nw,
because the docstring says that it is for graphical frames.
Just moving the `make-non-key-event` calls in `x-setup-function-keys` to the
toplevel of term/common-win.el fixes the problem.
On Wed, Dec 4, 2024 at 11:38 PM Robert Pluim <rpluim@gmail.com> wrote:
>
> >>>>> On Wed, 4 Dec 2024 22:53:43 +0900, Yoichi Nakayama <yoichi.nakayama@gmail.com> said:
>
> >> Right, but OTOH typical terminal setups donʼt allow you to use super
> >> as a modifier anyway (unless Gerd has a magic recipe).
>
> Yoichi> It's not true. We can run commands that use super with "C-x @ s" instead.
> Yoichi> I think there is no way to enter ns-*.
>
> Thatʼs true, Iʼd forgotten about that.
>
> So calling the right bits of `x-setup-function-keys' would fix this,
> but I have no clue where we could call that from. Perhaps we can add a
> "term/ns-common.el" and load that from "loadup.el" when (featurep 'ns)
> ? Except then it would probably end up being called twice when using
> GUI emacs on macOS.
>
> Robert
> --
--
Yoichi NAKAYAMA
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
2024-12-06 13:46 ` Yoichi Nakayama
@ 2024-12-06 15:16 ` Robert Pluim
2024-12-06 16:22 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Robert Pluim @ 2024-12-06 15:16 UTC (permalink / raw)
To: Yoichi Nakayama; +Cc: Gerd Möllmann, 74619
>>>>> On Fri, 6 Dec 2024 22:46:23 +0900, Yoichi Nakayama <yoichi.nakayama@gmail.com> said:
Yoichi> I think it is not necessary to call `x-setup-function-keys` for emacs -nw,
Yoichi> because the docstring says that it is for graphical frames.
Yoichi> Just moving the `make-non-key-event` calls in `x-setup-function-keys` to the
Yoichi> toplevel of term/common-win.el fixes the problem.
If that works, ok. It does feel a little hacky to just stick stuff at
the toplevel of term/common-win.el. What do the maintainers think?
(would it work to move them to term/ns-win.el instead?)
Robert
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
2024-12-06 15:16 ` Robert Pluim
@ 2024-12-06 16:22 ` Eli Zaretskii
0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2024-12-06 16:22 UTC (permalink / raw)
To: Robert Pluim; +Cc: yoichi.nakayama, gerd.moellmann, 74619
> Cc: Gerd Möllmann <gerd.moellmann@gmail.com>,
> 74619@debbugs.gnu.org
> From: Robert Pluim <rpluim@gmail.com>
> Date: Fri, 06 Dec 2024 16:16:19 +0100
>
> >>>>> On Fri, 6 Dec 2024 22:46:23 +0900, Yoichi Nakayama <yoichi.nakayama@gmail.com> said:
>
> Yoichi> I think it is not necessary to call `x-setup-function-keys` for emacs -nw,
> Yoichi> because the docstring says that it is for graphical frames.
> Yoichi> Just moving the `make-non-key-event` calls in `x-setup-function-keys` to the
> Yoichi> toplevel of term/common-win.el fixes the problem.
>
> If that works, ok. It does feel a little hacky to just stick stuff at
> the toplevel of term/common-win.el. What do the maintainers think?
> (would it work to move them to term/ns-win.el instead?)
I admit that I don't understand the issue, and not how an NS-specific
problem is solved in common-win.el. Can you summarize the
discussion's conclusions till now?
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-12-06 16:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-30 7:40 bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw Yoichi Nakayama
2024-12-02 14:09 ` Robert Pluim
2024-12-02 14:49 ` Gerd Möllmann
2024-12-04 13:53 ` Yoichi Nakayama
2024-12-04 14:38 ` Robert Pluim
2024-12-06 13:46 ` Yoichi Nakayama
2024-12-06 15:16 ` Robert Pluim
2024-12-06 16:22 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).