There's more than one way to do things | |
PerlMonks |
Re: Testing terminal programs within emacs (SOLVED)by LanX (Saint) |
on Nov 29, 2014 at 21:41 UTC ( [id://1108752]=note: print w/replies, xml ) | Need Help?? |
> Term::ReadLine allows defining explicit IN and OUT handles which may be redirected to a separate xterm window? tried this but wasn't sufficiently reliable, (but this couldhave been be caused by gnome-terminal weirdness) The following hack works with xterm , put it at the very beginning of your program. It restarts the program within a separate xterm-window but redirects STDERR to the parent process. This allows running a terminal script from within emacs and should be easily adapted to other environments using l/unix. All STDERR warnings show within emacs and are clickable to navigate to source file/line.
This approach can also be used by the perldebugger when debugging another Term::ReadLine application When sufficiently tested this logic can be put into a separate module RunXTerm , no adjustments of editor needed.
disclaimerIt's a proof of concept hack!!!I'm not overly familiar with tty and forking and open for cleaner suggestions. :)
Cheers Rolf (addicted to the Perl Programming Language and ☆☆☆☆ :)
In Section
Seekers of Perl Wisdom
|
|