From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: TAB for non-editing modes Date: Sun, 23 Sep 2007 09:43:59 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1190565952 5945 80.91.229.12 (23 Sep 2007 16:45:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 23 Sep 2007 16:45:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 23 18:45:48 2007 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 1IZUaZ-0006XH-94 for ged-emacs-devel@m.gmane.org; Sun, 23 Sep 2007 18:45:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IZUaW-0002IQ-T4 for ged-emacs-devel@m.gmane.org; Sun, 23 Sep 2007 12:45:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IZUZP-0001eC-3c for emacs-devel@gnu.org; Sun, 23 Sep 2007 12:44:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IZUZN-0001cx-Kx for emacs-devel@gnu.org; Sun, 23 Sep 2007 12:44:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IZUZN-0001cs-8t for emacs-devel@gnu.org; Sun, 23 Sep 2007 12:44:33 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IZUZI-0000QC-MV; Sun, 23 Sep 2007 12:44:29 -0400 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l8NGiMSj019139; Sun, 23 Sep 2007 10:44:22 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id l8NGM69M004468; Sun, 23 Sep 2007 10:44:22 -0600 Original-Received: from dhcp-amer-csvpn-gw2-141-144-72-44.vpn.oracle.com by acsmt350.oracle.com with ESMTP id 3237985321190565816; Sun, 23 Sep 2007 09:43:36 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-Detected-Kernel: Linux 2.4-2.6 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:79598 Archived-At: > Similarly for other bindings that invoke commands that modify > the buffer - why not bind them to `undefined'? I do that in > read-only buffers such as *Buffer List*. Besides preventing > the read-only error message, it prevents users from thinking > that a key sequence might be unavailable for their own use. > > suppress-keymap already does this with self-inserting commands. Your > idea is to do this with the other normal commands that alter the text. Yes. And for the same reasons. Individual character insertion is but one way to modify a buffer. There are other ways, both local and global, as you point out. > Doing this with kill commands would take away a feature: you can use > them in read-only buffers to copy text to the kill ring. That feature > may not be very useful in read-only buffers, but I am not convinced it > is an improvement to make it entirely unavailable there. Granted. But it could be argued that this "feature" is really a bug that we exploit (because it seems useful) ;-). Because it is inconsistent with normal use (killing) of those commands/keys, it promotes user error and possibly confusion. The user does not even get proper feedback about this "trick" - s?he still gets the read-only error message/reminder, and there is no indication that anything was copied. I don't know if this "feature" is even documented. Emacs has no lack of copy (vs kill) commands - it's better for users to get in the consistent habit of using the copy commands (not using kill commands in read-only buffers). You might have a habit to break, but that's all. > Aside from that, I think it is more coherent for global > buffer-modifying commands to give errors "buffer read-only" in > read-only buffers, rather than acting as if they did not exist. By the qualifier "global", I assume you do not mean things such as `backward-delete-char-untabify'. So I guess you are agreeing to extending `suppress-keymap' (or creating an additional function that extends it) to such "local" buffer modifying commands. Is that right? > For TAB, which varies between modes anyway, making it undefined > might be good. Here, I see you suggesting that there are even some "global" buffer-modifying keys that should be undefined - namely `TAB', at least. Is that right? I don't disagree with your reservation for global buffer modifiers, but that (e.g. the `TAB' case) really means that it would be good to take a look at such commands on a case-by-case basis.