In my latest ubuntu box,

  1. When I type for example emacs ~/.bashrc, Emacs will start but not open .bashrc. This is true for any file I pass in. I've used Emacs for several years, and have never experienced this problem before.

  2. I added (global-font-lock-mode 1);; to my .emacs file, and Emacs does recognize it, for example. "(C++/; Abbrev)", but it won't do syntax highlighting.

If you can solve any of these problems, it will be very appreciated. The following is my machine's configuration:

uname -a
Linux 2.6.35-28-generic-pae #49-Ubuntu SMP Tue Mar 1 14:58:06 UTC 2011 i686 GNU/Linux

~/.emacs
(global-font-lock-mode 1);;

link|improve this question
1  
Better asked on askubuntu.com – Oded Mar 26 '11 at 21:22
1  
What happens if you start emacs then use C-x C-f to open ~/.bashrc? Might give you a useful error message. – Tom Zych Mar 26 '11 at 21:27
1  
Does the *Messages* buffer contain anything useful? – MatthewD Mar 27 '11 at 2:35
hi thanks a lot, it seems it is caused by the directory ~/.emacs.d, emacs actually complains upon startup :"~/.emacs.d already exists". So I removed ~/.emacs.d, and now everything works! (I can open files through command line argument and syntax highlighting also works now). @Tom, previously I can start emacs, and then use C-x C-f to open .bashrc, but cannot open by > emacs ~/.bashrc – Jus Mar 27 '11 at 5:13
feedback

migrated from stackoverflow.com Mar 27 '11 at 8:13

This question came from our site for professional and enthusiast programmers.

1 Answer

Remember: you may have either ~/.emacs file or a ~/.emacs.d/ directory, not both. In the latter case you use ~/.emacs.d/init.el file instead of ~/.emacs file.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown