Patience grasshopper, no need to use the f***** curse word on this
illuminating mailing list.

Packaged in with the nesc package is the nesc mode for emacs along with a
read me.

The package can be found various places but the one I recommend is from
http://tinyprod.net/repos/debian-dev/

After installed the files in question show up as:

/usr/share/ncc/editor-modes/emacs
/usr/share/ncc/editor-modes/emacs/readme.txt
/usr/share/ncc/editor-modes/emacs/old-nesc.el
/usr/share/ncc/editor-modes/emacs/nesc.el
/usr/share/ncc/editor-modes/emacs/new-nesc.el


I keep misc things like nesc.el in ~/.emacs_lib, and that is where I copied
the files in question.
The destination of said copying is reflected in your emacs load-path.

cp /usr/share/ncc/editor-modes/emacs/*nesc.el ~/.emacs_lib

In you .emacs file you want to add:

(setq load-path (append (list "~/.emacs_lib") load-path))
(autoload 'nesc-mode "nesc.el")
(add-to-list 'auto-mode-alist '("\\.nc\\'" . nesc-mode))


Now when you open a .nc file it will automatically invoke nesc-mode for
that file.

Note: The cc-mode files in Emacs version 22 had some problems which I never
tracked down (it was weird) but 23 and cc-mode (5.31.8) works fine.
You are using Oneric which has 23.3 so should be fine.

eric


On Sat, Jan 28, 2012 at 11:04 PM, Corentin Henry <[email protected]>wrote:

> Hello,
>
> I just start with tinyos. My first assignment is to configure my working
> environment and write a simple program in NesC. But my favorite editor,
> emacs, does not have nesc mode...
>
> I tried to install *emacs-nesc-el *(I use ubuntu 11.10, so I installed
> this rpm with alien, without problem). But no nesc-mode, and not even an
> error mesage.
>
> Then I tried the method found here :
> http://mail.millennium.berkeley.edu/pipermail/tinyos/2004-February/000188.html
> But still no nesc-mode, and no error message.
>
> Emacs is cool but quite painful to configure... Does anyone know how to
> get this f**** nesc-mode inside emacs ????? For the moment I use c-mode but
> it's not adapted.
>
> Thank you in advance,
>
> Silmaa
> * *
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to