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

How do I insert (not overwrite) a byte in hexl-mode?

All of the hexl-insert- commands overwrite the byte at point. It makes no difference whether overwrite-mode is on. I need to actually insert a new byte at point, moving everything else down. How can I do this in emacs?
harpo
  • 41,820
  • 13
  • 96
  • 131
13
votes
3 answers

My emacs deletes trailing white space. How can I disable this behaviour?

Upon save ( I think ), my emacs is deleting trailing white space. I don't want to commit those changes, only the parts I manually modify. Is there a way to disable that behaviour?
Geo
  • 93,257
  • 117
  • 344
  • 520
13
votes
2 answers

Show trailing whitespace on emacs only on non-empty lines

Right now I'm using: (setq show-trailing-whitespace t) In my .emacs to show trailing whitespace for my CC mode. I can't seem to figure out how to have it not show the whitespace font for whitespace only lines. Empty lines separating indenting code…
gabeiscoding
  • 524
  • 5
  • 9
13
votes
2 answers

Set column width for visual lines in Emacs

Is there an equivalent to the fill-column variable for the "Wrap" mode (visual-line-mode) in Emacs? If not, how could I set a limit on the length of visual lines when the window/frame of the buffer is wider ?
Brian Z
  • 875
  • 1
  • 13
  • 20
13
votes
2 answers

How to show overridden/shadowed key bindings?

In emacs, how can I show shadowed/overridden key bindings for the current buffer? They won't show up when running describe-bindings (C-h b). In other words: how can I see if the modes active in a buffer have conflicting key bindings?
Norswap
  • 11,740
  • 12
  • 47
  • 60
13
votes
3 answers

Too many split screens opening in Emacs!

Ever since I installed emacs on a new machine I have seen an ugly behaviour. Unfortunately, my old .emacs files are rather fragmented and I can't determine whether I used to have elisp that took care of this. The problem is this: it used to be that…
user168811
  • 133
  • 1
  • 4
13
votes
2 answers

Font Families for Emacs

If I do M-x customize-face RET default I can adjust the default face (font) in Emacs. There are several options, all of them explained in the documentation. Many of these options can be selected from a menu when you select/click on Value Menu, but…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
13
votes
5 answers

How to git push using git-emacs?

I am using the git-emacs to submit code to github throug Emacs. It is ok for add and commit, but it seems that git-emacs do not support the git push operation. When I type M-x git-push, it responds with "no such command".
zolibra
  • 532
  • 6
  • 16
13
votes
2 answers

How can remove the in the org agenda view quickly?

In the emacs org agenda view(today), I schedule some tasks with the . But now I want to remove the single task or mutli tasks together. (Don't want to schedule them to the other day). Now I have to each tasks,…
James.Y
  • 1,427
  • 1
  • 11
  • 16
13
votes
2 answers

Emacs: Default binary to run with M-x ansi-term

Is there a way to have Emacs to prompt by default for a binary of my choice when running M-x ansi-term. It always asks me for /bin/zsh but I have a new installation of zsh in a different path. Alternatively, it would be great to have Emacs to just…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
13
votes
3 answers

Lexical scope in Emacs: compatibility with older Emacsen

Emacs 24 added optional lexical bindings for local variables. I would like to use this functionality in my module, while maintaining compatibility with XEmacs and the previous Emacs versions. Before Emacs 24, the easiest way to get closures was by…
user4815162342
  • 141,790
  • 18
  • 296
  • 355
13
votes
2 answers

How to exit from emacs shell

I gave M-x shell to get Linux shell. How to go back to the current document from there
user567879
  • 5,139
  • 20
  • 71
  • 105
13
votes
6 answers

How can I debug emacs' slow startup time?

I recently got a new Retina MacBook Pro, with Mountain Lion. Unfortunately, emacs is taking forever to startup (around 5s) on my new computer. I tried installing the latest homebrew version of emacs, but the problem persists. I don't have a .emacs…
Mike
  • 23,892
  • 18
  • 70
  • 90
13
votes
6 answers

Code folding in Emacs

Possible Duplicate: How to achieve code folding effects in emacs An excellent feature of Dreamweaver is code folding of any lines of text -- recursively! It's fantastic, I can fold any text or code, regardless of language. I work with existing…
Christopher Done
  • 5,886
  • 4
  • 35
  • 38
13
votes
2 answers

Preferred JavaScript mode for emacs? Is it js2-mode from Yegge?

There are a couple JavaScript modes out there: js2-mode by Steve Yegge javascript.el by Karl Landström. espresso? Something else? Does anyone have a recommendation on which to use? EDIT 2011 June 11 - This is sort of an old, outdated question…
Cheeso
  • 189,189
  • 101
  • 473
  • 713