bugGNU Octave - Bugs: bug #29427, mex help text not displayed

 
 

bug #29427: mex help text not displayed

Submitted by:  None
Submitted on:  Sat 03 Apr 2010 01:04:55 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: David Bateman <dbateman>
Originator Name: Dan McMahillOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.1
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.

 

Mon 21 May 2012 09:06:09 PM UTC, comment #4:

As mex files are for legacy matlab support we should follow their conventions. Reading the document from mathworks "Introducing Mex files" they write

So the suggestion of allowing the m-files to exist in a different directory seems to be a bad idea to me. I'm closing this bug report as the orginal bug was fixed two years ago, and the follow up comment doesn't seem to be a bug.

D.

David Bateman <dbateman>
Project MemberIn charge of this item.
Tue 13 Mar 2012 04:21:09 PM UTC, comment #3:

Hello. I happened to try out octave-3.6.1 last weekend and found that the patch which was pushed did not work for me. From looking at the source code it appears that the issue is the code which was pushed looks for the .m file in the same directory as the .mex file. However, it isn't clear to me that .m files are supposed to install to the same place as mex files.

I would have thought the right places for the .mex files and .m files would have been:

octave-config --print LOCALVEROCTFILEDIR

and

octave-config --print LOCALVERFCNFILEDIR

-Dan

Anonymous
Sun 25 Apr 2010 09:23:23 PM UTC, comment #2:

Your solution is quite elegant, as get_help_from_file parses the function file and then deletes the function before inserting it in the symbol table. Though it means that the function file has to be parsed every time the help string is requested. I tend to read the help text several times so it would make more sense to me to do something similar to what you propose when loading the mex-file itself so the help string might be cached.

I just pushed the change

http://hg.savannah.gnu.org/hgweb/octave/rev/a61d7248627c

that fixes this issue based on your idea.

Thanks
D.

David Bateman <dbateman>
Project MemberIn charge of this item.
Wed 21 Apr 2010 01:39:57 PM UTC, comment #1:

looks to me like the problem is that in help.cc, we start searching for help text. If we find the function in the symbol table (which I guess means it is either a built-in or dynamically linked as opposed to a script file) then we stop. The patch makes us keep looking if the help text found from the symbol table lookup is empty.

I tried help on a few other functions and it looks like I didn't break anything, but this should be reviewed perhaps by someone who understands that bit of code a little better.

-Dan

Anonymous
Sat 03 Apr 2010 01:04:55 AM UTC, original submission:

I'm using octave-3.2.4. I have a compiled mex function which has been installed to:

${prefix}/libexec/octave/3.2.4/site/oct/i686-pc-linux-gnu/wcalc-1.1/bars_calc.mex

It works. When I run octave, bars_calc() is available as a function and does what I expect.

However, the online help does not work.

octave-3.2.4:1> help bars_calc
error: help: `bars_calc' is not documented

yet I do have this file installed:
${prefix}/libexec/octave/3.2.4/site/m/wcalc-1.1/bars_calc.m

The top several lines of bars_calc.m look like the following. The
first "%" line is the first line of the file.

%BARS_CALC - Self and mutual inductance of a pair of parallel
rectangular bars
%
% SYNOPSIS
%
% [L1, L2, M, k] = bars_calc(a, b, l1, d, c, l2, E, P, l3, freq)
%
% PARAMETERS
% ....

I'm pretty sure that this used to work for me. If interested, wcalc.sf.net has the package that I'm trying to install.

-Dan

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #20292:  patch-aa added by None (327B - application/octet-stream - attached patch seems to fix it.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by dbateman (Posted a comment)
  • -unavailable- added by None (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 21 May 2012 09:06:09 PM UTCdbatemanStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 13 Mar 2012 04:54:19 PM UTCjordighStatusFixed=>None
    Tue 13 Mar 2012 04:54:01 PM UTCjordighOpen/ClosedClosed=>Open
      Release3.2.4=>3.6.1
      Summarymex help text not working=>mex help text not displayed
    Sun 25 Apr 2010 09:23:23 PM UTCdbatemanStatusNone=>Fixed
      Assigned toNone=>dbateman
      Open/ClosedOpen=>Closed
    Wed 21 Apr 2010 01:37:30 PM UTCNoneAttached File-=>Added patch-aa, #20292

    Back to the top


    Powered by Savane 3.1-cleanup1