From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: capslock changes control characters? Date: Sun, 09 Mar 2008 23:26:42 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205119622 28688 80.91.229.12 (10 Mar 2008 03:27:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2008 03:27:02 +0000 (UTC) Cc: schwab@suse.de, christopher.ian.moore@gmail.com, rms@gnu.org, emacs-pretest-bug@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 10 04:27:29 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JYYfg-0005WT-8d for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 04:27:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYYf7-0007hE-PR for ged-emacs-devel@m.gmane.org; Sun, 09 Mar 2008 23:26:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JYYf2-0007gY-IY for emacs-devel@gnu.org; Sun, 09 Mar 2008 23:26:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JYYf1-0007gK-QL for emacs-devel@gnu.org; Sun, 09 Mar 2008 23:26:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYYf1-0007gH-Li for emacs-devel@gnu.org; Sun, 09 Mar 2008 23:26:47 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JYYf1-0007oM-Oi for emacs-devel@gnu.org; Sun, 09 Mar 2008 23:26:47 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JYYf1-0002MV-7W for emacs-pretest-bug@gnu.org; Sun, 09 Mar 2008 23:26:47 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JYYey-0007ns-Fr for emacs-pretest-bug@gnu.org; Sun, 09 Mar 2008 23:26:47 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JYYey-0007nk-87; Sun, 09 Mar 2008 23:26:44 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgCAEFH1EfO+J2CdGdsb2JhbACQfQEwlyGBBw X-IronPort-AV: E=Sophos;i="4.25,472,1199682000"; d="scan'208";a="15776128" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 09 Mar 2008 23:26:42 -0400 Original-Received: from pastel.home ([206.248.157.130]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id QGK85642; Sun, 09 Mar 2008 23:26:42 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 779A4805A; Sun, 9 Mar 2008 23:26:42 -0400 (EDT) In-Reply-To: (Kenichi Handa's message of "Mon, 10 Mar 2008 09:54:42 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91989 gmane.emacs.pretest.bugs:21488 Archived-At: >> > I think the current Emacs doesn't have a clear view about >> > when and how to resolve modifiers. For instance, S-i is >> > resolved to `I' by XLookupString, C-i is resolved to 9 in >> > make_ctrl_char. Then I think C-S-i should also be resolved >> > somewher before it's given to Lisp, at least before it's >> > given to Lisp as character. >> It should still be possible to distinguish key-bindings to C-i >> (i.e. TAB) and C-S-i (i.e. S-TAB), provided the underlying terminal >> allows it, obviously. >> Does your code still allow this distinction? > No. If one needs such distinction, he should use > read-event. I mean, can we usefully handle (define-key map [?\t] 'foo) (define-key map [?\S-\t] 'bar) because I think it's important that we can distinguish them. But now that I look at it, the matter is more complex than that: on X11 hitting shift+tab send something like S-iso-lefttab which is then mapped to `backtab'. Under an xterm I get an escape sequence that gets decoded directly into `backtab'. So I guess it's not that important to preserve the ?\S-\t key. >> > Resolving of M-i is surely questionable, but as Emacs has >> > accepeted M-i upon (insert (read-char)) for long, I resolved >> > them too for backward compatibility. >> I think this was just an accidental misfeature and would should not >> preserve this kind of backward compatibility. I can't imagine how it >> could break any existing elisp package, and if a user used that in the >> past, there are plenty of alternative ways to get the same result in >> a saner way. > Ok. But, currently Emacs allows this kind of string "\M-i" > (same as "\351", note that "\H-i" signales the error > "Invalid modifier in string"). Again, this is just an old feature that made sense back in the 7/8bit tty days. It's still accepted because a fair amount of code passes such strings to define-key. Any other use would count as a bug for me. > It seems that this is also a misfeature. Yes. But one that's still used. > If we disallow M-i upon (insert (read-char)), shouldn't we disallow > "\M-i" too? I don't think so. One is used in elisp code, the other is used by manual typing only. So removing one will break elisp packages, while removing the other will only make previously working key presses not work as before, but with various alternative key-presses available. Stefan