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
59
votes
9 answers

Is there a way to make alt-f and alt-b jump word forward and backward instead of printing ƒ and ∫ on Mac?

I understand that Mac has some Emacs keybindings enabled by default (e.g. Ctrl+A move to beginning of line etc.). If I open TextEdit for example I can navigate like in Emacs. But when I try Alt+F or Alt+b for move to next word or last word it does…
ayckoster
  • 6,707
  • 6
  • 32
  • 45
59
votes
4 answers

Emacs and symbolic links

Say I have a symbolic link at /home/.bashrc that points to an actual .bashrc file somewhere else: /some/other/path/.bashrc that is under a git repository. If I open /home/.bashrc in Emacs, it prompts me with: Symbolic link to Git-controlled source…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
58
votes
10 answers

How to live with Emacs Lisp dynamic scoping?

I've learned Clojure previously and really like the language. I also love Emacs and have hacked some simple stuff with Emacs Lisp. There is one thing which prevents me mentally from doing anything more substantial with Elisp though. It's the concept…
auramo
  • 13,167
  • 13
  • 66
  • 88
58
votes
3 answers

How can I use Emacs ESS mode with R markdown?

Is there a way to configure Emacs so that it recognizes (and allows execution of) R code chunks within R markdown (.Rmd) files similar to the way it recognizes code chunks in .Rnw (Sweave) or .org (org-mode) files?
David LeBauer
  • 31,011
  • 31
  • 115
  • 189
57
votes
4 answers

Emacs ESS Mode - Tabbing for Comment Region

I am using the Emacs-Speaks-Statistics (ESS) mode for Emacs. When editing R code, any comment lines (those starting with #) automatically get tabbed to the far right when I create a new line above it. How should I change my .emacs.el file to fix…
Christopher DuBois
  • 42,350
  • 23
  • 71
  • 93
57
votes
6 answers

How do I stop emacs dired mode from opening so many buffers?

When I use dired mode to browse around and find a file I want to open in Emacs, dired opens a new buffer for each directory I visit when looking for the file each time I select a directory with Enter, which means I can end up with a lot of buffers I…
David Webb
  • 190,537
  • 57
  • 313
  • 299
57
votes
5 answers

Emacs shortcut to go to a specific line in a file

I'm learning Emacs after over two years of using Notepad++ as my default editor. I'm still hung up on a few things, but I find myself kind of enjoying working with it. My question is simple: in Notepad++, when I wanted to go to a specific line of my…
Nekkoru
  • 1,145
  • 2
  • 12
  • 18
57
votes
7 answers

Emacs Keybindings in Visual Studio 2012 or 2013

I would prefer to have Emacs keybindings in MSVS. In MSVS 2008, this was natively supported, and in MSVS2010 there was an extension to achieve…
Woodrow Douglass
  • 2,605
  • 3
  • 25
  • 41
56
votes
2 answers

What are the major differences between Emacs Lisp and Common Lisp?

I want to learn the lisp language, since my editor is emacs, I prefer emacs lisp. Can anyone give me some suggestions to learn lisp, emacs lisp, or common lisp? What are the major differences between those two?
user1087032
  • 755
  • 1
  • 6
  • 8
56
votes
29 answers

Is it worth investing time in learning to use Emacs?

Right up front: I do not want to start a religious war. I've used vi for as long as I can remember, and the few times I've tried to pick up Emacs I've been so lost that I've quickly given up. Lots of people find Emacs very powerful, however. Its…
Andrew
  • 11,894
  • 12
  • 69
  • 85
56
votes
3 answers

Concatenate strings in elisp

I need to concatenate path string as follows, so I added the following lines to my .emacs file: (setq org_base_path "~/smcho/time/") (setq org-default-notes-file-path (concatenate 'string org_base_path "notes.org")) (setq todo-file-path (concatenate…
prosseek
  • 182,215
  • 215
  • 566
  • 871
56
votes
1 answer

How to set the default width of fill mode to 80 with emacs?

I know that "C-u 80 C-x f" sets the fill width 80, and M-q adjusts it. How to make it default? I mean, how to make width 80 deafault for fill width?
prosseek
  • 182,215
  • 215
  • 566
  • 871
56
votes
6 answers

How to stop emacs from replacing underbar with <- in ess-mode

ess-mode is "Emacs speaks statistics." This mode is useful for editing programs for R or Splus (two separate statistics packages). In my buffer, when ever I type _ the character is replaced with <-, which is very frustrating. Is there an emacs lisp…
Setjmp
  • 27,279
  • 27
  • 74
  • 92
56
votes
3 answers

Debugging python programs in emacs

How do I debug python programs in emacs? I'm using python-mode.el I've found references suggesting: import pdb; pdb.set_trace(); but I'm not sure how to use it.
user90150
56
votes
7 answers

How can I change the language in Emacs when using ispell?

I would like to use the ispell-buffer command in Emacs. It uses the English language by default. Is there an easy way to switch to another dictionary (for example, another language)?
Bruno Ranschaert
  • 7,428
  • 5
  • 36
  • 46