bugGNU Octave - Bugs: bug #44202, Some documentation items are...


bug #44202: Some documentation items are accessible using "doc" in cli but not in GUI

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Sat 07 Feb 2015 03:08:11 PM UTC  
Category:  GUI Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 05 Sep 2017 04:14:00 AM UTC, comment #4: 

I checked in a fix here (http://hg.savannah.gnu.org/hgweb/octave/rev/94cbb6dd7b21).  It turns out the QString class has a simple library function to remove all occurrences of a single character (in this case space) from a string. 

Rik <rik5>
Project Administrator
Sat 02 Sep 2017 03:56:36 PM UTC, comment #3: 

Interesting. I seem to recall there being either another bug or at least a mail list discussion on doc not going to certain topics... Winder if its related. Will hunt around and post a list if I find it, unless someone else remembers what I'm taking about and posts it first.

Nicholas Jankowski <nrjank>
Fri 01 Sep 2017 07:25:26 PM UTC, comment #2: 

This code is buried but it seems to be in libgui/src/qtinfo/parser.cc.  The routine is: 

parser::find_ref (const QString& ref_name)
  QString text = "";

  QHash<QString, node_position>::iterator it;
  for (it = _ref_map.begin (); it != _ref_map.end (); ++it)
      QString k = it.key ();
      node_position p = it.value ();

      if (k == "XREF" + ref_name)
          // found ref, so return its name
          text = "XREF" + ref_name;

  if (text.isEmpty ())  // try the statement-nodes
      QHash<QString, node_map_item>::iterator itn;
      for (itn = _node_map.begin (); itn != _node_map.end (); ++itn)
          QString k = itn.key ();
          if (k == "The " + ref_name + " Statement")
              // found ref, so return its name
              text = k;

  return text;

If I look in octave.info I see that the the XREF objects have whitespace removed.

octave.info:Ref: XREFaxescolor936269

I just tried this in the GUI and it works.

doc ('axescolor')

It seems like this is a simple fix.  The search string just needs to be stripped of whitespace before continuing.

Rik <rik5>
Project Administrator
Wed 08 Feb 2017 12:47:57 AM UTC, comment #1: 

I was playing with this in 4.2.0 and it seems that the GUI intercepts calls to doc. I made some changes to doc.m (displaying random text, etc), and it seemed that they are ignored. I put 'keyboard' as the first line in the function, well before the:

    if (isguirunning ())
      __octave_link_show_doc__ (function_name);

and the window jumped right over to the Documentation tab showing the requested function, nothing different in the interpreter.  I was thinking of stepping through doc.m to see why it works from the cli but not the gui, but doc.m seems to not matter.

So, how is a doc call handled in the GUI?

Nicholas Jankowski <nrjank>
Sat 07 Feb 2015 03:08:11 PM UTC, original submission:  


When run in cli mode, the following will run info and point to the right documentation item, i.e. the axes color property documentation:

doc ("axes color")

I find this very handy and it would be great if the GUI documentation browser could be able to do the same.

Pantxo Diribarne <pantxo>
Project Member


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

Attach Files:

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 nrjank (Posted a comment)
  • -email is unavailable- added by pantxo (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-09-05 rik5 StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2017-09-01 rik5 StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.6