From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.devel Subject: Re: comint read-only prompt Date: 20 Aug 2002 11:03:04 -0700 Sender: emacs-devel-admin@gnu.org Message-ID: <1029866584.20782.76.camel@turtle.as.arizona.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1029866664 15568 127.0.0.1 (20 Aug 2002 18:04:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 20 Aug 2002 18:04:24 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu, miles@lsi.nec.co.jp, simon.marshall@misys.com, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17hDMc-00042y-00 for ; Tue, 20 Aug 2002 20:04:22 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17hDoe-0001uW-00 for ; Tue, 20 Aug 2002 20:33:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17hDNj-0006np-00; Tue, 20 Aug 2002 14:05:31 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17hDLY-0006es-00 for emacs-devel@gnu.org; Tue, 20 Aug 2002 14:03:16 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17hDLT-0006eN-00 for emacs-devel@gnu.org; Tue, 20 Aug 2002 14:03:15 -0400 Original-Received: from turtle.as.arizona.edu ([128.196.208.207]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17hDLS-0006dk-00; Tue, 20 Aug 2002 14:03:10 -0400 Original-Received: (from jdsmith@localhost) by turtle.as.arizona.edu (8.11.6/8.11.6) id g7KI34c20943; Tue, 20 Aug 2002 11:03:04 -0700 Original-To: rms@gnu.org In-Reply-To: <200208201721.g7KHLcb09801@wijiji.santafe.edu> X-Mailer: Ximian Evolution 1.0.5 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6683 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6683 On Tue, 2002-08-20 at 10:21, Richard Stallman wrote: > One feature I wanted was for > older prompts *not* to be read-only. > > It seems rather inconsistent to me to make the newest prompt read-only > and not the other prompts. > My thinking is this: one of the major advantages of comint over a traditional terminal is the ability to edit freely past input and output. If, suddenly, certain edit operations on older entries elicited errors, it might be jarring. Imagine marking out a region of old input/output to kill and yank into a journal buffer, only to be met with "Attempt to modify read-only text". One more difference, aside from the error message, between using modification-hooks + insert-in-front-hooks vs. read-only + rear-nonsticky pertains to killing regions. With the former method, the prompt cannot be modified or prepended to, but can be killed as part of a larger region. With the latter method, any attempt to remove the text is met with an error message. You'd need to bind inhibit-read-only in all commands which alter prior text. So there are three options for old prompts: 1. Leave them read-only by virtue of a read-only text-property. Any attempt to kill or delete any part of the entirety of older prompts generates an error. 2. Leave them read-only by virtue of modification and insert-in-front-hooks. Attempts to delete any part of the prompts signals an error, but the entire prompt can be killed without complaint. 3. Leave them read-write. Option 1 is probably the easiest to implement (simply add all text-properties, including read-only, at the time of overlay move... eliminating the vestigial overlay and snapshot-last-prompt altogether). My preference would be Option 2 or 3. Thanks, JD -- J.D. Smith <=> Steward Observatory <=> 520-621-9532 University of Arizona <=> 520-621-1532 Tucson, Arizona 85721 <=>