bugGNU Octave - Bugs: bug #43549, Matlab-style "Set path"...

 
 

bug #43549: Matlab-style "Set path" menu option in Octave GUI

Submitter:  José Luis García Pallero <jgpallero>
Submitted:  Thu 06 Nov 2014 02:30:32 PM UTC
   
 
Category:  GUI Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
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
   

Jump to the original submission

Mon 29 Jul 2019 06:22:39 AM UTC, comment #16: 

I have taken care of the remaining "FIXME" issues and have pushed the path dialog with changeset http://hg.savannah.gnu.org/hgweb/octave/rev/1805f8586179

Of course, there is still potential for improvements. I will so some polishing within the next couple of days. I suggest to discuss remaining issues and bugs in separate bug reports and will close this one.

Jun, thanks again for your initial patch with the dialog.

Torsten Lilge <ttl>
Group Member
Wed 24 Jul 2019 08:16:51 PM UTC, comment #15: 

John, it seems that you have already fixed all segfault causing bugs. At least, I can work with it without any crashes so far, just some smaller issues. Should we push it in it current form? User feedback might already be valuable while improving the dialog.

Torsten Lilge <ttl>
Group Member
Tue 23 Jul 2019 09:17:07 PM UTC, comment #14: 

OK, I'm backing out the changeset that I accidentally pushed.

My current changes are attached to this comment.


