Re: retaining command buffer [message #41629] |
Thu, 04 November 2004 08:51  |
marcuirl
Messages: 14 Registered: December 2003
|
Junior Member |
|
|
Ken Mankoff <mankoff@yahoo.com> writes:
> On Thu, 4 Nov 2004, Jim Braatz wrote:
>> I'd like to retain my command line buffer from one session to the
>> next.
>
> Not sure how to do it in just xterm, but The IDLWAVE emacs mode
> [http://idlwave.org/] does this for you.
From the xterm (and other flavours) it is not possible, once the IDL
sessions ends the history is gone too! _UNLESS_ you take a look at the
IDL help on journal command!
I use this (recovered from the net somewhere!) to keep separate files
for each session I start. Then by looking at the time stamp on the
file (sometimes I put comments with date in the on the command line
too) I can figure out where I was and what I was trying to
do. Occasionally I have to clear out the old stuff to recover disc
space when `spring cleaning' dictates!
pro my_journal
; Opening a uniqe journal
openr,lun,'~/idl/.idl_journal_num',/get_lun
readf,lun,n_journal
n_journal = fix(n_journal)
close,lun
free_lun,lun
openw,lun,'~/idl/.idl_journal_num',/get_lun
printf,lun,n_journal+1
close,lun
free_lun,lun
journal,'~/idl/journals/mmg_journal'+strtrim(n_journal,2)+'. pro'
print,'Opening journal: journal'+strtrim(n_journal,2),'.pro'
end
The file .idl_journal_num contains just a number to start with then
gets increased and at the end of my startup file I have my_journal
Then at least I can see what I have done before and then use the mouse
to copy and paste it to the xterm.
HTH marcu.
P.S. IDLWAVE is a fabulous package for running IDL within emacs. If
you like emacs, after a day or two of using idlwave you'll wonder how
you ever did without it!
--
Unless otherwise noted, the statements herein reflect my
personal opinions and not those of any organisation with
which I may be affiliated.
|
|
|