Re: if there is a command "clear lot" in IDLWAVE like "Ctrl+Y" in Windows [message #45274] |
Wed, 24 August 2005 11:04 |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Wed, 24 Aug 2005 01:50:45 -0700, xuwd9397 wrote:
> I am a new user of IDLwave under redhat, I don't know if there is a
> shortcut command to clear log like "ctrl+Y" in IDLDE under windows, any
> help will be appreciated.
Not an explicit one, but you can delete any portion of the command log
just like editing a normal Emacs buffer. C-x h C-w will zap the whole
buffer (beware of read-only prompt if you have that set). With comint
(the shell mode which underlies IDLWAVE Shell), you can do many more
advanced things, like specifying a maximum number of output lines to
keep, with (in your .emacs):
(add-hook 'comint-output-filter-functions 'comint-truncate-buffer)
This will keep the buffer no longer than `comint-buffer-maximum-size',
truncating from the top. You can customize this variable -- it
defaults to 1024 lines.
You can of course also do anything else you could do with a normal
Emacs buffer with the command log, like save it to file (C-x C-w) to
keep a record of your input/output, search through it for a particular
string or regexp (C-r or M-C-r), etc. Most of the commands listed for
regular Shell mode work just fine:
http://www.gnu.org/software/emacs/manual/html_node/Shell-Mod e.html
Aside from the multitude of Emacs editing commands, Comint offers many
more useful features for interacting with the IDL shell. E.g. to
paste any previous input to the current input line, use RET or middle
click with the cursor on any old input. To open a list of the command
history in a separarate frame, use C-c C-l (middle click or return in
that window to paste a command to the current command line). To
search via regexp through the previous input, try M-r.
On a related note, I strongly encourage you turn on show-paren-mode,
like this (in your .emacs):
(show-paren-mode)
Editing deeply nested structures/arrays in the Shell (or an IDLWAVE
buffer, for that matter), becomes *much* more enjoyable. Give it a
try, you'll see what I mean.
JD
|
|
|