(file #47253)

John W. Eaton <jwe>
Group administrator
Tue 23 Jul 2019 08:23:17 PM UTC, comment #13: 

Okay, no problem, than I'll wait until you have submitted the complete changeset. Since there are still several issues that might lead to a segfault, should the work on this feature be carried out in separate branch?

Torsten Lilge <ttl>
Group Member
Tue 23 Jul 2019 07:28:49 PM UTC, comment #12: 

Torsten: Yes.  But maybe it would be better for me to backout the accidental commit and work on this a bit more before committing?  In addition to not being complete, my accidental commit didn't have a proper commit message.

John W. Eaton <jwe>
Group administrator
Tue 23 Jul 2019 07:09:07 PM UTC, comment #11: 

I will have a look at it. What is the current state, dev-branch and the additional patch from comment #9?

Torsten Lilge <ttl>
Group Member
Tue 23 Jul 2019 05:16:36 PM UTC, comment #10: 

Maybe Torsten can comment on this since he seems to understand the Qt system.  I agree that I don't have much of a clue when it comes to this type of code.  I did try your preliminary patch and it does stop the segfault, so that is a good thing.

Rik <rik5>
Group administrator
Tue 23 Jul 2019 05:01:02 PM UTC, comment #9: 

I think a change like the one attached to this comment is needed for all the functions that move/add/delete selected items.  I'm not an expert with these item list model view things in Qt, but the current functions seem overly complicated to me and don't appear to do the right thing.


(file #47251)

John W. Eaton <jwe>
Group administrator
Tue 23 Jul 2019 04:08:02 PM UTC, comment #8: 

Oops, I accidentally pushed the work-in-progress changeset.  What's in mercurial should be the complete change that I attached to comment #6.

Should I back it out?

I can duplicate the crash.  I'll take a look at it.

John W. Eaton <jwe>
Group administrator
Tue 23 Jul 2019 03:57:56 PM UTC, comment #7: 

The patch did not apply cleanly because, apparently, part of it is already in Mercurial


changeset:   27283:189ca5990c5d
user:        JunWang <jstzwj@aliyun.com>
date:        Mon Jul 22 23:51:01 2019 -0400
summary:     work-in-progress patch for set path dialog


So I just went ahead and ran the GUI.  The "Set Path" dialog now displays.  However, I chose the last entry in the list and clicked on "Move to Top" and it segfaulted again.  I guess there are still some issues.

Rik <rik5>
Group administrator
Tue 23 Jul 2019 05:07:14 AM UTC, comment #6: 

I did some cleaning up and fixing.  New patch is attached.

The biggest change was fixing the way the model communicates with the interpreter.  We can't call things like eval_string directly from the GUI thread.  I fixed the functions that used eval_string to use the event_manager (previously called "octave_link") to post events to for the interpreter to handle.  If a response is needed, that is handled by having the event function emit a signal for the GUI to handle.

It seems to work for me now.  There is no crash at startup or when editing, even if the interpreter is busy.  However, no action can happen until the interpreter is back to an idle state.


(file #47249)

John W. Eaton <jwe>
Group administrator
Mon 22 Jul 2019 10:49:30 PM UTC, comment #5: 

I just tried to apply the patch and it no longer applies cleanly.  I updated things enough to build (and uploaded it), but I also get a segfault when I attempt to use the new "Set path" menu option.

I got this warning repeated several times during compilation.


libgui/src/set-path-model.cc:56:74: warning: ‘octave_value octave::eval_string(const string&, bool, int&)’ is deprecated: [5]: use 'octave::interpreter::eval_string' instead [-Wdeprecated-declarations]


Maybe it would be worth fixing the warning and see if that helps.


(file #47248)

Rik <rik5>
Group administrator
Sat 20 Jul 2019 03:27:24 PM UTC, comment #4: 

Jun, thanks fro the patch. Unfortunately it leads to a segfault in a built from the current dev branch. I will have a look at it in more detail the next days.

Torsten Lilge <ttl>
Group Member
Thu 12 Apr 2018 05:51:17 AM UTC, comment #3: 

I think set-path dialog helps primers a lot, so I implemented the set-path dialog and attached the patch here.

(file #43889)

JunWang <junwang>
Tue 03 Feb 2015 11:44:07 AM UTC, comment #2: 

In my experience teaching basic Octave and Matlab (both in parallel, at the same time) courses for undergraduates, the students find easier the Matlab way to set graphically the path

José Luis García Pallero <jgpallero>
Thu 20 Nov 2014 03:57:00 PM UTC, comment #1: 

Wouldn't it be easier to have a project-specific .octaverc file, or site-wide rc file, that loaded the correct paths?  Asking that every student in a class of 100 use a menu to add a path seems way more time consuming then just asking them to copy a file (.octaverc) into the directory where they start octave.

Rik <rik5>
Group administrator
Thu 06 Nov 2014 02:30:32 PM UTC, original submission:  

Hello:

It would be nice if Octave GUI provides a graphical way to add folders to the path instead of use the addpath() function. I think in some similar to the "Set path" menu option of Matlab. For undergraduate courses it is easier to set the path via an option menu instead to use addpath() or write the orders in the octaverc files.

I think this kind of option is not present in the experimental GUI

Thanks

José Luis García Pallero <jgpallero>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47253:  set-path-cset-2019-07-23-v2-jwe added by jwe (26KiB - application/octet-stream)
file #47251:  move-to-top-diffs.txt added by jwe (2KiB - text/plain)
file #47249:  set-path-cset-2019-07-23-jwe added by jwe (25KiB - application/octet-stream)
file #47248:  set_path.20190722.diff added by rik5 (7KiB - text/x-patch)
file #43889:  set_path_dialog.patch added by junwang (28KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one

Digest:
   bug dependencies.

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2019-07-29 ttl StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2019-07-23 jwe Attached File- Added set-path-cset-2019-07-23-v2-jwe, #47253
    2019-07-23 jwe Attached File- Added move-to-top-diffs.txt, #47251
    2019-07-23 jwe Attached File- Added set-path-cset-2019-07-23-jwe, #47249
        StatusNone In Progress
    2019-07-22 rik5 Attached File- Added set_path.20190722.diff, #47248
    2019-02-05 rik5 Dependencies- bugs #55623 is dependent
    2018-04-12 junwang Attached File- Added set_path_dialog.patch, #43889
    2015-02-02 rik5 Priority5 - Normal 3 - Low
    2014-11-15 mtmiller Severity3 - Normal 1 - Wish

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code