Questions tagged [dot-emacs]

.emacs (dot-emacs where the initial period causes problems) is the name of the main configuration file of the emacs text editor.

.emacs (dot-emacs when the initial period causes problems) is the name of the main configuration, initialization, and customization file of the GNU text editor. In absence of .emacs GNU Emacs version 23 and higher uses .emacs.d/init.el as initialization file.

The contents of the Emacs initialization file is read and execute by Emacs at startup, and changing it is the most common way of customizing an Emacs environment. The configuration and customization directives in the .emacs file frequently invoke further packages so that the main file doesn't become impractically long: these are conventionally stored in the .emacs.d directory. In addition to hand-editing the file, changes to it can be made with emacs' M-x customize facility.

See also:

218 questions
15
votes
2 answers

can I change emacs' default compile command?

Emacs defaults to the command make -k when I run compile. However, I pretty much never think it's useful to have make continue after errors, so I always remove the -k flag. Is there a way to change the default in my .emacs so that it's just make?
Steve
  • 8,153
  • 9
  • 44
  • 91
14
votes
1 answer

How to turn on emacs auto-fill-mode only for code comments?

I have tried (set (make-local-variable 'comment-auto-fill-only-comments) t) and also (auto-fill-mode 0) Though amazingly, neither of those work after emacs is restarted. I am using eschulte's emacs starter kit Toggling it works fine with M-x…
tobeannounced
  • 1,999
  • 1
  • 20
  • 30
13
votes
2 answers

how to get focus-follows-mouse over buffers in emacs?

Suppose I have a source file open and I launch a shell. I can hit C-x o to switch between the two buffers. But how can I get it so that when I move the mouse the buffer under the mouse gets focus, just like the "focus follows mouse" option common in…
numerodix
  • 876
  • 7
  • 20
13
votes
2 answers

Reload .emacs for all active buffers

A question already has been asked how to reload a .emacs file after changing it. The proposed solutions were to use M-x load-file or M-x eval-region RET on the changed region. Neither of these solutions affect other open buffers for me. Is there a…
Alan Turing
  • 12,223
  • 16
  • 74
  • 116
13
votes
2 answers

Emacs Case Sensitive Replace String

I just asked a related question (setq question) but it's distinctly different, so I decided to branch off with this question. In my .emacs file, I define a key binding to the replace-string command: (define-key global-map "\C-r"…
Alan Turing
  • 12,223
  • 16
  • 74
  • 116
13
votes
10 answers

How to gracefully exit SLIME and Emacs?

I have a question regarding how to "gracefully exit SLIME", when I quit Emacs. Here is the relevant portion of my config file: ;; SLIME configuration (setq inferior-lisp-program "/usr/local/bin/sbcl") (add-to-list 'load-path…
Gregory Gelfond
  • 131
  • 1
  • 1
  • 3
12
votes
3 answers

add-to-list 'load-path doesn't seem to work

Whenever I see some installation instruction for an emacs package it always suggests to use add-to-list 'load-path it never works for me. For some reason and I have to use load-file. For example, this will not work: (add-to-list 'load-path…
rabidmachine9
  • 7,775
  • 11
  • 46
  • 59
11
votes
4 answers

why cant emacs 24 find a custom theme I added?

My entire emacs setup is here I loaded my init-theme.el file here And supposedly that should make the darkclean theme available. But when I type M-x load-theme TAB the darkclean theme is not listed. How can I register it for Emacs 24?
Terrence Brannon
  • 4,760
  • 7
  • 42
  • 61
11
votes
2 answers

Emacs: Best-practice for lazy loading modes in .emacs?

Is there a best practice around lazily loading modes when encountering a relevant file extension? At this point I have roughly 25 different Emacs modes installed, and startup has become slow. For example, although it's great to have clojure-mode…
Rob
  • 1,355
  • 2
  • 14
  • 17
11
votes
1 answer

How can I access directory-local variables in my major mode hooks?

I have defined a .dir-locals.el file with the following content: ((python-mode . ((cr/virtualenv-name . "saas")))) In my .emacs I have the following function to retrieve this value and provide a virtualenv path: (defun cr/virtualenv () (cond…
Chris R
  • 17,546
  • 23
  • 105
  • 172
11
votes
5 answers

Disable Carbon Emacs scroll beep

I've been looking into adopting Carbon Emacs for use on my Mac, and the only stumbling block I've run into is the annoying scroll beep when you try to scroll past the end of the document. I've looked online but I can't seem to find what I should add…
Kyle Cronin
  • 77,653
  • 43
  • 148
  • 164
10
votes
6 answers

Finding the Emacs site-lisp directory

I am trying to make my Emacs configuration file written for OS X work on Ubuntu. I have this line: (add-to-list 'load-path "/usr/local/Cellar/emacs/23.3/share/emacs/site-lisp/w3m") It is used to load emacs-w3m. On OS X I installed Emacs using…
hekevintran
  • 22,822
  • 32
  • 111
  • 180
10
votes
1 answer

Loading packages installed through 'package.el' in Emacs24

Possible Duplicate: Emacs 24 Package System Initialization Problems I am using Emacs 24. I have the ELPA and Marmalade repos added. Using 'package' I installed 'auto-complete'. I have the following lines added to my init.el: (require…
pcx
  • 984
  • 11
  • 21
9
votes
6 answers

Is there a way to make changes to toggles in my .emacs file apply without re-starting Emacs?

I want to be able to make the changes to my .emacs file without having to reload Emacs. I found three questions which sort of answer what I am asking (you can find them here, here and here), but the problem is that the change I have just made is to…
Vivi
  • 4,070
  • 6
  • 29
  • 44
9
votes
4 answers

How to execute emacs grep-find link in the same window?

When I use grep-find it opens another window (area in the frame) with a list of results that I can select. When I select one it opens the target file in a different window than grep-find is in. How can I get the target file to open in the same…
RobKohr
  • 6,611
  • 7
  • 48
  • 69
1 2
3
14 15