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

Books

17686 questions
70
votes
5 answers

How can I reload .spacemacs file after editing without restart emacs?

I am new to emacs(spacemacs), and I follow this article to learn spacemacs. Once you are done editing, save the file and either press C-c C-c in the file to reload it or just restart Spacemacs. But after I save the .spacemacs and then press C-c…
user2331095
  • 6,577
  • 8
  • 36
  • 56
70
votes
5 answers

How to switch to a different buffer from a terminal buffer

I've been using emacs for few weeks and it's been great so far - coming from vim was easier than I expected (actually - emacs' keyboard shortcuts feel more... natural). I have added few customizations like moving between buffers using…
lukaszkorecki
  • 1,743
  • 1
  • 15
  • 19
69
votes
6 answers

How to tell emacs to open .h file in C++ mode?

What lines should I add to my _emacs (on Windows) file to have it open .h files in C++ mode? The default is C mode.
kujawk
  • 837
  • 1
  • 9
  • 11
69
votes
4 answers

How to rebuild ELPA packages after upgrade of Emacs

I just upgraded GNU Emacs from 23 to 24 on MacOS and some ELPA installed packages stopped working. One of them is AucTeX. Deleting it and reinstalling it through the package manager made it work again, but I don't want to do this by hand for every…
Thomas
  • 2,093
  • 3
  • 23
  • 28
68
votes
5 answers

How to debug elisp?

Normally the easiest way to debug is using printf. What can I do to debug emacs-lisp? How can I print something to emacs editor from elisp? Or is there any way to debug elisp code? For example, how can I check if the following code is run in .emacs…
prosseek
  • 182,215
  • 215
  • 566
  • 871
68
votes
5 answers

How to remove installed elpa package

This is strange, the list-packages buffer shows "available" as the status for some packages that are actually installed. Shouldn't that column show "installed" for them? When I click on one, a new buffer opens to inform me that the package is…
johnbakers
  • 24,158
  • 24
  • 130
  • 258
67
votes
5 answers

Find Tab Characters in emacs

How do I find a tab character in emacs?
chernevik
  • 3,922
  • 9
  • 41
  • 55
67
votes
4 answers

How to install a Emacs plugin (many times it's a .el file) on Windows platform?

I'm new to Emacs. I found many emacs plugins are released as an .el file. I'm not sure how to install them. Can I just put them in my emacs installation directory?
Just a learner
  • 26,690
  • 50
  • 155
  • 234
67
votes
2 answers

git blame with commit details in emacs

From emacs, how can I see the details (e.g. commit message) of the commit that last changed the line at point? I have magit installed.
Robin Green
  • 32,079
  • 16
  • 104
  • 187
66
votes
14 answers

Open a file at line with "filename:line" syntax

Very often, compilations errors are displayed with the file:line syntax. It would be nice to copy-paste this directly to open the file at the right line. Emacs already has some mode to handle this in buffers (compile-mode, iirc), but I would like to…
elmarco
  • 31,633
  • 21
  • 64
  • 68
66
votes
1 answer

Emacs mode for R?

Is there a mode in emacs that does syntax highlighting for the R programming language? R-mode doesn't seem to work...
Wilduck
  • 13,822
  • 10
  • 58
  • 90
65
votes
7 answers

Emacs: what is the shortcut key to clear buffer?

Like, Control-A (select all) followed by delete?
Ron
  • 7,588
  • 11
  • 38
  • 42
65
votes
2 answers

Merge cells in org-mode tables

Is it possible to merge cells in Org-mode tables? Examples of horizontal merging would be something like that: | Header | Merged header | |--------+-------+-------| | Text1 | Text2 | Text3 | | Text4 | Text5 | Text6 | Example of vertical…
Mirzhan Irkegulov
  • 17,660
  • 12
  • 105
  • 166
64
votes
6 answers

Copy/Paste in emacs ansi-term shell

I have configured my emacs to run zsh shell within ansi-term. However, copy/paste no longer works i.e. nothing is getting pasted from kill-ring to the terminal. Changing the TERM to vt100, or eterm doesn't solve the problem. Would appreciate any…
Kabira K
  • 1,916
  • 2
  • 22
  • 38
63
votes
4 answers

REPL for Emacs Lisp

What are some REPLs for Emacs Lisp? Is there only one that is within Emacs? Are there some that run inside terminal outside Emacs?
Tim
  • 1
  • 141
  • 372
  • 590