bugGNU Octave - Bugs: bug #56079, Command window does not accept...

 
 

bug #56079: Command window does not accept letters "a", "p", or "w"

Submitter:  None
Submitted:  Fri 05 Apr 2019 04:16:21 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Gordon Chamberlain Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 5.1.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 27 May 2019 11:58:58 PM UTC, comment #7: 

This was not a complex programming issue, but I appreciate your time in addressing it and hope that it helps at least one future newbie from having this same perplexing problem.

Gordon Chamberlain <inprosys>
Mon 27 May 2019 10:49:15 PM UTC, comment #6: 

I added a more explicit warning to the top of the inputrc file in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/5af449d4e1f4).

This will be a part of the next bug fix release of Octave (5.2.0).

Rik <rik5>
Group administrator
Sun 07 Apr 2019 07:18:06 PM UTC, comment #5: 

Changing the header comment might help to ward off the inexperienced user.  Making the wording even more stern might be good.

Something like:

## This file should only be used to configure the behavior of line-input editing for all
## Octave users when Octave is configured to use the GNU Readline library for input-line editing.
## 
## This file is NOT an Octave script for adding commands to the octaverc startup file.
##
## Please do not make changes to this file unless you know how
## GNU Readline configuration works.

Gordon Chamberlain <inprosys>
Sun 07 Apr 2019 04:59:01 PM UTC, comment #4: 

Would it help if we added commentary at the top of the inputrc file to warn you away from making changes unless you know what you are doing?

The current header comment says


## This file configures the behavior of line-input editing for all
## Octave users when Octave is configured to use GNU Readline library
## for input-line editing.


Would it help if it said something like


## This file configures the behavior of line-input editing for all
## Octave users when Octave is configured to use GNU Readline library
## for input-line editing.  This file is not an Octave script.  Please
## do not make changes to this file unless you know how GNU Readline
## configuration works.


Mike Miller <mtmiller>
Group Member
Sun 07 Apr 2019 04:26:25 PM UTC, comment #3: 

Thanks for the quick response to my problem.

1. Does the problem not show up with a command window
docked to the main window?

The problem persists even when the command window is
docked to the main window.


2. Do you have some readline configuration in the .octaverc file?

OK.  This lead to the solution for fixing the problem:

Under the new Octave 5.1.0 installation under Windows 7, the following are the paths created for system configuration files:

  D:\Octave\Octave-5.1.0.0\ming64\share\octave\site\m\startup\octaverc

And, also the following paths:

  D:\Octave\Octave-5.1.0.0\ming64\share\octave\5.1.0\m\startup\octaverc
with the accompanying path
  D:\Octave\Octave-5.1.0.0\ming64\share\octave\5.1.0\m\startup\inputrc

(NOTE:  Under Octave 4.4.0, the path to octaverc did not have the additional  "\ming64\"  directory level.)
 
In the "5.1.0\m\startup" path, in the octaverc file, I saw the following comment:

## Re-read user's personal inputrc to give precedence over Octave's default.

So, I thought this was a good way to place user input in a convenient place for adding to the startup process without having to change the octaverc file itself.

So, that was the problem.  With the following lines added to the "inputrc" file:

addpath('D:\\OCTAVE\\GeoGraphs\\Georgia\\');
pkg load io
pkg load geometry
pkg load mapping
warning ('off', 'Octave:data-file-in-path');

You get the strange a/p/w input problems.  (Why?  I'll leave that problem alone.)

Removing those lines and everything goes back to normal.  I now see that the "inputrc" file is only  intended for user configuration relative to the GNU Readline library.

I also found that adding my startup commands to either one of the octaverc files (different paths) seems to work (without having to change the OCTAVE_VERSION_INITFILE environment variable).

So, I'm back to placing my startup commands into the octaverc file here:
  D:\Octave\Octave-5.1.0.0\ming64\share\octave\site\m\startup\octaverc
 
and, getting back to my real machine learning programming projects.

Thanks for the suggestions that lead me to finding the solution.

This problem can be closed for my purposes.

(By the way, when initially invoked, the new 5.1.0 version starts up much faster!)

Gordon Chamberlain <inprosys>
Sun 07 Apr 2019 07:09:17 AM UTC, comment #2: 

Thank you for the report.

I can not reproduce this issue on Windows 7 with a recent build from the default branch. In the OP you mention a separate command window. Does the problem not show up with a command window docked to the main window?

Do you have some readline configuration in the .octaverc file? What is the state of the user option "Disable global shortcuts when terminal window has focus" in the preferecnes tab "Terminal"? Could you please try to toggle this option?

Torsten Lilge <ttl>
Group Member
Sat 06 Apr 2019 09:12:34 PM UTC, comment #1: 

My original submission seems to have lost the full description of the problem as I submitted it.  When typing "pkg load mapping", Octave reflects "kg lod ming" and signals an error.  When I use the function kbhit(), my input of "a" is accepted and returned as the proper answer (ans = a). Even when I enter "pkg load mapping" in the editor window, copy it and paste it into the command window, it is converted to "kg lod ming".  Something strange is going on with Octave accepting a/p/w directly in the command window.  By the way, it accepts the capital entry of those letters (A/P/W).

This works correctly (obviously) on this system using Octave version 4.4.0.

Gordon Chamberlain <inprosys>
Fri 05 Apr 2019 04:16:21 PM UTC, original submission:  

Under Windows 7, using Octave Version 5.1.0.0, in the GUI environment with a separate command window, typing the letters "a", "p", or "w", no letters show and they are not accepted.  These letters are behaving as if they are a "control" or "escape" sequence and are not accepted as character input.  For example, when I'm trying to type "pkg load mapping", the following occurs:


>> kg lod ming
error: 'kg' undefined near line 1 column 1
>>
+verbatim+

As you can see, the letters "a" and "p" simply do not appear and are not accepted as input.

If I use the function kbhit (still in the command window under GUI execution), the letters (a/p/w) do get properly returned as output results.

So the error seems to be in the interpreter's parsing of the input line in the separate command window under GUI execution.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by inprosys (Posted a comment)
  • -email is unavailable- added by None (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-27 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2019-04-07 ttl StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code