From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#835: 23.0.60; Quick calc is quietly disabled in view-mode Date: Mon, 01 Sep 2008 17:50:58 -0400 Message-ID: <87y72bilh9.fsf@cyd.mit.edu> References: <87fxojg0k5.fsf@cyd.mit.edu> <48BC59BB.5@gmx.at> Reply-To: Chong Yidong , 835@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1220306867 26148 80.91.229.12 (1 Sep 2008 22:07:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Sep 2008 22:07:47 +0000 (UTC) Cc: 835@emacsbugs.donarmstrong.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 02 00:08:41 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KaHZf-00027f-7B for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Sep 2008 00:08:39 +0200 Original-Received: from localhost ([127.0.0.1]:58046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaHYf-0004A2-RI for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Sep 2008 18:07:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KaHYc-00049o-Tb for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2008 18:07:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KaHYb-00049U-Gi for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2008 18:07:34 -0400 Original-Received: from [199.232.76.173] (port=46290 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaHYb-00049R-CM for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2008 18:07:33 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:50847) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KaHYa-0004cV-PG for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2008 18:07:33 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m81M7UBX003918; Mon, 1 Sep 2008 15:07:30 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m81Lt4Kx031019; Mon, 1 Sep 2008 14:55:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 01 Sep 2008 21:55:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 835 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 835-submit@emacsbugs.donarmstrong.com id=B835.122030572429098 (code B ref 835); Mon, 01 Sep 2008 21:55:04 +0000 Original-Received: (at 835) by emacsbugs.donarmstrong.com; 1 Sep 2008 21:48:44 +0000 Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m81LmfHf029092 for <835@emacsbugs.donarmstrong.com>; Mon, 1 Sep 2008 14:48:42 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 57EC457E337; Mon, 1 Sep 2008 17:50:58 -0400 (EDT) In-Reply-To: <48BC59BB.5@gmx.at> (martin rudalics's message of "Mon\, 01 Sep 2008 23\:08\:11 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.91 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Mon, 01 Sep 2008 18:07:34 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19994 Archived-At: martin rudalics writes: >> ! (define-key map (char-to-string (- (car x) ?a -1)) (cdr x))) > [...] >> ! (define-key map (upcase (char-to-string (car x))) (cdr x))) > >> What the original code does is the following: for a character such as >> "n", it adds "C-n" to the keymap as well (it's a hack that relies on >> the specific properties of the ASCII table, and needs at least a >> comment). That's not what the patched code does: it adds "N" to the >> keymap. Martin, what's the reason for this change? > > That was my intention: AFAICT `view-mode' took `Q' (and, for example, > `E') away from calc and I simply tried to give it back to calc. But > maybe this part of the code really intended to add a "C-" ... Yeah, it's somewhat opaque code. The way the ASCII table is set up is that character 1 is the character ^A, character 2 is the character ^B, and so forth, until character 65 is the unmodified character A. Hence (char-to-string (- ?n ?a -1)) gives 14 == ^N. (Also, ASCII control characters are case insensitive: there's no separate ^n character.) I suppose this means we have to find a separate fix for the original bug...