unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* comint read-only prompt
@ 2002-08-19  8:24 Marshall, Simon
  2002-08-19 10:59 ` Miles Bader
  2002-08-19 20:46 ` Richard Stallman
  0 siblings, 2 replies; 36+ messages in thread
From: Marshall, Simon @ 2002-08-19  8:24 UTC (permalink / raw)
  Cc: 'jdsmith@as.arizona.edu'

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 <W>
 University of Arizona <=> 520-621-1532 <F>
 Tucson, Arizona 85721 <=> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2002-08-24  2:33 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19  8:24 comint read-only prompt Marshall, Simon
2002-08-19 10:59 ` Miles Bader
2002-08-19 15:40   ` Stefan Monnier
2002-08-19 15:57     ` JD Smith
2002-08-19 23:45       ` Miles Bader
2002-08-20 16:14         ` Stefan Monnier
2002-08-21  0:12           ` Richard Stallman
2002-08-21 15:06             ` Stefan Monnier
2002-08-21  0:11         ` Richard Stallman
2002-08-20 17:21       ` Richard Stallman
2002-08-20 18:03         ` JD Smith
2002-08-20 21:17           ` Miles Bader
2002-08-20 22:01             ` JD Smith
2002-08-21  0:18               ` Miles Bader
2002-08-21  1:24                 ` JD Smith
2002-08-21  1:36                   ` Miles Bader
2002-08-21 15:28                     ` Stefan Monnier
2002-08-20 18:36         ` Luc Teirlinck
2002-08-20 21:12         ` Miles Bader
2002-08-20 23:23           ` Kim F. Storm
2002-08-21 11:05         ` Kai Großjohann
2002-08-22  1:57           ` Richard Stallman
2002-08-22  2:21             ` JD Smith
2002-08-22  2:35             ` Miles Bader
2002-08-24  2:33               ` Richard Stallman
2002-08-19 23:41     ` Miles Bader
2002-08-19 20:46 ` Richard Stallman
2002-08-21  0:23   ` Noah Friedman
2002-08-21  1:21     ` Miles Bader
2002-08-21  1:38       ` Miles Bader
2002-08-21  1:32     ` JD Smith
2002-08-21 15:23       ` Stefan Monnier
2002-08-22  1:21         ` Miles Bader
2002-08-22  7:57         ` Eli Zaretskii
2002-08-24  2:32           ` Richard Stallman
2002-08-21  0:23   ` Noah Friedman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).