1

hi im new to ubuntu and very very new to emacs I've installed them and happily editing files and doing all other things except for the emacs doesn't work for me the way it is supposed to. No syntax highlighting and code hinting and the awful color theme is hurting my eyes please help me configure it have been searching for this on google for about 10-15 hours and ended up instructions like this that i dont even understand :

(add-to-list 'load-path "/path/to/color-theme.el/file")
(require 'color-theme)
(eval-after-load "color-theme"
 '(progn
    (color-theme-initialize)
    (color-theme-hober)))
Thomas
  • 17,016
  • 4
  • 46
  • 70
maniteja
  • 687
  • 2
  • 16
  • 32

1 Answers1

2
  1. Add package repositories:

    (package-initialize)
    (add-to-list
     'package-archives
     '("marmalade" . "http://marmalade-repo.org/packages/"))
    (add-to-list
     'package-archives
     '("melpa" . "http://melpa.milkbox.net/packages/"))
    
  2. M-x package-list-packages.

  3. Select some theme, e.g. zenburn-theme (you can use C-s to search for it).
  4. Mark for install with i and execute install with x.
  5. Test this in *scratch*

    (require 'zenburn-theme)
    
  6. If you like it, add it permanently to ~/.emacs, otherwise keep browsing the repositories.

abo-abo
  • 20,038
  • 3
  • 50
  • 71
  • i get the steps from 2 but the step 1 :/ i dont know what that means or where to add it? and thank you :) – maniteja Jan 08 '14 at 15:05
  • Hi and welcome ! Some recommended reading: http://wikemacs.org/index.php/User's_Initialization_File which links to http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html#Init-File and about themes: http://wikemacs.org/index.php/Themes – Ehvince Jan 08 '14 at 15:17
  • @abo-abo installed it but no joy – maniteja Jan 08 '14 at 15:38
  • At which step are you? – abo-abo Jan 08 '14 at 15:43
  • thanx for helping brother i guess now it time to switch back to netbeans – maniteja Jan 08 '14 at 15:47
  • What does it say when you press `x`? – abo-abo Jan 08 '14 at 15:48
  • FWIW --- I do not particularly recommend the Wikemacs post that @Ehvince recommends (but do take a look at it anyway). It is superficial and misleading, saying that `color-theme.el` "had some problems that we won’t be discussing here", and saying nothing about problems with custom themes. Instead, or at least in addition, I recommend [this post](http://www.emacswiki.org/emacs/ColorTheme) on Emacs Wiki -- it covers both color themes and custom themes, with some details about color themes instead of empty dismissal. For details about custom themes, see the Emacs manual. – Drew Jan 08 '14 at 15:54
  • The best source for info about your [init file](http://www.emacswiki.org/emacs/InitFile) and your [custom file](http://www.emacswiki.org/emacs/CustomFile) is the Emacs manual. – Drew Jan 08 '14 at 16:01
  • Maniteja: don't give up ! it's not as difficult as you think. You may need some doc about the package system: http://wikemacs.org/index.php/Elpa (as @Drew pointed out, Wikemacs is less complete than emacswiki, but you'll still find very usefull stuff, and better organized). – Ehvince Jan 08 '14 at 18:07
  • I wasn't gonna give up until yesterday brother but its eating away all my time so had no choice and will surely try it again now @Ehvince – maniteja Jan 09 '14 at 06:06
  • took some time reinstalled every thing and went thru all of your instructions and installed the package it worked the theme changes :) thank you all :D but it still doesnt do the syntax highlighting and auto completion like it does in netbeans IDE is there some other package ihave to install to do that? – maniteja Jan 09 '14 at 09:34
  • 1
    Surely there has to be syntax highlighting. Emacs does this out of the box. What's the file extension? – abo-abo Jan 09 '14 at 09:38
  • .php is the file extension – maniteja Jan 09 '14 at 09:42
  • i've just now check it with cpp extension and works gr8 :D i love it but doesnt work for .php – maniteja Jan 09 '14 at 09:50
  • 1
    I don't know php, but probably you should install `php-mode` from the repository just like you did before. If you get more issues with that, ask a new question. – abo-abo Jan 09 '14 at 09:53
  • 1
    Yes there is a `php-mode` in the packages. Also you may benefit from using Emacs Prelude, it's a very good Emacs configuration out of the box. http://wikemacs.org/index.php/Prelude and https://github.com/bbatsov/prelude – Ehvince Jan 09 '14 at 09:58
  • just installed it working gr8 im loving it thank you all – maniteja Jan 09 '14 at 10:05