bugGNU Octave - Bugs: bug #42248, echo_executing_commands does not...

 
 

bug #42248: echo_executing_commands does not echo when executing from stdin

Submitter:  Sigbert Klinke <sigbert>
Submitted:  Wed 30 Apr 2014 04:05:01 PM UTC
   
 
Category:  Interpreter Severity:  2 - Minor
Priority:  3 - Low Item Group:  Regression
Status:  Wont Fix Assigned to:  None
Originator Name:  sigbert Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 07 Jun 2015 05:41:34 PM UTC, comment #3: 

I think we can call this bug report resolved, reporter seems satisfied with using the ECHO_SCRIPTS value (1) instead of ECHO_CMD_LINE (4) with current versions of Octave to show input from non-interactive script text.

Mike Miller <mtmiller>
Group Member
Thu 01 May 2014 09:49:05 AM UTC, comment #2: 

Using

octave -qfx test.m


delivers much more output since all the functions called by octave are displayed, too. I use octave as computing server and just want to see the user input echoed.

But the solution with "echo_executing_commands (1);" and

octave -qf test.m

works as in 3.6.x. Thanks a lot.

Sigbert Klinke <sigbert>
Wed 30 Apr 2014 11:52:19 PM UTC, comment #1: 

Confirmed, only applies to Octave commands sent to the interpreter on stdin. The correct behavior persists if you run your example as


octave -qfx test.m


telling Octave to run the m-file instead of reading it from the standard input stream. And either using the -x command-line option as shown above, or changing your script to set the echo_executing_commands value to 1 instead of 4.

Mike Miller <mtmiller>
Group Member
Wed 30 Apr 2014 04:05:01 PM UTC, original submission:  

The attached test.m called from the command line via  "octave -qf < test.m" results in 3.8.0 & 3.8.1:


  ans =  4
  ans =

     17   24    1    8   15
     23    5    7   14   16
      4    6   13   20   22
     10   12   19   21    3
     11   18   25    2    9


and in 3.6.4:


  + echo_executing_commands()
  ans =  4
  + magic(5)
  ans =

     17   24    1    8   15
     23    5    7   14   16
      4    6   13   20   22
     10   12   19   21    3
     11   18   25    2    9

  + echo_executing_commands(0);


If I start octave 3.8.1 and type in the command by hand then I get the same result as in 3.6.4.

The problem might be with the function


void octave_base_reader::do_input_echo (const std::string& input_string) const


in the file libinterp/corefcn/input.cc .

When typing in the commands within octave the function is called, when calling "octave -qf < test.m" the function seems not be called.

Sigbert Klinke <sigbert>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #31288:  test.m added by sigbert (95B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by sigbert (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-07 mtmiller StatusConfirmed Wont Fix
        Open/ClosedOpen Closed
    2015-02-02 rik5 Priority5 - Normal 3 - Low
    2014-04-30 mtmiller CategoryOctave Function Interpreter
        Severity3 - Normal 2 - Minor
        Item GroupIncorrect Result Regression
        StatusNone Confirmed
        Summaryecho_executing_commands delivers unexpected output echo_executing_commands does not echo when executing from stdin
    2014-04-30 sigbert Attached File- Added test.m, #31288

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code