bugGNU Octave - Bugs: bug #56853, [octave forge] (generate_html)...

 
 

bug #56853: [octave forge] (generate_html) Issues with urlview.m

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Tue 03 Sep 2019 09:36:23 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 12 Dec 2019 03:34:39 PM UTC, comment #6: 

Olaf has fixed this in generate_html with this changeset:
https://sourceforge.net/p/octave/generate_html/ci/1a1f03aaad96f7cdfbacbbb8519c0bc8016ab21a/

Closing report.

Markus Mützel <mmuetzel>
Group administrator
Sun 24 Nov 2019 12:00:48 AM UTC, comment #5: 

Please see file #47750 submitted in bug #57119 with a potential fix.

Markus Mützel <mmuetzel>
Group administrator
Wed 04 Sep 2019 08:15:41 PM UTC, comment #4: 

Yes, either cmd{1} or cmd{:} would be the appropriate fix.

Mike Miller <mtmiller>
Group Member
Tue 03 Sep 2019 07:19:55 PM UTC, comment #3: 

(Hmmm, can't login into Savannah ??)

Thanks for the pointer to bug #56567.

Still this needs to be fixed in the generate_html package, IMO. As Rik stated in that bug report, syntax like "cell_array{}" looks like bad coding practice.
Looking deeper in the actual code, AFAICS it is cmd{1} that is needed so why not supply the index explicitly.

-Philip

Anonymous
Tue 03 Sep 2019 06:31:27 PM UTC, comment #2: 

Here is the change on the development branch: https://hg.savannah.gnu.org/hgweb/octave/rev/3140380861ce. See bug #56167 for full discussion.

Mike Miller <mtmiller>
Group Member
Tue 03 Sep 2019 06:28:08 PM UTC, comment #1: 

Yes, this is a new change in Octave 6.0.0, it still works in Octave 5.1:


>> a = {'f'}
a =
{
  [1,1] = f
}

>> a{}
ans = f


Not sure of the specific change. Just noting that this only affects the development version at the moment, and can easily be fixed to be backwards and forwards compatible.

Mike Miller <mtmiller>
Group Member
Tue 03 Sep 2019 09:36:23 AM UTC, original submission:  

On L.79-80 of urlview.m there is:

    for cmd = {"firefox", "epiphany"}
      if (! ([err, path] = system (sprintf ("which %s", cmd{}))))


...where Octave chokes on the cmd{} syntax with the message:

error: invalid empty index expression
error: called from
    urlview at line 80 column 7


On L.111-112 there's a similar one: pars{}

I don't know if this has ever worked in Octave, I suppose it might have otherwise this wouldn't have crept in the code.
Anyway in Matlab this gives an error as well:

>> a = {'f'}
a =
    'f'
>> a{}
 a{}
   |
Error: Unbalanced or unexpected parenthesis or bracket.


The fix in this case is probably easy, along the lines of:
-      if (! ([err, path] = system (sprintf ("which %s", cmd{}))))
+      if (! ([err, path] = system (sprintf ("which %s", cmd{1}))))


Another issue with urlview is that it won't work on Windows.
The "which" command referenced on L.80 isn't implemented there, nor in the mxe-octave binaries.
Further down Ls. 124-127 don't work either on Windows.

I'd suggest a check at the top of urlview.m along the lines of:

if (ispc)
  error ("urlview doesn't work on Windows systems")
endif


cc'íng Olaf as he is the author of urlview.m

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  • -email is unavailable- added by philipnienhuis
  •  

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-12 mmuetzel StatusNone Fixed
        Open/ClosedOpen Closed
    2019-11-23 mmuetzel Dependencies- bugs #57119 is dependent
    2019-09-04 mtmiller Summary[octave-forge] (generate_html) Issues with urlview.m [octave forge] (generate_html) Issues with urlview.m
    2019-09-03 philipnienhuis Carbon-Copy- Added i7tiol

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code