[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56853] [octave-forge] (generate_html) Issues
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #56853] [octave-forge] (generate_html) Issues with urlview.m |
Date: |
Tue, 3 Sep 2019 05:36:26 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 SeaMonkey/2.48 |
URL:
<https://savannah.gnu.org/bugs/?56853>
Summary: [octave-forge] (generate_html) Issues with urlview.m
Project: GNU Octave
Submitted by: philipnienhuis
Submitted on: Tue 03 Sep 2019 11:36:23 AM CEST
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error
Status: None
Assigned to: None
Originator Name: Philip Nienhuis
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: other
Operating System: Any
_______________________________________________________
Details:
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
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56853>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56853] [octave-forge] (generate_html) Issues with urlview.m,
Philip Nienhuis <=