caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Emacs mode for revised syntax
@ 2007-12-17 16:48 SerP
  2007-12-17 17:26 ` [Caml-list] " Matthieu Dubuget
  2007-12-17 18:37 ` David Teller
  0 siblings, 2 replies; 6+ messages in thread
From: SerP @ 2007-12-17 16:48 UTC (permalink / raw)
  To: Caml-list, caml-list-bounces

	USER_IN_WHITELIST autolearn=ham version=3.2.3

X-Spam-Level: 

X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on luckytravels.com

X-Virus-Scanned: ClamAV 0.80/533/Sat Oct 16 21:09:44 2004
	clamav-milter version 0.80j
	on luckytravels.com
X-Virus-Status: Clean

Hi, Caml-list

Sorry for my bad english.
I'am use emacs with tuareg mode, and wirte in ocaml original syntax.
Now i decide to write in revised syntax - but my emacs don't highlight 
revised syntax correctly.
I can't find any emacs mode for revised syntax, is this exist?
Thanks


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Emacs mode for revised syntax
  2007-12-17 16:48 Emacs mode for revised syntax SerP
@ 2007-12-17 17:26 ` Matthieu Dubuget
       [not found]   ` <E815649E-6215-4DAB-842F-C11DCC08518C@gmx.de>
  2007-12-17 18:37 ` David Teller
  1 sibling, 1 reply; 6+ messages in thread
From: Matthieu Dubuget @ 2007-12-17 17:26 UTC (permalink / raw)
  To: Caml-list

2007/12/17, SerP <serp@stork.ru>:
> I can't find any emacs mode for revised syntax, is this exist?

This is not so far from a more general question about syntactic
extensions and IDE I have been having in mind for some time.

What does need an editor to be able to colorize files using syntax
extensions?

Some ideas:

- it would have to know wich syntax extension is used in each
  file. Until know, this knowledge is at building tools level? Would
  it be a good idea to move this information inside the files.

- there should be some extension of the colorisations rules, also?
  Depends on the IDE?

Well would it be possible (and enough) or something to much difficult
to add some more simple tools that would help any IDE?
Like -dtypes does, for example.
I mean simple tools that would make editors mode more simple to
write (especially emacs, since this is the one I tend to use ;-)

Thanks

Matt


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Emacs mode for revised syntax
  2007-12-17 16:48 Emacs mode for revised syntax SerP
  2007-12-17 17:26 ` [Caml-list] " Matthieu Dubuget
@ 2007-12-17 18:37 ` David Teller
  2007-12-18 16:22   ` Berke Durak
  1 sibling, 1 reply; 6+ messages in thread
From: David Teller @ 2007-12-17 18:37 UTC (permalink / raw)
  To: SerP; +Cc: Caml-list, caml-list-bounces

I've started patching Tuareg for the revised syntax. It's not very clean
as I don't speak elisp natively, but it's starting to work. I'll try and
post that in the beginning of January.

Cheers,
 David


On Mon, 2007-12-17 at 19:48 +0300, SerP wrote:
> Sorry for my bad english.
> I'am use emacs with tuareg mode, and wirte in ocaml original syntax.
> Now i decide to write in revised syntax - but my emacs don't highlight 
> revised syntax correctly.
> I can't find any emacs mode for revised syntax, is this exist?
> Thanks

-- 
David Teller
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations. 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Emacs mode for revised syntax
  2007-12-17 18:37 ` David Teller
@ 2007-12-18 16:22   ` Berke Durak
  2007-12-18 16:59     ` Nicolas Pouillard
  0 siblings, 1 reply; 6+ messages in thread
From: Berke Durak @ 2007-12-18 16:22 UTC (permalink / raw)
  To: David Teller, matthieu.dubuget, caml-list

David Teller a écrit :
> I've started patching Tuareg for the revised syntax. It's not very clean
> as I don't speak elisp natively, but it's starting to work. I'll try and
> post that in the beginning of January.

Hello,

Just an idea:

If you're using ocamlbuild, you'll usually tag preprocessed or revised 
files with something such as camlp4o or camlp4r.  You can display this
information with

   ocamlbuild -show-tags file.ml

Hence, Emacs (or whatever) could call ocamlbuild to see if the file is 
ought to be in revised syntax or not.

-- 
Berke DURAK


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Emacs mode for revised syntax
  2007-12-18 16:22   ` Berke Durak
@ 2007-12-18 16:59     ` Nicolas Pouillard
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Pouillard @ 2007-12-18 16:59 UTC (permalink / raw)
  To: Berke Durak; +Cc: david.teller, matthieu.dubuget, caml-list

Excerpts from Berke Durak's message of Tue Dec 18 17:22:36 +0100 2007:
> David Teller a écrit :
> > I've started patching Tuareg for the revised syntax. It's not very clean
> > as I don't speak elisp natively, but it's starting to work. I'll try and
> > post that in the beginning of January.
> 
> Hello,
> 
> Just an idea:
> 
> If you're using ocamlbuild, you'll usually tag preprocessed or revised 
> files with something such as camlp4o or camlp4r.  You can display this
> information with
> 
>    ocamlbuild -show-tags file.ml
> 
> Hence, Emacs (or whatever) could call ocamlbuild to see if the file is 
> ought to be in revised syntax or not.
> 

Hum, that's a neat idea!
-- 
Nicolas Pouillard aka Ertai


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Emacs mode for revised syntax
       [not found]     ` <9f09a07a0712180653l4d2d218ay8cbd0bc9e6698b77@mail.gmail.com>
@ 2007-12-18 21:58       ` Jan Rehders
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Rehders @ 2007-12-18 21:58 UTC (permalink / raw)
  To: caml-list


On 18.12.2007, at 15:53, Matthieu Dubuget wrote:

> I do not know if it is at will, but you only replied to myself,
> not to caml-list.

Oh, thank you for the notification. Here's my reply, again:

> - it would have to know wich syntax extension is used in each
> file. Until know, this knowledge is at building tools level? Would
> it be a good idea to move this information inside the files.

This also has the potential to simplify build files. This would be a  
Good Thing(tm). On the other hand it could cause troubles if one would  
want to use different extensions for different build configurations  
(the conditional compilation extension might make this desirable).  
This could probably be resolved by making the specified extension the  
default one and allowing one to override it on the command line.

> Well would it be possible (and enough) or something to much difficult
> to add some more simple tools that would help any IDE?
> Like -dtypes does, for example.
> I mean simple tools that would make editors mode more simple to
> write (especially emacs, since this is the one I tend to use ;-)

A tool which emits something like an annotated AST containing  
information like unique ids for names, their AST types etc. would be  
very useful. It could be used for syntax highlighting as well as more  
intricate tasks like refactoring tools. This might prove to be very  
useful for IDE builders. I also made good experiences letting emacs  
query an interactive toplevel for completions etc (for a custom  
language). Steal.. erm getting inspiration from the lisp community


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-12-18 21:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-17 16:48 Emacs mode for revised syntax SerP
2007-12-17 17:26 ` [Caml-list] " Matthieu Dubuget
     [not found]   ` <E815649E-6215-4DAB-842F-C11DCC08518C@gmx.de>
     [not found]     ` <9f09a07a0712180653l4d2d218ay8cbd0bc9e6698b77@mail.gmail.com>
2007-12-18 21:58       ` Jan Rehders
2007-12-17 18:37 ` David Teller
2007-12-18 16:22   ` Berke Durak
2007-12-18 16:59     ` Nicolas Pouillard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).