Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Newbie] Installing emacs mode

0 views
Skip to first unread message

jee...@gmail.com

unread,
Oct 30, 2005, 3:52:30 AM10/30/05
to
Hello !

I'm new in emacs 'world' and i want to install php/html/css mode on
windows. Someone can help me ?

Sorry about my english i'm a frenchie :>

Thanks alot.

Sebastian Tennant

unread,
Oct 30, 2005, 4:45:59 AM10/30/05
to help-gn...@gnu.org

Well, a common way of 'installing' modes in emacs is a case of putting the
mode's source code elisp files (.el) in a place where they can be found by
emacs, i.e., in a directory listed in the `load-path' variable, and then having
them autoloaded at start-up.

So, create an elisp directory in your home directory;

/home/jeessy/elisp

for instance. Next, add the following line to your /home/jeessy/.emacs file;

(add-to-list 'load-path "/home/jeessy/elisp")

Most modes are entered using an interactive command such as 'M-x css-mode', and
assuming the elisp source is called 'css.el', you then need to add the following
line anywhere after the previous line;

(autoload 'css-mode "css" "CSS editing mode" t nil)
| | |
M-x css-mode | |
| |
source file css.el |
|
This can be anything

Save your .emacs file, quit emacs (assuming you've been using it to edit your
.emacs file) and re-launch. You should be on your way. Just type M-x css-mode
and enjoy :-)

sebyte

P.S. I'm not sure about Windows when it comes to home directories :-/

Bastien

unread,
Oct 30, 2005, 5:01:20 AM10/30/05
to
Sebastian Tennant writes:

>> Sorry about my english i'm a frenchie :>

You may also post to the french group fcae:
<fr.comp.applications.emacs> - au cas où!

--
Bastien

jee...@gmail.com

unread,
Oct 31, 2005, 9:32:20 AM10/31/05
to
Hi, thank you for your reply but on Bill gates'os emacs version i
can't find the .emacs file :|

Sébastien Kirche

unread,
Oct 31, 2005, 10:00:34 AM10/31/05
to
At 15:10 on oct 31 2005, jeessy said :

> Hi, thank you for your reply but on Bill gates'os emacs version i
> can't find the .emacs file :|

Maybe you don't have one yet ? Did you ever customized / installed
something else with emacs ?

Let's try with emacs : open ~/.emacs (C-x C-f ~/.emacs) the '~' sign
stands for your home directory. If the file exist Emacs will open it,
else it will create a new file.

And the ~ directory location depends on your windows system and the
environment : Emacs (and some other programs too) looks for the $HOME
environment variable.

If it is not defined, your ~ directory will probably be c:\ or
c:\documents and settings\your account\

To define the $HOME variable, look into c:\autoexec.bat for the 95/98/Me
family and add line with a SET HOME=path\of\your\choice

To define that variable with NT4/W2k/XP, look into the system icon in
the control panel, there is a button that lets you define the
environment.

Once the variable set you might have to reboot (95/98/Me) or simply
restart Emacs.

And as said Bastien : il y a un groupe *français* pour Emacs
(fr.comp.applications.emacs) ;o)

HTH.
--
Sébastien Kirche

Chris McMahan

unread,
Oct 31, 2005, 10:09:09 AM10/31/05
to
Open emacs on Windows, then load ~/.emacs

Emacs will automatically go to what is considered your home directory
and attempt to open this file. You can see which directory you're in
by executing a dired command from within this file (C-x d)

Alternately, you can set the home environment variable to the
directory of your choosing. I have cygwin installed, and have set the
home directory to c:/cygwin/home/cmcmahan. Works just like a unix
environment for me (with a few caveats).

I set up my environment variables from within my .tcshrc, then launch
emacs from that shell to inherit them on startup. I avoid messing with
the windows environment, but can customize my emacs and cygwin
variables to my heart's content!

- Chris

jee...@gmail.com writes:

> Hi, thank you for your reply but on Bill gates'os emacs version i
> can't find the .emacs file :|
>

--
(. .)
=ooO=(_)=Ooo=====================================
Chris McMahan | first_init...@one.dot.net
=================================================

Sebastian Tennant

unread,
Oct 31, 2005, 3:12:30 PM10/31/05
to help-gn...@gnu.org
jee...@gmail.com wrote:
> Hi, thank you for your reply but on Bill gates'os emacs version i
> can't find the .emacs file :|

So you now have some useful Windows info.

In short you have to create your own ~/.emacs if you don't have one.
Emacs will read then read it at start-up.

It's such a plain and simple file, but don't call it ~/.emacs.txt !!!

It must be ~/.emacs (or $HOME/.emacs).

You can just copy and paste this if you like:

sebyte

;; my ~/.emacs
;;
;; elsip (emacs lisp) uses semi-colons for comments

(add-to-list 'load-path "/home/jeessy/elisp") ;change according to Windows'
;requirements

(autoload 'css-mode "css-mode" "CSS editing mode" t nil) ;"css-mode" corresponds
;to the filename

(global-font-lock-mode 1) ;this will ensure syntax highlighting works

;; end of your ~/.emacs
;;
;; very soon this will be two pages long :-)

Sébastien Kirche

unread,
Oct 31, 2005, 5:11:19 PM10/31/05
to
At 21:10 on oct 31 2005, Sebastian Tennant said :

> ;; end of your ~/.emacs
> ;;
> ;; very soon this will be two pages long :-)

Only two pages ? Mine is currently 44kb long ;o)
--
Sébastien Kirche

Sebastian Tennant

unread,
Oct 31, 2005, 6:21:44 PM10/31/05
to help-gn...@gnu.org
Sébastien Kirche wrote:
> At 21:10 on oct 31 2005, Sebastian Tennant said :
>
>
>>;; end of your ~/.emacs
>>;;
>>;; very soon this will be two pages long :-)
>
>
> Only two pages ? Mine is currently 44kb long ;o)

I said _very soon_ ;-)

jee...@gmail.com

unread,
Nov 1, 2005, 6:21:44 AM11/1/05
to
Thanks thanks thanks !

0 new messages