4

I've just installed new distribution of Ubuntu 10.10.2010, then installed emacs23, I installed also emacs goodies for color themes.

I made the file .emacs in my home directory with the code:

(require 'color-theme)
   (setq color-theme-is-global t)
   (color-theme-euphoria)

but it doesn't work, with any code even (setq inhibit-startup-message t) I made a new file named .emacs.el but nothing. There is a folder with the name ".emacs.d" generated by the installation. I even tried putting emacs file in it, still nothing.

now I think any startup script won't work. so what should I do to know why Emacs doesn't read that file ?


Update: I deleted all the mess files and left the ~/.emacs.el file and now the code is :

(setq inhibit-startup-message   t)
(require 'color-theme)
(setq color-theme-is-global   t)
(color-theme-euphoria)

but gives error: Warning (initialization): An error occurred while loading `/home/marmoush/.emacs.el': Symbol's function definition is void: color-theme-euphoria

Ismail Marmoush
  • 13,140
  • 25
  • 80
  • 114

3 Answers3

2

Weird. Try saving it as ~/.emacs.d/init.el

Galactus
  • 806
  • 7
  • 10
  • 1
    I recommend this. Putting all your settings in a single folder makes things more logical, and you aren't tempted to throw everything in a single setup file. The directory plays well with version control systems, and lastly your setup file isn't (as) hidden. – johntellsall Nov 08 '10 at 17:07
2

I don't know but when I used this code it worked !

(require 'color-theme)
(color-theme-initialize)
(color-theme-robin-hood)
Trey Jackson
  • 73,529
  • 11
  • 197
  • 229
Ismail Marmoush
  • 13,140
  • 25
  • 80
  • 114
  • 1
    If you'd read the quickstart guide, you'd see that you were missing the call to `color-theme-initialize` (which you have in this answer). http://www.nongnu.org/color-theme/#sec8 – Trey Jackson Nov 01 '10 at 20:11
  • @Trey Jackson, I've read a good reference which had both scripts, first one was the one which was actually working 10 months ago, then i moved to IDE's later when I returned to using emacs, I tried the one which was working, and did some search, and thought of trying the second :D ! but I didn't pay much attention to what's in the script (initialize thing) back then – Ismail Marmoush Nov 03 '10 at 16:29
1

First, delete your .emacs file. When Emacs starts up, customize some values using the menu and save them. A new .emacs file should be created somewhere. Find out where, and then edit it as you please.

darioo
  • 46,442
  • 10
  • 75
  • 103
  • Go to Options -> Customize Emacs -> Browse customization groups. Change some settings and choose "Save for future sessions". – darioo Nov 01 '10 at 20:20