vote up 0 vote down star

I downloaded emacs 23.1 from gnu's ftp. untarred it and built it after configuring. I do not find .emacs file in my home directory or anywhere in my system ! Am i missing something ?

flag

migrated from stackoverflow.com

4 Answers

vote up 4 vote down

Or, as a much simpler way (as pointed out in the comment) Ctrl + H v will describe the variable which produces much nicer output.

user-init-file is a variable defined in `C source code'.
Its value is 
"/home/.emacs"

Documentation:
File name, including directory, of user's initialization file.
If the file loaded had extension `.elc', and the corresponding source

file exists, this variable contains the name of source file, suitable for use by functions like custom-save-all' which edit the init file. While Emacs loads and evaluates the init file, value is the real name of the file, regardless of whether or not it has the .elc' extension.

This way is much more verbose. Start up emacs and in your Lisp evaluation buffer type

user-init-file

And press Ctrl+J to evaluate. This will print out where your init file is

user-init-file
"/home/.emacs"
link|flag
2  
Ctrl-H v (describe-variable) to look at a variable. – starblue Nov 20 at 11:27
Thanks, I hadn't seen that before! – Jeff Foster Nov 20 at 11:55
vote up 2 vote down

You have to create the file if you want to configure emacs. You can just create it and start hacking the file manually or use m-x customize and save the customization.

link|flag
1  
Exactly, just "C-x f ~/.emacs" and then go ahead and add your stuff. No .emacs will be generated automatically. – danielpoe Nov 20 at 11:57
vote up 0 vote down

have you tried ls -a ?

link|flag
1  
Also: Have you tried running Emacs once before expecting a configuration file in your home? – Johannes Rössel Nov 20 at 11:05
vote up 0 vote down

See InitFile chapter in EmacsWiki.

Your init file contains personal EmacsLisp code that you want to execute when you start Emacs.

  • For GnuEmacs, it is ~/.emacs or _emacs or ~/.emacs.d/init.el.
  • For XEmacs, it is ~/.xemacs or ~/.xemacs/init.el.
  • For AquamacsEmacs, it is ~/.emacs or ~/Library/Preferences/Aquamacs Emacs/Preferences.el
link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.