octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [interpeter] prompt does not appear after output of error or warning


From: Tatsuro MATSUOKA
Subject: Re: [interpeter] prompt does not appear after output of error or warning of external program
Date: Mon, 19 Sep 2016 09:16:51 +0900 (JST)

----- Original Message -----

> From: Mike Miller 
> To: Tatsuro MATSUOKA 
> Cc: "address@hidden" 
> Date: 2016/9/19, Mon 02:18
> Subject: Re: [interpeter] prompt does not appear after output of error or 
> warning of external program
> 
> On Sun, Sep 18, 2016 at 14:31:43 +0900, Tatsuro MATSUOKA wrote:
>>  Hello
>> 
>>  I do know judge whether what I want to point out is intentional. 
>> 
>>  Octave uses external program (gnuplot) via pipe.
>>  Gnuplot or its external libraries sometimes send call back messages
>>  (error messages or warning.)
>> 
>>  For example,
>> 
>> 
>>  >> graphics_toolkit gnuplot
>>  >> setenv GNUTERM wxt
>>  >> plot (rand(5))
>>  >>
>>  (gnuplot.exe:6116): Pango-WARNING **: couldn't load font 
> "Helvetica Not-Rotated 2
>>  00", falling back to "Sans Not-Rotated 200", expect ugly 
> output.
>> 
>> 
>>  After output the message, the octave command prompt does not appear.
>>  If I press ENTER, the command prompt appear.
>> 
>>  On gnuplot
>>   
>>  gnuplot> set term wxt font 'Helvetica'
>>  Terminal type set to 'wxt'
>>  Options are '0 enhanced font "Helvetica"'
>>  gnuplot> plot x
>> 
>>  (gnuplot.exe:5072): Pango-WARNING **: couldn't load font 
> "Helvetica Not-Rotated 200", falling back to "Sans Not-Rotated 
> 200", expect ugly output.
>>  gnuplot>
>> 
>>  After warning from pango, gnuplot command prompt "gnuplot>" 
> appear immediately.
>> 
>>  Is the octave behaviors for output from gnuplot intentional?
> 
> Yes, sort of?
> 
> The desired behavior is that gnuplot prints no warnings or output other
> than the figure. Octave does nothing to hide or capture the stderr
> stream, so if gnuplot does produce errors or warnings, it will appear on
> the console output.
> 
> As your demo shows, the next prompt has already been printed before the
> warning message comes from gnuplot. From Octave's point of view, the
> gnuplot command has already finished and it is waiting for the next
> command from you. If gnuplot prints a warning message after that point,
> Octave doesn't know about it.
> 
> The same happens if I run
> 
>   system ("gnome-terminal", [], "async");
> 
> Octave prints the next command prompt, and then a few dozen warning
> messages are printed from the gnome-terminal process.
> 
> -- 
> mike


Mike 

Thank you for the detailed explanation.
I understand the situation.

I felt confusion at first time I met this behavior.

I lost the prompt after warning. I wondered what should I do next.
I struggled for a while and found that what I should do is to press ENTER.

From your explanation, I understand that Octave behaves correctly.
But some other persons may feel like me.

I think that wiki is the suitable place to describe this tip. 

But where is the appropriate place in the wiki.

Tatsuro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]