From: Alexis H. Rivera-R. <ahr...@ya...> - 2017-07-14 14:42:40
|
Joachim, This what I got on mine. I tried your fix using prolog.el and eclipse.el and it seemed to work on the simple test that I sent. Here is the output that you requested. [eclipse 2]: util:streams. WARNING: module 'util' does not exist, loading library... util.eco loaded in 0.00 seconds $&(stream(0)) pipe read user ( stdin input user_input ) $&(stream(1)) pipe write user ( stdout output warning_output log_output user_output toplevel_output debug_output answer_output ) $&(stream(2)) pipe write error ( stderr error user_error ) $&(stream(3)) null update null ( null ) $&(stream(4)) queue read "" ( ec_rpc_in ) $&(stream(5)) queue update "" ( ec_rpc_out ) $&(stream(6)) pipe read fd ( toplevel_input ) $&(stream(8)) pipe read fd ( debug_input ) Thanks for your help.Alexis El amor a la patria tiene que transformarse en acción y ésta tiene que ser acción para el bien común. (Adalexis Rios- mi madre) On Friday, July 14, 2017 05:28:45 AM PDT, Joachim Schimpf <jsc...@co...> wrote: Hi Alexis, The top-level does not flush the error stream because I/O is not from/to a tty (because re-routed through emacs). If you manually set :- set_stream_property(error, flush, end_of_line). then it should work as expected (you can also put this command in a .eclipserc file in your working directory or home directory). To enable me to implement a better fix, could you send me the output that util:streams. produces when you call it from your emacs-embedded eclipse? Thanks, Joachim On 14/07/17 10:45, Alexis H. Rivera-Rios via Eclipse-clp-bugs wrote: > Hi, > > I'm using eclipse 7.21 i386nt on windows 10 and emacs 25.2.1 > I'm using eclipse.el but it also happens with prolog.el > I believe the problem happens with eclipse 6.1 too. > > From emacs, when I load/compile a file (C-c-C-b) that has a runtime error for > example > > top :- > member2(X,[1,2,3]). > > Then evaluate top. I get > [eclipse 2]: top. > Abort > [eclipse 3]: > > However, doing the same evaluation with the eclipse.exe from a dos shell gives me > [eclipse 2]: top. > calling an undefined procedure member2(_233,[1, 2, 3]) in module eclipse > Abort > [eclipse 3]: > > In TkEclipse the abort goes to the result pane and the error message goes to the > error pane. > > My first hypothesis was that emacs was doing something different with output > from stdout and stderr. > As a test, I created a C++ program that mimics the eclipse.exe read/eval loop. > The program prints the eclipse prompt string then outputs an Abort message on > stdout and the error string on stderr using std::cout and std::cerr > respectively. I expected to see only the Abort string, therefore duplicating the > eclipse.exe behavior but that didn't happen. Instead, I got both the error > message and the abort string. This tells me that emacs maybe redirecting both > stdout and stderr to the same output buffer. > > One thing I noticed is that if I run the following sequence from emacs using the > actual eclipse.exe > [eclipse 1]: top. > Abort > [eclipse 2]: halt. > calling an undefined procedure member2(_233,[1, 2, 3]) in module eclipse > > Process prolog exited abnormally with code 3 > > As the program is shutdown, I do get the error messages. Almost as if > eclipse.exe buffers the error message. If I enter multiple commands with > runtime errors and then halt, I will see all of them. > > I will appreciate your help on the subject. > Thanks > > Alexis > **//___^ > El amor a la patria tiene que transformarse en acción y ésta tiene que ser > acción para el bien común. (Adalexis Rios- mi madre) > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Eclipse-clp-bugs mailing list > Ecl...@li... > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-bugs > |