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


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

From: Yoichi Nakayama <yoichi.nakayama <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: gerd.moellmann <at> gmail.com, rpluim <at> gmail.com, 74619 <at> debbugs.gnu.org
Subject: Re: bug#74619: macOS: <ns-show-prefs> displayed as keybinding for
 \\[customize] on emacs -nw
Date: Sun, 8 Dec 2024 10:01:16 +0900
The problem I reported is that
  (substitute-command-keys "\\[customize]")
results in "<ns-show-prefs>".

This is caused by defining global key mapping in term/ns-win.el:
  (define-key global-map [ns-show-prefs] 'customize)
without make-non-key-event call for ns-*.

So, if term/ns-win.el is not loaded and the problem doesn't occur.
That is why I said:

> If term/ns-win.el is not loaded, no need to call make-non-key-event for ns-".
> It is because global-set-key for ns-" is only in term/ns-win.el.

(Sorry. I wrote "global-set-key" by mistake, it was "define-key
global-map" in fact)

* Emacs built with --without-ns doesn't load term/ns-win.el (in this
case, the problem doesn't occur)
* Emacs built with --with-ns does load term/ns-win.el even in -nw process

Therefore, putting make-non-key-event for non-key events ns-* in the
toplevel of term/ns-win.el solve the problem, and I also think
term/ns-win.el is better place as you said "NS specific code should
definitely go to ns-win.el".

On Sat, Dec 7, 2024 at 4:32 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Yoichi Nakayama <yoichi.nakayama <at> gmail.com>
> > Date: Sat, 7 Dec 2024 05:20:42 +0900
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, Robert Pluim <rpluim <at> gmail.com>, 74619 <at> debbugs.gnu.org
> >
> > > I configure --without-ns, and ns-win.el is not loaded in that case.
> >
> > If term/ns-win.el is not loaded, no need to call make-non-key-event for ns-".
> > It is because global-set-key for ns-" is only in term/ns-win.el.
>
> Sorry, I don't understand: are you saying that those keys don't need
> to be supported in the --without-ns build?  Then what exactly is the
> meaning of --with-ns for -nw sessions?  Isn't NS a kind-of
> window-system?



-- 
Yoichi NAKAYAMA




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.