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
197
votes
3 answers

How to have Emacs auto-refresh all buffers when files have changed on disk?

I have a non-emacs global search and replace function that causes my disk files to become more up-to-date than my emacs buffers (en masse). Is there any way to tell emacs to refresh all the buffers from disk in one fell swoop, instead of having to…
Dave
  • 2,653
  • 4
  • 20
  • 22
147
votes
6 answers

How do I byte-compile everything in my .emacs.d directory?

I have decided to check out Emacs, and I liked it very much. Now, I'm using the Emacs Starter Kit, which sort of provides better defaults and some nice customizations to default install of Emacs. I have customized it a little, added some stuff like…
Mikka
  • 2,113
  • 2
  • 16
  • 12
83
votes
11 answers

Emacs - Error when calling (server-start)

I am currently using GNU Emacs 23.0.93.1 in Windows Vista SP1. In my .emacs file I make a call to (server-start) and that is causing an error with the message The directory ~/.emacs.d/server is unsafe. Has anyone seen this and know a fix or…
λ Jonas Gorauskas
  • 6,121
  • 6
  • 45
  • 66
54
votes
4 answers

How to save a list of all the installed packages in Emacs 24?

I am using prelude as a base Emacs configuration. I have installed lots of packages from the package manager, and I want to use my settings on another machine. I don't want to carry the installed packages and also I don't want to create a list…
decached
  • 915
  • 1
  • 10
  • 24
53
votes
29 answers

What's in your .emacs?

I've switched computers a few times recently, and somewhere along the way I lost my .emacs. I'm trying to build it up again, but while I'm at it, I thought I'd pick up other good configurations that other people use. So, if you use Emacs, what's in…
A. Rex
  • 31,633
  • 21
  • 89
  • 96
46
votes
4 answers

Tips for profiling misbehaving Emacs Lisp?

I customize Emacs a lot. Recently, I added something to my .emacs configuration that sporadically pegs my CPU at 100%, but I really don't know what it is. If I press C-g a bunch of times, eventually I'll get a message below the minibuffer asking me…
EnigmaCurry
  • 5,597
  • 2
  • 23
  • 15
45
votes
2 answers

Emacs 24 Package System Initialization Problems

It seems to me that the new Package system that is built-in on Emacs 24 has some flaws when it comes to properly loading and initializing the installed packages. Recently, I upgraded to Emacs 24.1.1 which was realeased on 6/10/2012 and I have been…
λ Jonas Gorauskas
  • 6,121
  • 6
  • 45
  • 66
40
votes
4 answers

PATH and exec-path set, but emacs does not find executable

My .emacs contains (setenv "PATH" (concat ".:/usr/texbin:/opt/local/bin" (getenv "PATH"))) (setq exec-path (append exec-path '(".:/usr/texbin:/opt/local/bin"))) (add-to-list 'load-path "/usr/local/share/emacs/site-lisp") (require 'tex-site) (load…
Calaf
  • 10,113
  • 15
  • 57
  • 120
35
votes
3 answers

what is custom-set-variables and faces in my .emacs?

this is in my .emacs can I mess with it or not? (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If…
rabidmachine9
  • 7,775
  • 11
  • 46
  • 59
34
votes
3 answers

How do I find which .emacs file has been loaded?

How do I get emacs to tell me the location of the .emacs file it has loaded? My situation is simply when I do sudo emacs, it loads up a very different .emacs file than the one in my home directory. I can get around with by doing M-x eval-buffer on…
Silfheed
  • 11,585
  • 11
  • 55
  • 67
33
votes
10 answers

How can I emulate Vim's * search in GNU Emacs?

In Vim the * key in normal mode searches for the word under the cursor. In GNU Emacs the closest native equivalent would be: C-s C-w But that isn't quite the same. It opens up the incremental search mini buffer and copies from the cursor in the…
richq
  • 55,548
  • 20
  • 150
  • 144
32
votes
2 answers

Setting Emacs 24 color theme from .emacs

I have the following code in my .emacs: (if (null window-system) (progn (require 'color-theme) (color-theme-initialize) (color-theme-simple-1))) When I open Emacs on the console, I can verify that the progn block runs (by a (message…
JasonFruit
  • 7,764
  • 5
  • 46
  • 61
31
votes
7 answers

When opening 2 files in emacs, how can I have them appear side-by-side?

Sometimes I launch emacs from the command line with 2 files, as follows: emacs foo.txt bar.txt This opens the emacs window, split vertically: foo.txt ------- bar.txt How can I edit my .emacs file so that they show up side-by-side, like this?: …
SuperElectric
  • 17,548
  • 10
  • 52
  • 69
28
votes
6 answers

Programmatically setting Emacs frame size

My emacs (on Windows) always launches with a set size, which is rather small, and if I resize it, it's not "remembered" at next start-up. I've been playing with the following: (set-frame-position (selected-frame) 200 2) ; pixels x y from upper…
J Cooper
  • 16,891
  • 12
  • 65
  • 110
27
votes
1 answer

When using two frames in emacs, how do I prevent the compilation buffer from showing up in both?

I work with two monitors, and often use emacs with two frames open; one for each monitor. each frame is split into two side-by-side windows, like so: a | b <-- frame 1 in monitor 1 ------- c | d <-- frame 2 in monitor 2 When I hit my…
SuperElectric
  • 17,548
  • 10
  • 52
  • 69
1
2 3
14 15