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

Would you recommend vim/emacs for beginner programmers?

For someone just starting to program, would you recommend using vim/emacs, or should you use some IDE? Like are vim/emacs better suited for more advanced users than for beginners? I'm just wondering because I'm trying to get some of my friends to…
Lucky
  • 4,787
  • 9
  • 40
  • 50
13
votes
3 answers

Emacs: set and toggle show-trailing-whitespace

Two related questions using emacs 23.3.1 on linux: First, why can't I set the value of show-trailing-whitespace to t with setq as shown below? When I put the setq version in my .emacs it does not change the value (as seen functionally and by using…
Tom Aldcroft
  • 2,339
  • 1
  • 14
  • 16
13
votes
4 answers

Programmatically selecting a region

I want to perform the same action that one does by hitting C-Space + moving the arrow keys, but in elisp. Failing to find the right function (if they just were logically grouped in namespaces or somehow tagged...). Which one is it?
deprecated
  • 5,142
  • 3
  • 41
  • 62
13
votes
2 answers

Evaluate emacs lisp expression on command line

I'm a newbie to emacs. I'm working with emacs-24.1 on redhat linux, and trying to evaluate an elisp expression. What I want emacs to do is to evaluate the elisp expression without launching emacs itself. I'm trying different things emacs --eval '(+…
Surya
  • 1,139
  • 1
  • 11
  • 30
13
votes
2 answers

How to show popup on Emacs?

I intend to change certain features/functions in Emacs. I was wondering whether there is any feature in Emacs to popup a windows to show a warning message? Also, I would appreciate any alternative ideas if this feature is not available. Cheers all.
Arash
  • 568
  • 3
  • 17
13
votes
1 answer

Org-mode failed to highlight C++ source code when exporting html

I'm using org-mode V7.8.09. When I was trying to export the following c++ code block to html, #+begin_src c++ int a=1; int b=1; printf("%d\n", a+b); #+end_src it failed with message org-babel-exp…
updogliu
  • 6,066
  • 7
  • 37
  • 50
13
votes
4 answers

Underscore as part of word for forward-word not working

I am trying to make underscores get treated as part of the word for the forward/backward-word function as described here and here. I am specifically trying to get this to work for nxhtml mode, but would really like it to work like this for all…
oiler_no11
  • 155
  • 1
  • 7
13
votes
4 answers

A 'hello world' example for a major mode in Emacs?

Can anyone provide me with a hello world example for a major mode in emacs? I guess it's a beginner question, still I really like to write a major mode, both to learn emacs and elisp, as to be able to use customization to the fullest. What I have…
Peter
  • 47,963
  • 46
  • 132
  • 181
13
votes
1 answer

Emacs reopen previous killed buffer?

Any add-on to reopen the last killed buffer/file? Just like the C-S-t do in firefox. I know about that recentf-mode can remember the recent visited files history.
hbin
  • 2,657
  • 1
  • 23
  • 23
13
votes
3 answers

How do you apply a Emacs custom color theme in console mode?

When I load a custom color scheme (through M-x load-theme or M-x customize-theme) the results only seem to be applied when Emacs runs in a separate window: But when Emacs is run in a terminal with -nw, the default colors seem to be used: (source:…
Raghav
  • 163
  • 1
  • 1
  • 6
13
votes
2 answers

Emacs 24 and GDB 6.3 on Mac OS X

I've been trying out Emacs 24 (pretest 24.0.95.1) on OS X Lion for the past few days but am running into some issues with the new gdb/MI interface. With GDB 6.3 that comes with Xcode, but the gdb/MI interface doesn't seem to load at all. It appears…
Grant Limberg
  • 20,913
  • 11
  • 63
  • 84
13
votes
2 answers

Run TeX-command-master without querying in emacs

The key combination C-c C-c in Emacs/AucTeX runs the function TeX-command-masterwhich decides what command should be run (latex, bibtex, view, or others) and then asks the user for confirmation before running the command. I would like to bind this…
Malabarba
  • 4,473
  • 2
  • 30
  • 49
13
votes
2 answers

Emacs auto-complete mode for Groovy?

Is there a Groovy compatible auto-complete mode for emacs? I also was not able to find a keyword dictionary that I can use with emacs autocomplete. Help would be much appreciated.
mbsheikh
  • 2,501
  • 5
  • 23
  • 33
12
votes
4 answers

How do I make the compilation window in Emacs to always be a certain size?

I want to make the compilation window in Emacs to always appear at the bottom of a window, and always be a certain height. So far I put the following lines in my .emacs file: (setq split-height-threshold 0) (setq compilation-window-height…
EpsilonVector
  • 3,973
  • 7
  • 38
  • 62
12
votes
1 answer

Emacs: disable Ido completion in Tramp mode

I often use ido for auto-completion and tramp to access remote server via ssh. My .emacs includes the following lines: (require 'tramp) (setq tramp-default-method "ssh") (ido-mode 1) (setq ido-enable-flex-matching t) (setq ido-everywhere t) I want…
Mirzhan Irkegulov
  • 17,660
  • 12
  • 105
  • 166