Questions tagged [emacs]

GNU Emacs is an extensible, customizable, self-documenting text editor, which can be extended with Lisp code. Although Emacs is a general-purpose editor, questions may be on-topic here if they are about extending Emacs itself (usually by writing Emacs Lisp functions) or about specific programming modes. Otherwise (and perhaps also in those cases), consider asking your question on Emacs Stack Exchange.

GNU Emacs is an extensible, customizable text editor. Begun in the mid-1970s as a set of macros on top of TECO, it was re-written using C and Emacs Lisp to provide portability and an extendable interface. It continues to be actively developed today.

Emacs provides context-sensitive editing modes with syntax coloring, is self documenting, has full Unicode support and extensions to do almost anything. It similarly has extensive packaging support through the built-in package.el package.

Emacs' package selection includes color themes, language-specific editing modes, RSS readers, email clients, web browsers, etc. Die-hard Emacs users do almost everything from within Emacs: write, compile, run and debug code; read/compose email; browse the web; do project planning, etc. Some other editors, like Visual Studio or Eclipse, provide Emacs key bindings.

Questions about using and configuring Emacs, not specific to programming, are off-topic for Stack Overflow, but they may be suitable for Emacs Stack Exchange. Questions about extending Emacs using Lisp or other languages, or about programming modes, are usually on-topic here.

Useful Links

Wisdom from Stack Exchange


17686 questions
34 answers

How do I make git use the editor of my choice for editing commit messages?

How do I globally configure git to use a particular editor (e.g. vim) for commit messages?
  • 76,030
  • 23
  • 64
  • 76
30 answers

Differences between Emacs and Vim

What practical, objective differences are there between Emacs and Vim? For example, what can be done using one but not the other (or done more easily with one than the other)? What should I know in order to choose one to learn?
Sasha Chedygov
  • 127,549
  • 26
  • 102
  • 115
18 answers

How can I reload .emacs after changing it?

How can I get Emacs to reload all my definitions that I have updated in .emacs without restarting Emacs?
  • 57,320
  • 66
  • 234
  • 385
36 answers

Why should I use an IDE?

In another question, Mark speaks highly of IDEs, saying "some people still just dont know "why" they should use one...". As someone who uses vim for programming, and works in an environment where most/all of my colleagues use either vim or emacs…
Simon Howard
  • 8,999
  • 5
  • 28
  • 21
17 answers

How to set the font size in Emacs?

I also want to save the font size in my .emacs file.
  • 4,425
  • 3
  • 25
  • 19
6 answers

How do I control how Emacs makes backup files?

Emacs puts backup files named foo~ everywhere and I don't like having to remember to delete them. Also, if I edit a file that has a hard link somewhere else in the file system, the hard link points to the backup when I'm done editing, and that's…
  • 36,964
  • 10
  • 32
  • 35
6 answers

How can I replace a character with a newline in Emacs?

I am trying to replace a character - say ; - with a new line using replace-string and/or replace-regexp in Emacs. I have tried the following commands: M-x replace-string RET ; RET \n This will replace ; with two characters: \n. M-x replace-regex…
  • 3,381
  • 3
  • 18
  • 7
11 answers

How do you 'redo' changes after 'undo' with Emacs?

This article says that "Emacs has redo because you can reverse direction while undoing, thereby undoing the undo". What does this mean? How can a user 'redo' with Emacs?
  • 182,215
  • 215
  • 566
  • 871
1 answer

How can I make nrepl-ritz-jack-in work remotely over TRAMP / Emacs

What I want: I have a clojure program on a remote site, let's call it mccarthy. What I want to do is connect to a nrepl-ritz from my laptop, preferably using nrepl-ritz-jack-in. The jack in works fine for a local program, but doesn't seem to…
  • 3,682
  • 2
  • 20
  • 16
15 answers

How do I rename an open file in Emacs?

Is there a way to rename an open file in Emacs? While I'm viewing it? Something like save-as, but the original one should go away.
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
15 answers

Using Emacs to recursively find and replace in text files not already open

As a follow-up to this question, it's trying to find out how to do something like this which should be easy, that especially stops me from getting more used to using Emacs and instead starting up the editor I'm already familiar with. I use the…
Rob Kam
  • 10,063
  • 14
  • 55
  • 65
16 answers

Step-by-step debugging with IPython

From what I have read, there are two ways to debug code in Python: With a traditional debugger such as pdb or ipdb. This supports commands such as c for continue, n for step-over, s for step-into etc.), but you don't have direct access to an…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
15 answers

What are these ^M's that keep showing up in my files in emacs?

I think it may have to do with TextMate, but we work in a small team and are having some issues with full-file conflicts of nearly identical files in git – in one branch the files have a ^M appended to each line. What is this mysterious ^M character…
Neil Sarkar
  • 6,834
  • 8
  • 32
  • 30
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…
  • 2,653
  • 4
  • 20
  • 22
10 answers

Open a file with su/sudo inside Emacs

Suppose I want to open a file in an existing Emacs session using su or sudo, without dropping down to a shell and doing sudoedit or sudo emacs. One way to do this is C-x C-f /sudo::/path/to/file but this requires an expensive round-trip through…
Chris Conway
  • 55,321
  • 43
  • 129
  • 155
2 3
99 100