On 10 March 2010 18:53, Søren Hauberg <[email protected]> wrote:
> Yes it takes 5 minutes for you. The problem is the GtkSourceView
> maintainers. They try to keep backwards compatibility meaning that if we
> remove a function from Octave, they will not remove said function from
> the syntax highlighter. I agree with their logic, but it has the
> potential downside that we end up highlighting functions that doesn't
> exist. If you add all currently available functions to the highlighter
> then the chance of this happening increases quite a bit.
>
> That being said, I like it when built-in functions are highlighted, so
> I'm not quite sure what the best approach is here.
>
I guess the middle point will have to suffice then. On the list of
functions that should be removed from the one I made (or added to the
current one), could someone suggest them? I'm but a simple basic user
of Octave, with less than a month experience and in a field that has
very small needs.

Also, If a certain user wants all functions listed, he would have to
do it himself which is not that hard. Maybe a comment could be added
to instruct a user on how to do it.

> You are thinking in terms of
>
>  pkg load my_package
>
> right? I guess I can see the point in that.

Yes. Like I mentioned before, I'm but a simple basic user of Octave
and currently that's the only use I have for pkg.

> I use gedit, so I don't think I can be of much help. I still think we
> should use Octave-style comments, though.
>

I also use gedit. When I choose a bunch of lines to be commented
automatically, it comments every single line. I just added those two
lines because there's the option and there may be users who like it
and it doesn't cost me anything. And aren't, since version 3.2, block
comments an octave feature/style of comments?

>>
>> If they have the same syntax as printf, it's already working.
>
> Great!

Maybe I should change the name of the context to avoid
misinterpretations. Just in case someone tries to change it further in
the future.

>> Actually, anything between double quotes that tries that get that
>> highlight.
>
> Why not single quotes as well?
>

I just tend to think that if it's between single quotes, everything is
ignored. One thing that I noticed only now that you mentioned, is that
the escape character works between single quotes but only in printf.

a = "Escape is working\n"
printf ("Escape is still working\n")

a = 'Escape is not working\n,'
printf ('Escape is working again')

I guess I should make the escape and printf work inside single quotes
as well. What are the functions that make escape work inside single
quote?

> But NaN is indeed a function. When you write
>
>  a = NaN
>
> you are actually calling the 'NaN' function.
>

So should I make NaN be highlighted as a function or as reserved
constant as it was before? From what you say, then my opinion is it
should be highlighted as function.

> I think just highlighting the rest of the line is fine. You really don't
> want to list all possible packages in there. Think maintenance (both on
> your part but also on the GtkSourceView maintainers part).
>

What about also highlight the possible arguments for pkg but don't
highlight the name of the packages? It would be up to the user to make
sure he typed that name right. Commenting everything until the end of
the line doesn't seem very correct.

Carnë Draug

------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to