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
12
votes
2 answers

Tabs in HTML mode in Emacs

I'm a tab person. Unless I'm working on a project that is already using spaces, I use tabs. I mostly do php and html work. I've got tabs in php working well. But I can't figure out how to have html mode use tabs instead of two spaces. Here is what…
12
votes
6 answers

How to uncomment blocks code in emacs

I am using emacs with the major mode "Java/L Abbrev" activated. When I type M-x comment-region or M-x uncomment-region the desired effects happen in the editor. But I am getting tired of typing this out every time. I have found that I can type C-c…
Stephen
  • 140
  • 2
  • 7
12
votes
3 answers

Stopping infinite loops while running clojure tests in emacs with leiningen and swank/slime

In certain kinds of code it's relatively easy to cause an infinite loop without blowing the stack. When testing code of this nature using clojure-test, is there a way to abort the current running tests without restarting the swank server? Currently…
dgtized
  • 3,192
  • 2
  • 24
  • 23
12
votes
0 answers

Google Colab and Emacs

I'm trying to connect to a collab notebook with ein in emacs. I have tried copying the URL into it but it asks for a password. Any clue if this is at all possible? Thanks! https://github.com/millejoh/emacs-ipython-notebook
EMiller
  • 247
  • 3
  • 8
12
votes
5 answers

What causes this graphical error in emacs with linum-mode on OS X?

I get this graphical error with linum-mode in my Emacs. I tried upgrading from 23 to 24 (via git) and I've tried both with various supplied binaries online and with my home-compiled version. What I'm really interested in is where to start diagnosing…
Sarah
  • 6,565
  • 1
  • 33
  • 44
12
votes
4 answers

Recommendations for how to annotate PDFs while working within Emacs?

Many scientific papers, especially in the life sciences, are published in pdf format. I want to work as much as possible within emacs (org-mode especially). I am aware of DocView mode which at least lets me view pdfs within emacs. I suspect it can…
Alex Stoddard
  • 8,244
  • 4
  • 41
  • 61
12
votes
1 answer

In C/C++ mode in Emacs, change face of code in #if 0...#endif block to comment face

I'm trying to add functionality found in some other code editors to my Emacs configuration, whereby C/C++ code within #if 0...#endif blocks is automatically set to the comment face/font. Based on my testing, cpp-highlight-mode does something like…
pogopop77
  • 123
  • 1
  • 8
12
votes
2 answers

Emacs custom indentation

My team uses a special type of file for configuration, and I would like to auto-indent (block indent) the file using emacs. I would like to increase the indentation by a tab size for an opening parenthesis - { or [, and decrease by a tab size for a…
canonv
  • 121
  • 1
  • 4
12
votes
1 answer

Emacs auto-complete

since I can't get CEDET to work for automatic code-completion (aka intelli-sense in the MS-world), after trying several times (no, it's just not working!), I've decided to use auto-complete, which works "quite fine" for me. Unfortunately,…
mefiX
  • 1,702
  • 3
  • 24
  • 39
12
votes
3 answers

Working setup for hunspell in Emacs

Does anyone have a working setup for hunspell and Emacs? Simply setting ispell-program-name to hunspell doesn't work, the output (when using flyspell, for example) looks like below: -> UTF-8 encoding error. Missing continuation byte in 0. character…
monotux
  • 3,657
  • 28
  • 30
12
votes
3 answers

Emacs equivalent of Vim's foldmethod = indent

Question: Does Emacs have a canonical equivalent of Vim's Folding with Foldmethod=indent? I am particularly interested in something that can work alongside any Emacs major mode and any file. The Emacs searches have not turned up a definitive answer.
dreftymac
  • 31,404
  • 26
  • 119
  • 182
12
votes
3 answers

Dired copy asynchronously

Is there a way to modify/tell dired to copy files asynchronously? If you mark multiple files in dired and then use 'C' to copy them, emacs locks up until every file is copied. I instead want this copy to be started, and for me to continue editing…
Nathaniel Flath
  • 15,477
  • 19
  • 69
  • 94
12
votes
5 answers

Can I keep the same item for yanks in Emacs?

Something I do often in Emacs is to cut a bit of text, and then replace another bit with the cut text. So, say I've got the text I want to yank as the last item in my kill-ring. I yank it into the new place, then kill the text that was already…
Skilldrick
  • 69,215
  • 34
  • 177
  • 229
12
votes
1 answer

Flake8 Attribute Error: 'module' object has no attribute 'normalize_paths'

Here is my output of flake8 during validation: Traceback (most recent call last): File "/usr/local/bin/flake8", line 11, in sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/flake8/main.py", line 25, in main …
user6040992
12
votes
1 answer

Emacs code to automatically set indent-tabs-mode according to existing code

Is there ready Emacs code/package to automatically set indent-tabs-mode according to the file being visited? That is, if the currently visited file uses tabs for indentation, indent-tabs-mode should be set buffer-locally to true. Correspondingly if…
Markus Miller
  • 3,695
  • 2
  • 29
  • 33
1 2 3
99
100