bugGNU Octave - Bugs: bug #39728, GUI command history incompatible...

 
 

bug #39728: GUI command history incompatible with history_control

Submitter:  Mike Miller <mtmiller>
Submitted:  Thu 08 Aug 2013 12:00:01 PM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 12 Aug 2013 07:21:33 PM UTC, comment #5: 
Torsten Lilge <ttl>
Group Member
Sun 11 Aug 2013 04:08:19 PM UTC, comment #4: 

Seems fine to me, so please push this change to savannah.

Thanks.

John W. Eaton <jwe>
Group administrator
Sun 11 Aug 2013 10:32:35 AM UTC, comment #3: 

Okay, sorry for my ignorance here.

Another approach (my first but discarded one) would be to add a boolean return value to command_history::add() that is true if something was added to the history. This return value is then used to determine if the octave_link::append_history has to be called (see attached file).

(file #28809)

Torsten Lilge <ttl>
Group Member
Sun 11 Aug 2013 01:36:03 AM UTC, comment #2: 

I backed out this changeset because nothing from liboctave should ever depend on liboctinterp.  For one thing, this will break a build from scratch because liboctinterp will not be built and available for linking with liboctave when liboctave is built.

So we need to find another way to do this job.  Perhaps the command_history class can call a user supplied function when adding history?  Then the GUI can register a callback function with the command_history class when it starts.

John W. Eaton <jwe>
Group administrator
Sat 10 Aug 2013 07:26:43 PM UTC, comment #1: 
Torsten Lilge <ttl>
Group Member
Thu 08 Aug 2013 12:00:01 PM UTC, original submission:  

If history_control is set to "ignorespace", "ignoredups", "ignoreboth", or "erasedups", the GUI command history panel still shows every entry typed in the command window. When Octave exits and restarts, the command history panel shows the correct history. I suppose this is because every command is sent to the GUI on a separate channel from how readline records and saves history. The following example session should show the bug:


>> history_control ("ignorespace")
>>  x = 5;
>> x = 5;
>> # up-arrow twice to show correct history, then Ctrl-C
>> history_control ("ignoredups")
>> x = 5;
>> x = 5;
>> x = 5;
>> # up-arrow twice to show correct history, then Ctrl-C
>> history_control ("ignoreboth")
>>  x = 5;
>> x = 5;
>> x = 5;
>> # up-arrow twice to show correct history, then Ctrl-C
>> history_control ("erasedups")
>> x = 5;
>> x = 6;
>> x = 5;
>> # up-arrow three times to show correct history, then Ctrl-C
>> exit # now exit and restart Octave, correct history shows


Nothing breaks, but it gives the GUI user a false sense of what is in the history if any of the history control bits are set.

Mike Miller <mtmiller>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28809:  bug39728_v2.patch added by ttl (3KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-12 ttl StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2013-08-11 ttl Attached File- Added bug39728_v2.patch, #28809
    2013-08-11 jwe StatusFixed In Progress
        Open/ClosedClosed Open
    2013-08-10 ttl StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code