emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#37769: closed (global-set-key wrongly downcases th


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#37769: closed (global-set-key wrongly downcases the typed key (e.g. S-tab).)
Date: Sat, 19 Oct 2019 18:27:02 +0000

Your message dated Sat, 19 Oct 2019 18:26:41 +0000
with message-id <20191019182641.GC7911@ACM>
and subject line Re: bug#37769: global-set-key wrongly downcases the typed key 
(e.g. S-tab).
has caused the debbugs.gnu.org bug report #37769,
regarding global-set-key wrongly downcases the typed key (e.g. S-tab).
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
37769: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37769
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: global-set-key wrongly downcases the typed key (e.g. S-tab). Date: Tue, 15 Oct 2019 19:07:26 +0000 User-agent: Mutt/1.10.1 (2018-07-13)
Hello, Emacs

On the master branch, global-set-key calls read-key-sequence, but wrongly
fails to set the DONT-DOWNCASE-LAST argument.  The doc-string for
read-key-sequence rightly notes "A non-nil value is appropriate for
reading a key sequence to be defined.".

As a consequence, it is impossible to use M-x global-set-key to bind
S-tab on a tty where local-function-key-map converts S-tab to [33554441]
= 2^25 + 9.

The fix is easy:

diff --git a/lisp/subr.el b/lisp/subr.el
index 1a4a2e8b81..f3371dd2d7 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1120,7 +1120,7 @@ global-set-key
 that you make with this function."
   (interactive
    (let* ((menu-prompting nil)
-          (key (read-key-sequence "Set key globally: ")))
+          (key (read-key-sequence "Set key globally: " nil t)))
      (list key
            (read-command (format "Set key %s to command: "
                                  (key-description key))))))

This fix should also be safe, since it is only in the interactive spec
part of the function, and thus can only affect interactive use.

Any objections to me installing this fix on the master branch?

-- 
Alan Mackenzie (Nuremberg, Germany).



--- End Message ---
--- Begin Message --- Subject: Re: bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab). Date: Sat, 19 Oct 2019 18:26:41 +0000 User-agent: Mutt/1.10.1 (2018-07-13)
Hello, Eli.

On Sat, Oct 19, 2019 at 12:36:07 +0300, Eli Zaretskii wrote:
> > From: Lars Ingebrigtsen <address@hidden>
> > Cc: address@hidden,  address@hidden
> > Date: Sat, 19 Oct 2019 10:02:15 +0200

> > The complaint is that the interactive spec of global-set-key downcases
> > whatever the user enters.

> > M-x global-set-key RET C-S-o

> > will bind C-o, not C-S-o.  (Well, the case in question was about TAB,
> > aka C-i, but...)  This is surprising, and should be fixed, I think (and
> > the patch suggested fixes this).

> > I entered the discussion because I thought that this would be a bad
> > change on ttys, because Emacs would then go ahead and bind the `C-S-o'
> > key -- which then couldn't be used by the user, because there's no way
> > to use shifted control keys under a tty.  At least I don't think so?

> > If this is the case, I think the original patch should be applied, but
> > if we're running in an environment where `C-S-o' can't be entered (i.e.,
> > not on a gui), then the command should error out or give a warning, at
> > least.

> Ah, okay.  Yes, I think Alan's change should be installed, but FWIW I
> don't see a need for any warning (and we will have hard time knowing
> when to show it, given the different capabilities of different
> terminal emulators).

Thanks, I've installed it, together with an entry in NEWS.

With this, I'm closing the bug.

> Thanks.

-- 
Alan Mackenzie (Nuremberg, Germany).


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]