octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: private functions in the core Octave distribution


From: Søren Hauberg
Subject: Re: private functions in the core Octave distribution
Date: Wed, 02 Dec 2009 10:04:49 +0100

ons, 02 12 2009 kl. 02:57 -0500, skrev John W. Eaton:
> On  2-Dec-2009, S ren Hauberg wrote:
> 
> | Yes, '__makeinfo__' is used in the 'generate_html' package, that we plan
> | on using for generating the Octave-Forge web pages (this was my
> | motivation for rewriting the help system into m-files). If you would
> | like to make the '__makeinfo__' function private then I can just work
> | around this by adding the corresponding 'private' directory to the
> | path.
> 
> Hmm.  Shouldn't Octave prevent you from putting the private directory
> in the path?  Otherwise, what is the use of having private
> directories?  I see that it is currently allowed, but I think Matlab
> prohibits it.  I think the Matlab behavior is probably the right thing
> here, so we should fix the problem in Octave.

For debugging purposes it can be quite handy to be able to add private
directories to the path. This can make it easier to debug a single
private function.

For me the most important part of the private directories is that their
content is hidden by default. If the user for some reason decides to add
the private directory to the path, then I guess the user known that he
or she is doing something that you're not supposed to do.

> I don't object to having this function be public, except that I think
> it should probably have a different name to avoid some confusion.  If
> we just call it "makeinfo", people might expect it to simply be a
> wrapper around the makeinfo program, but it does something different
> from just running makeinfo on a file.

How about calling it 'format_help_text' or something like that?

> | > I don't see any uses of __strip_html_tags__, so maybe that should be
> | > deleted from Octave?
> | 
> | It's being used in 'help'.
> 
> Where?  I did
> 
>   find . -type f | xargs grep -l __strip_html_tags__
> 
> in the top-level directories of both Octave and Octave Forge and it
> only turned up the scripts/help/__strip_html_tags__.m file in the
> Octave sources.

Ahh, I got confused. 'help' contains the following:

      case "html"
        [text, status] = strip_html_tags (text);

but that isn't quite the same as calling '__strip_html_tags__'.

Soren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]