On 10 March 2010 22:38, Søren Hauberg <[email protected]> wrote:
> I don't think we should ask users to make local modifications of these
> files (even if it is easy).
It wouldn't be asking the users to do it. It would be to have a list
of the most used/main functions. And then, just add a 2-line comment
saying that more functions can be added by the user, in that context
block, and that to obtain a list of functions in octave, to use
__list_functions__ . maybe also explain the reason why not all
functions are there. This is a small thing and it would help a lot. I
didn't knew about __list_functions__ and had to write a Perl script
that extracted all of them from your website.
> For some time I have been thinking about
> making a proper Octave plugin for gedit. The next version of gedit
> should allow for tab completion and inline documentation, both of which
> I'd love to have in my editor, so an Octave plugin would be nice. I
> guess it would be possible to allow users to add a list of functions
> that should be highlighted via a plugin. This might be better??
That's also one of my plans. I was planning on checking the LaTeX
plugin to see how it works. I probably will never get to do it because
of my small knowledge of programming (only a bit of Perl and now some
Octave but I'm getting better). I like the idea of having a plugin
that would extend the syntax highlight. It would probably fit better
as another feature of the highlighter plugin tough that would make
these changes locally.
> It should be said that if I start working on this, then it won't be
> until the next version of Ubuntu is out as I won't have access to the
> latest gedit till then.
You should try Debian testing. It's much more stable than it sounds
and you always have the unstable repository when you really need the
latest version.
> We, however, also allow
>
> #{
> This is a comment
> #}
>
I didn't knew about the Octave version of block comments. I though
only the same as Matlab worked. I'll change this in the metadata and
change the syntax highlight as well.
> Actually, all of the constants (pi, eps, ...) are functions these days.
> I didn't think too much about it, but I guess it is nice to have them
> differently formated than normal functions, though. So, to me it is fine
> to leave it as it is. Again, sorry for any confusion I've caused.
I see your point. It's like there's no well defined line that
separates them. Then, shouldn,t "zeros" or "ones" also be made
constants? It's unlikely that one will ever use them as constant
instead of function but if one takes to the ridiculous... It can't be
too hard to just check if it's a function
NaN(\s)*(?!\() <-- not tested but this should highlight it as variable
if after NaN and any ammount of whitespace, is anything except opening
parenthesis
> If you write
>
> pkg load image
>
> then it is perfectly fine to just highlight the rest of the line. If
> you, however, call 'pkg' like a function, i.e.
>
> pkg ("load", "image")
>
> then technically the rest of the line should not be highlighted as there
> could be another function call on the same line, i.e.
>
> pkg ("load", "image"); plot (1:10);
>
> If you can deal with this, then it would be nice, but I don't see it as
> being a high priority.
I think this can be easily dealt with. I'll have a 18 hours travel
tomorrow so loads of time to do it.
> P.S. When I open an Octave file in gedit it defaults to formatting it
> like it was Objective-C (that language also use the .m extension). If
> you're going to talk to the GtkSourceView developers, it would be nice
> to hear if this is a problem that can be dealt with.
I also had that problem but only for the first few times. I don't know
why, maybe it keeps track of how many times it used each syntax and
uses the most used when there's more than one option. All I know is
that it no longer selects Objective-C.
Carnë Draug
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev