cloned source, help just displaying copyright text?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

cloned source, help just displaying copyright text?

nrjank
haven't played with the source in a little while, but did something change in the docstrings that's preventing help from rendering the full docstring? running help on any command in the source tree displays only the copyright block rather than the function help. I do see that there were changes to the copyright portion of the docstring.  Deleting the first two comment lines (all the #### ) returns the behavior to normal.

e.g.:

from \octave\scripts\general

>> help common_size
'common_size' is a function from the file C:\Programs\vcs\home\nrjank\hgcode\octave\scripts\gener
al\common_size.m


 Copyright (C) 1995-2020 The Octave Project Developers

 See the file COPYRIGHT.md in the top-level directory of this
 distribution or <https://octave.org/copyright/>.

 This file is part of Octave.

 Octave is free software: you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 Octave is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Octave; see the file COPYING.  If not, see
 <https://www.gnu.org/licenses/>.



Additional help for built-in functions and operators is
available in the online version of the manual.  Use the command
'doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at https://www.octave.org and via the [hidden email]
mailing list.


After deleting lines 1 and 2:
>> help common_size
'common_size' is a function from the file C:\Programs\vcs\home\nrjank\hgcode\octave\scripts\gener
al\common_size.m

 -- [ERR, YI, ...] = common_size (XI, ...)
     Determine if all input arguments are either scalar or of common
     size.

     If true, ERR is zero, and YI is a matrix of the common size with
     all entries equal to XI if this is a scalar or XI otherwise.  If
     the inputs cannot be brought to a common size, ERR is 1, and YI is
     XI.  For example:

          [err, a, b] = common_size ([1 2; 3 4], 5)
               => err = 0
               => a = [ 1, 2; 3, 4 ]
               => b = [ 5, 5; 5, 5 ]

     This is useful for implementing functions where arguments can
     either be scalars or of common size.

     See also: size, size_equal, numel, ndims.

Additional help for built-in functions and operators is
available in the online version of the manual.  Use the command
'doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at https://www.octave.org and via the [hidden email]
mailing list.


Reply | Threaded
Open this post in threaded view
|

Re: cloned source, help just displaying copyright text?

John W. Eaton
Administrator
On 2/12/20 1:52 PM, Nicholas Jankowski wrote:
> haven't played with the source in a little while, but did something
> change in the docstrings that's preventing help from rendering the full
> docstring? running help on any command in the source tree displays only
> the copyright block rather than the function help. I do see that there
> were changes to the copyright portion of the docstring.  Deleting the
> first two comment lines (all the #### ) returns the behavior to normal.
>
> e.g.:

It works for me.  Did you start with a completely fresh build tree?

Are you trying to use an older version of Octave to get help from the
current source .m files?  That's not expected to work.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: cloned source, help just displaying copyright text?

Mike Miller-4
On Wed, Feb 12, 2020 at 14:22:39 -0500, John W. Eaton wrote:

> On 2/12/20 1:52 PM, Nicholas Jankowski wrote:
> > haven't played with the source in a little while, but did something
> > change in the docstrings that's preventing help from rendering the full
> > docstring? running help on any command in the source tree displays only
> > the copyright block rather than the function help. I do see that there
> > were changes to the copyright portion of the docstring.  Deleting the
> > first two comment lines (all the #### ) returns the behavior to normal.
> >
> > e.g.:
>
> It works for me.  Did you start with a completely fresh build tree?
>
> Are you trying to use an older version of Octave to get help from the
> current source .m files?  That's not expected to work.
Yeah, confirmed, and that's probably going to confuse some people, just
something to keep in mind. For example, we often tell users that they
can drop a function file into their load path in an older version of
Octave for simple bug fixes.

For full clarity, the change is that Octave 6 now allows newlines and
carriage returns before the word "Copyright" in the first comment block
in a function file. Octave 5 and older required that "Copyright" or
"Author" be the first word in the first line for the comment block to be
ignored for the purposes of finding the docstring.

Cheers,

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cloned source, help just displaying copyright text?

John W. Eaton
Administrator
On 2/12/20 2:35 PM, Mike Miller wrote:

> Yeah, confirmed, and that's probably going to confuse some people, just
> something to keep in mind. For example, we often tell users that they
> can drop a function file into their load path in an older version of
> Octave for simple bug fixes.

If it's a problem, then we could partially revert the copyright block
decoration change in the .m files, at least for the next few releases.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: cloned source, help just displaying copyright text?

nrjank
In reply to this post by Mike Miller-4


On Wed, Feb 12, 2020 at 2:35 PM Mike Miller <[hidden email]> wrote:
On Wed, Feb 12, 2020 at 14:22:39 -0500, John W. Eaton wrote:

> Are you trying to use an older version of Octave to get help from the
> current source .m files?  That's not expected to work.

Yeah, confirmed, and that's probably going to confuse some people, just
something to keep in mind. For example, we often tell users that they
can drop a function file into their load path in an older version of
Octave for simple bug fixes.

confirmed I was still using 5.1.0 (and same with 5.2.0) on Windows.
Reply | Threaded
Open this post in threaded view
|

Re: cloned source, help just displaying copyright text?

Mike Miller-4
In reply to this post by John W. Eaton
On Wed, Feb 12, 2020 at 14:41:50 -0500, John W. Eaton wrote:
> If it's a problem, then we could partially revert the copyright block
> decoration change in the .m files, at least for the next few releases.

I'd rather not. It's a tiny problem, the user can easily fix it by
deleting the first two comment lines.

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cloned source, help just displaying copyright text?

nrjank
On Wed, Feb 12, 2020 at 3:06 PM Mike Miller <[hidden email]> wrote:
On Wed, Feb 12, 2020 at 14:41:50 -0500, John W. Eaton wrote:
> If it's a problem, then we could partially revert the copyright block
> decoration change in the .m files, at least for the next few releases.

I'd rather not. It's a tiny problem, the user can easily fix it by
deleting the first two comment lines.

my only issue is using a <6 version to work on any source edits. I can easily trim those two lines when playing with docstrings until V6 comes out.