[Geany-Users] Looking to contribute

rhkramer at gmail.com rhkramer at xxxxx
Sun Dec 13 13:43:02 UTC 2015

Thanks for the response--I'm deleting a lot of the older stuff to focus just on 
the newer stuff.

On Saturday, December 12, 2015 09:21:52 PM you wrote:
> You should always keep discussion on-list, that way you have less risk
> of proudly announcing your new feature only to be told you have wasted
> your time and you should have done it another way.  Keeping it on-list
> means you are more likely to find out early before you do too much
> effort. :)

I agree.

> Correct, its better to submit new lexers there.

Yes, in the end, it will be submitted there.  Should I infer that you prefer 
to see the development and discussion moved to one of its lists?

> Geany only supports C++ lexers, lua ones are a Scite feature AFAIK.

So that eliminates the usability of a Lua lexer, which is mostly a good thing, 
but another issue may come up--I'll mention it below.

> The speed difference is probably immaterial, what you need is a clear
> easily maintained implementation for submission to Scintilla, so
> making it similar to other lexers is the way to go.

Originally, the lexers were written in C.  As Scintilla has evolved into C++, 
some, but I don't think yet all of the old lexers have evolved to C++, and, my 
understanding is that C++ is the preferred approach.
> >    * One of the main variations to the basic TWiki Markup language that I
> >    need
> > 
> > to handle is that I allow multiple TWiki records to exist in the same
> > file, You could consider the file to be basically an mbox email file
> > with TWiki records delimited by mbox From header, but with some
> > restrictions placed on it.
> > 
> > I'd like the lexing of the From header to be sufficient to confirm that
> > the header is valid, at least in the applications I use.
> Scintilla lexers do not do syntax or semantic checking, they are for
> highlighting only and should be tolerant of erroneous code, since it
> will exist whilst you are typing.  You would need to put the checking
> code elsewhere, in a plugin maybe.

In the lexers / folders / syntax highlighters I've developed for other editors 
(Kate and Nedit (with a pseudo-folding feature), I incorporated enough 
checking into them that they can confirm the syntax to a sufficient degree that 
it works in the other applications that I used the files in (currently kmail 
and nmail).

I hope to get the same accomplished for the Scintilla based editors.  I was 
considering a possible fallback (or a simplified initial approach) of having a 
pretty simple check with the lexer / folder (the beginning of each record is 
the top level folding point) and then having something like a Lua "macro" 
perform a more detailed check on demand.  I don't know / remember if Scintilla 
has another macro language or something like that could be called on demand.

Never-the-less, my goal is to eventually have the highlighter check in enough 
detail to be sure the From header works in kmail, nmail, and in the syntax 
highlighter I've written for kate.  (The nedit syntax highlighter I wrote is 
for an older version of my "system" and the data files are not directly 
compatible with the Kate version, and I do not expect them to be compatible 
with the Scintilla version.)

If I hear a positive response from Sujeet (that is, that he is still 
interested, in the next email I'll detail what I need to have a valid From 

Randy Kramer

More information about the Users mailing list