Alain Nadeau | 19 Mar 17:44 2012
Picon

[Jed-users-l] New mode for n3 / turtle

Hello to everyone,

Just been spending some time trying to define a jed mode for N3/turtle RDF
notation:

http://www.w3.org/TeamSubmission/turtle/

But, as always when I'm working on a new mode, documentation on the various
options and commands is so scarce that I'm losing a lot of time with plain
trial and error trying to achieve the desired results. Not to mention
losing my sanity in the process.

I'm basically seeking something like the very nice n3 mode offered by emacs

http://larve.net/people/hugo/2003/scratchpad/NotationThreeEmacsMode.html

Notice how this one has the following features:

- chars in one color before a colon, and in another after the colon...

- URLs in one color, from the starting "<" to the closing ">", even and
including a "#" sign before the closing ">".

- how keyword " <at> prefix" is all in one color, including the " <at> "...

All seemingly easy stuff. Until one tries to achieve that.

I have no problems (duh!) with defining keywords through define_keywords_n.

But everything that has to do with dfa_define_highlight_rule in order to
(Continue reading)

John E. Davis | 20 Mar 18:51 2012
Picon

Re: [Jed-users-l] New mode for n3 / turtle

Alain Nadeau <nadeau <at> peraldus.ch> wrote:
> I'm basically seeking something like the very nice n3 mode offered by emacs
>
> http://larve.net/people/hugo/2003/scratchpad/NotationThreeEmacsMode.html
>
> Notice how this one has the following features:
>
> - chars in one color before a colon, and in another after the colon...
>
> - URLs in one color, from the starting "<" to the closing ">", even and
> including a "#" sign before the closing ">".
>
> - how keyword " <at> prefix" is all in one color, including the " <at> "...
>
> All seemingly easy stuff. Until one tries to achieve that.
>
> I have no problems (duh!) with defining keywords through define_keywords_n.
>
> But everything that has to do with dfa_define_highlight_rule in order to
> obtain the features described above has been a failure. I fail to grasp the
> regex vocabulary needed.

See doc/txt/dfa.txt for a description of the dfa RE syntax.  Here is
something that I threw together this morning that you might find
helpful.  --John

create_syntax_table ("n3");
define_syntax ("A-Za-z", 'w', "n3");

#ifdef HAS_DFA_SYNTAX
(Continue reading)

Alain Nadeau | 24 Mar 09:29 2012
Picon

Re: [Jed-users-l] New mode for n3 / turtle

Hi John,

Thanks for the ref. to dfa.txt. After all these years working with jed I
had never known it was there.

And thanks for giving me a starting mode. With a few tweeks I now have a
working n3 mode. Excellent. But not everything is working as expected.
Could it have to do with the fact that I'm still using 0.99.13?

Best regards,

Alain

On Tue, Mar 20, 2012 at 18:51, John E. Davis <davis <at> space.mit.edu> wrote:

> Alain Nadeau <nadeau <at> peraldus.ch> wrote:
> > I'm basically seeking something like the very nice n3 mode offered by
> emacs
> >
> > http://larve.net/people/hugo/2003/scratchpad/NotationThreeEmacsMode.html
> >
> > Notice how this one has the following features:
> >
> > - chars in one color before a colon, and in another after the colon...
> >
> > - URLs in one color, from the starting "<" to the closing ">", even and
> > including a "#" sign before the closing ">".
> >
> > - how keyword " <at> prefix" is all in one color, including the " <at> "...
> >
(Continue reading)

John E. Davis | 24 Mar 20:59 2012
Picon

Re: [Jed-users-l] New mode for n3 / turtle

Alain Nadeau <nadeau <at> peraldus.ch> wrote:
> Could it have to do with the fact that I'm still using 0.99.13?

It is hard to say without knowing what does not work.  Nevertheless,
0.99.13 is ancient and you should upgrade.  The latest development
version if available from <http://jedsoft.org/snapshots/>.  --John
_______________________________________________
Jed-users-l mailing list
Jed-users-l <at> jtan.com
http://mailman.jtan.com/mailman/listinfo/jed-users-l


Gmane