Tuesday, October 12, 2010

For personal customization of .emacs file

Missing .emacs file
Missing emacs init file

you can't find your .emacs file anywhere in your system. You've already looked in you home directory and it's nowhere to be found. Could somebody help me out?

So the solution is here.

There are two main versions of emacs - emacs and Xemacs and I don't think that either of them creates a .emacs file automatically - you have to create your own.

So what do you put in your .emacs? There are lots of examples of .emacs's that you can google for on the net, but here's one to start you off...
http://www.dotemacs.de/dotfiles/sample.emacs.html
...just save it to .emacs in your home directory.

If you have Xemacs installed, they don't use a file called .emacs but create a directory called .xemacs. Inside that directory you create a file called custom.el and that functions as your .emacs.

location of .emacs file :
/home/yourname/.emacs

eg: /home/siva/.emacs

Then add according to your need of your choice in emacs and save the file

sample .emacs file
;--------------------------

;displays the time in the status bar
(display-time)

;show paren, brace, and curly brace "partners" at all times
(show-paren-mode t)

;displays the battery power of laptop
(display-battery-mode)

;menu bar mode disable
(menu-bar-mode)

;status bar
(set-face-foreground 'modeline "blue")

;status bar
(set-face-background 'modeline "white")

;-------------------

No comments:

Post a Comment