bugGNU Octave - Bugs: bug #46008, Help function fails to return help...

 
 

bug #46008: Help function fails to return help header for nested functions

Submitted by:  Tasos Papastylianou <tpapastylianou>
Submitted on:  Sun 20 Sep 2015 03:49:14 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Tasos Papastylianou <tpapastylianou>Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 23 Nov 2017 07:07:10 PM UTC, comment #3:

I refreshed the patch to apply against the current development branch and pushed it here (http://hg.savannah.gnu.org/hgweb/octave/rev/9a1b193ddd01).

The problem with nested functions is trickier. Attached is a small diff that I used just for testing. It shows that, for a nested function, the depth is correct (goes to 2 rather than 1), but that the help_text is that of the enclosing function. It looks like a joint fix with the lexer and parser will be required to support help for nested functions.

(file #42463)

Rik <rik5>
Project Administrator
Wed 22 Jun 2016 11:21:53 AM UTC, comment #2:

Can this patch be applied yet? It is one of those beautiful fixes that only removes code.

Here is a changeset that implements Mike's change, and gives a comment explaining the problem for nested functions.

(file #37547)

Lachlan Andrew <lachlan>
Project Member
Tue 22 Sep 2015 08:14:12 PM UTC, comment #1:

Attached patch supports help strings on subfunctions, but not nested.

When I do the next obvious change to this conditional, the docstring of the Foo function is assigned to be the help text for the Fizz nested function, and Foo gets no help text.

Needs a little more work if help on nested functions is desired.

(file #34955)

Mike Miller <mtmiller>
Project Administrator
Sun 20 Sep 2015 03:49:14 PM UTC, original submission:

To replicate:

  • in file Foo.m:
  • at the terminal:
  • (matlab output for reference):

The error seems to stem from get_help_text which is a built-in (libinterp/corefcn/help.cc), called by help.m
This seems to return format = "not documented" back to help.m instead of a more appropriate value.

Tasos Papastylianou <tpapastylianou>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #42463:  oct-parse.diff added by rik5 (696B - text/x-patch)
file #34955:  bug46008.diff added by mtmiller (479B - text/x-diff)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by rik5
  • -unavailable- added by lachlan (Updated the item)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by tpapastylianou (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 23 Nov 2017 07:07:10 PM UTCrik5Attached File-=>Added oct-parse.diff, #42463
      StatusPatch Submitted=>Confirmed
      SummaryHelp function fails to return help header for subfunctions and nested functions=>Help function fails to return help header for nested functions
      Carbon-Copy-=>Added jwe
    Thu 23 Nov 2017 06:33:21 PM UTCrik5Dependencies-=>bugs #52461 is dependent
    Wed 22 Jun 2016 11:21:53 AM UTClachlanAttached File-=>Added bug_46008_help_on_subfunctions.cset, #37547
    Tue 22 Sep 2015 08:14:12 PM UTCmtmillerAttached File-=>Added bug46008.diff, #34955
      Item GroupIncorrect Result=>Matlab Compatibility
      StatusNone=>Patch Submitted

    Back to the top


    Powered by Savane 3.1-cleanup1