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
13
votes
7 answers

Why do old editors like Vim and Emacs expose the difference between a File and a Buffer in the interface?

Does my question make sense? Using either Vim or Emacs, you come to understand that the interface exposes the code's representation of the state of the file you are editing in the buffer, the file is the on-disk storage you can fill a buffer from or…
ironfroggy
  • 7,991
  • 7
  • 33
  • 44
13
votes
2 answers

Emacs Magit commit opens new Emacs client

I've been using Magit for awhile, and when committing, it used to simply split the window and allow me to commit from within the same emacs session, but I seem to have changed this behavior to the following: Now, when I commit my staged changes, a…
FellyTone84
  • 665
  • 8
  • 18
13
votes
5 answers

Emacs plugin to list all methods in a python module

Is there a emacs plugin which lists all the methods in the module in a side pane. I am looking for a plugin which has keyboard shortcuts to show/hide all the methods in python module file currently opened.
user462455
  • 12,838
  • 18
  • 65
  • 96
13
votes
1 answer

how to collaborate with other authors using org-mode?

I'm using org-mode. How do I collaborate with other people who are not using Emacs? It seems like the standard for document collaboration is Google Drive/Google Docs. This is fine, but my preferred environment is Emacs org-mode. Short of cutting…
incandescentman
  • 6,168
  • 3
  • 46
  • 86
13
votes
3 answers

Recognize a file with a shebang and no extension

I know that emacs can recognize a file by the extension, a -*- mode -*- first line, and even by the shebang line, but what do I do if I want to override the shebang? For example, a script that starts with #!/usr/bin/env python2.7 ... won't be…
Shep
  • 7,990
  • 8
  • 49
  • 71
13
votes
1 answer

Difference between symbol and variable name in emacs lisp

I'm wondering what the difference is between (add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-pylint-init)) and (add-to-list flymake-allowed-file-name-masks '("\\.py\\'" flymake-pylint-init)) What is the clear…
kjshim
  • 447
  • 1
  • 4
  • 11
13
votes
4 answers

Elisp destructuring-bind for cons cell?

I'd like to do (destructuring-bind (start end) (bounds-of-thing-at-point 'symbol)) But bounds-of-thing-at-point returns a cons cell and not a list, so destructuring-bind doesn't work. What could work for this case?
abo-abo
  • 20,038
  • 3
  • 50
  • 71
13
votes
3 answers

Delete from current position to the beginning of line in emacs?

Ctrlk would delete everything from the current position of the cursor to the end of line. Is there some equivalence to delete everything from the current position to the beginning of line?
One Two Three
  • 22,327
  • 24
  • 73
  • 114
13
votes
3 answers

How can I tell Emacs my git branch has changed?

At the bottom of my Emacs 23 editor, I notice that Emacs is aware that I am working in a directory that is under version control, what that version control system is, and what branch I am currently on. Pretty cool! But say I am on the master branch,…
Houdini
  • 3,442
  • 9
  • 31
  • 47
13
votes
2 answers

emacs tramp over an unreliable connection

I want to run R on a remote box under a local Emacs (I do not want to run Emacs on the remote box). I can run R on a remote host using TRAMP: (let ((default-directory "/user@remote:~")) (R)) and everything works fine except that when the…
sds
  • 58,617
  • 29
  • 161
  • 278
13
votes
2 answers

emacs, etags and using emacs as an IDE

My usual tools are Emacs with g++ on a Linux system to implement my research algorithms. For the last some years, I have used emacs in a fairly basic way. I open C or C++ files, edit them with a syntax highlighting scheme of my choice and compile…
user193272
  • 984
  • 1
  • 12
  • 18
13
votes
3 answers

Adjusting term faces in the new Emacs 24.3

How can I adjust the term face in the new Emacs to get the same control that was possible with ansi-term-color-vector? One of the new features in Emacs 24.3 seems to be that it revamps the mechanism to control the face of term buffers, i.e.: The…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
13
votes
3 answers

Have Emacs edit Python docstrings using rst-mode

How to I get Emacs to use rst-mode inside of docstrings in Python files? I vaguely remember that different modes within certain regions of a file is possible, but I don't remember how it's done.
asmeurer
  • 86,894
  • 26
  • 169
  • 240
13
votes
4 answers

How to disable underscore (_) subscripting in Emacs, TeX input method

On Emacs, while editing a text document of notes for myself (a .txt document, not a .tex document), I am using M-x set-input-method Ret TeX, in order to get easy access to various Unicode characters. So for example, typing \tospace causes a "→" to…
pnkfelix
  • 3,770
  • 29
  • 45
13
votes
4 answers

Emacs: opening any file in a large repo

What I need a fast/performant way to open any file under a large (git) repo (~9.8k files). Context I have tried various solutions, like Textmate.el and find-file-in-repository. I found these solutions via previous SO questions like this and this and…
or9ob
  • 2,313
  • 4
  • 25
  • 45