From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Marshall, Simon" Newsgroups: gmane.emacs.devel Subject: comint read-only prompt Date: Mon, 19 Aug 2002 09:24:07 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: main.gmane.org 1029745525 19004 127.0.0.1 (19 Aug 2002 08:25:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 19 Aug 2002 08:25:25 +0000 (UTC) Cc: "'jdsmith@as.arizona.edu'" Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17ghql-0004wE-00 for ; Mon, 19 Aug 2002 10:25:23 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17giI6-0005al-00 for ; Mon, 19 Aug 2002 10:53:38 +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 17ghrp-0008Nt-00; Mon, 19 Aug 2002 04:26:29 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17ghpl-0007eN-00 for emacs-devel@gnu.org; Mon, 19 Aug 2002 04:24:21 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17ghpc-0007cR-00 for emacs-devel@gnu.org; Mon, 19 Aug 2002 04:24:20 -0400 Original-Received: from mail17.messagelabs.com ([62.231.131.67]) by monty-python.gnu.org with smtp (Exim 4.10) id 17ghpc-0007b7-00 for emacs-devel@gnu.org; Mon, 19 Aug 2002 04:24:12 -0400 X-VirusChecked: Checked Original-Received: (qmail 22237 invoked from network); 19 Aug 2002 08:24:09 -0000 Original-Received: from gull.midas-kapiti.com (HELO pigeon.misys.com) (193.115.208.67) by server-8.tower-17.messagelabs.com with SMTP; 19 Aug 2002 08:24:09 -0000 Original-Received: FROM gull.misys.com BY pigeon.misys.com ; Mon Aug 19 09:24:08 2002 +0100 Original-Received: by GULL with Internet Mail Service (5.5.2653.19) id ; Mon, 19 Aug 2002 09:24:09 +0100 Original-To: 'Emacs Developers' X-Mailer: Internet Mail Service (5.5.2653.19) 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:6644 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6644 Hi guys, this one is for you... -----Original Message----- From: JD Smith [mailto:jdsmith@as.arizona.edu] Sent: 09 August 2002 00:30 To: shivers@cs.cmu.edu; simon@gnu.org Subject: comint read-only prompt I'm the maintainer of the IDLWAVE programming mode, which uses comint to run the language IDL interactively (see idlw-shell.el if you're interested). Without comint, programming the shell would have been far more cumbersome. One missing feature of comint that I'd always pined for was the ability to make the most recent prompt (IDL> in my case) read-only. Right now, the delete key just runs right over it. As I looked into it further, I realized the problem was that an overlay is (usually) used to highlight this prompt, and that overlays (for whatever reason) do not honor the 'read-only property, as text properties do. I had hoped Emacs 21 would address this shortcoming, but it did not. However, I learned by example in cpp-mode (cpp.el), the overlay properties `modification-hooks' and `insert-in-front-hooks' can be used to effect a read-only equivalency, by signaling an error if the user attempts to modify or pre-pend text in the overlay. I tried this out on the comint.el which shipped with Emacs 21.2.1, and it works marvelously. I used 'intangible in addition so left arrow would skip right over the prompt (and C-a, etc., would stop before the prompt). Would you guys be interested in this type of functionality? If so, I could redo the mods against CVS comint, and send them your way for a look (the major relevant change between 21.2.1 and CVS is in comint-snapshot-last-prompt, where I need to remove hooks to prevent older prompts from being read-only, in case you want to delete them). Otherwise, I might implement them as advice from within idlw-shell, but I'd prefer the more robust solution. Thanks, JD -- J.D. Smith <=> Steward Observatory <=> 520-621-9532 University of Arizona <=> 520-621-1532 Tucson, Arizona 85721 <=>