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
7
votes
1 answer

Emacs: Get new-frame and emacsclient -c to use set frame size?

I am new to StackOverflow and I have a question about an issue that has been virtually the only thing to irk me in my quest to master Emacs. I configured my .emacs file to set the default frame size for Emacs to 70 rows and 80 columns like…
6
votes
2 answers

Stopping tex-shell from opening when compiling Latex from Emacs

How can I prevent the *tex-shell* buffer from opening when I compile Latex from Emacs? It splits the window in half, and I always just use C-x 1 to get rid of it immediately. The solution is possibly related to (setq special-display-buffer-names…
zoo
  • 1,901
  • 1
  • 17
  • 25
6
votes
3 answers

Is there a way to write a .emacs that will always stay upward compatible?

I have been using Emacs since version 18. Emacs Lisp isn't my routine programming language, but years ago I invested some time studying it to the point of creating a .emacs that's better (for me) than any GUI IDE to date. That was a one-time effort…
Android Eve
  • 14,864
  • 26
  • 71
  • 96
6
votes
4 answers

Disabling auto-fill-mode on a per-file (not filetype) basis

I keep auto-fill-mode enabled by default for all LaTeX files. This is usually nice, but occasionally one latex file contains mostly tables and I would like to disable auto-fill-mode whenever I edit that particular file. Is it possible to specify at…
Calaf
  • 10,113
  • 15
  • 57
  • 120
6
votes
1 answer

How can I define comment syntax for a major mode?

I'd like to add comments to a major mode that I use that doesn't currently support them. The only examples I can find online show how to write single-line comments, but I need paired delimiters. What do I need to change?
Patrick Collins
  • 10,306
  • 5
  • 30
  • 69
6
votes
2 answers

Setting tab size in Emacs

I'm using Emacs as an editor. I want to set the tab size to four spaces. In my .emacs file I have the following: (setq default-tab-width 4) I've also tried: (set-default tab-width 4) Either way, when I open emacs and try to tab, it inserts two…
Ryan
  • 4,517
  • 7
  • 30
  • 34
6
votes
2 answers

Setting Both `fullheight` and `width` in Emacs on OS X

I find the default size of the Emacs frame a little too small. From reading around I know that I can set the height and width quite easily with something like the following: ;;; 140 x 60 window size (setq default-frame-alist '((width . 140) (height…
Will
  • 4,585
  • 1
  • 26
  • 48
6
votes
1 answer

Any way to silence Emacs keyboard shortcut advice?

Emacs sometimes can be rather annoying, it emits too much information in minibuffer. For instance, when I run M-x gnus, it tells me that You can run `gnus' with It also occurs when there is a keymap for certain command. I…
Hongxu Chen
  • 5,240
  • 2
  • 45
  • 85
6
votes
2 answers

Emacs - Autosave buffer every 5 seconds

How can we configure emacs to automatically save the unsaved changes every 5 seconds? I want the save the buffer and not the temporary file generated with ~
18bytes
  • 5,951
  • 7
  • 42
  • 69
5
votes
3 answers

how to delete region with [delete] key in emacs

I am using Emacs 23.3 on Mac OS X Lion. How can I delete the selected text region with simple key typing—something like delete or C-d? This works on windows without setting anything specific. How can I implement that in Mac OS X Lion?
luozengbin
  • 305
  • 2
  • 11
5
votes
1 answer

What does "\e" mean?

I came across the following line in a .emacs config file: (define-key scheme-mode-map "\e\t" 'scheme-smart-complete) It's binding key sequence \e\t to the function scheme-smart-complete, but I don't know what \e is, and it turns out it's impossible…
SuperElectric
  • 17,548
  • 10
  • 52
  • 69
5
votes
1 answer

Emacs : -fh (full height) question

Each time Emacs starts up, I'd like its window to take up the full height of my screen. Now, from the man page, I found this could be done with the -fh switch. It somewhat works, but is there a way I could do the following: 1) Specify the -fh option…
houbysoft
  • 32,532
  • 24
  • 103
  • 156
5
votes
1 answer

setq of case-sensitivity in .emacs has no effect

I have a lot of custom stuff in my .emacs file: fonts, colors, window sizing, key bindings, etc. All of it works. Then at the end, I just added a: (setq case-fold-search nil). It's a variable that when set to nil is supposed to make search…
Alan Turing
  • 12,223
  • 16
  • 74
  • 116
5
votes
1 answer

try catch block indentation in Emacs

I'm using the bsd style of indentation in emacs & I'd like to modify it a bit. The related portion of my .emacs file is below. When I write a function with try catch blocks the braces are indented. I'd like them to not indent similar to a…
Stephen Burke
  • 882
  • 3
  • 10
  • 25
5
votes
3 answers

Why doesn't my Emacs regular expression with ^ to match the start of a line work?

I am trying to set up .emacs so that any file which begins with the letters makefile sets it to makefile mode. E.g. makefile-something should be in makefile mode. This doesn't work: (setq auto-mode-alist (cons '("^makefile" . makefile-mode)…
user181548