Questions tagged [emacs]

For questions regarding usage of the Emacs text editor. See also the Emacs Stack Exchange: https://emacs.stackexchange.com

enter image description here

From the official GNU Project Site:

GNU Emacs is an extensible, customizable text editor—and more. At its core is an interpreter for Emacs Lisp, a dialect of the Lisp programming language with extensions to support text editing.

It provides features common to programming text editors, including syntax highlighting, checking, language specific modes, and revision control.

Emacs makes use of a large set of keyboard shortcuts, such as Ctrl+F for moving forward one letter and Alt+B for moving backwards one word.

Other features that are used by programmers include:

  • Shells running inside emacs
  • Directory browsing
  • Compilation
  • Debugging
  • Outlining

Some read email, news, twitter, IM or even web sites within Emacs.

Emacs is one of the two editors involved in the editor wars, along with .

1665 questions
125
votes
3 answers

How do I display line numbers in Emacs (not in the mode line)?

I know how to display line numbers (and columns) in the mode-line, but I'd like emacs to display the line numbers for all the lines on the left-hand side. I've seen this done in vim and other text editors. How do I do this for emacs?
76
votes
3 answers

How can I turn off Emacs's auto line wrapping for the current session?

How can I turn off Emacs's auto line wrapping for the current session? I normally need the automatic wrapping, but when editing a email draft, I don't need that. Is there a way to turn it off for a while?
qazwsx
  • 8,879
50
votes
3 answers

How to jump back to the last position of the cursor in emacs?

In emacs, when i am editing a program, and miss-input some command and make the cursor jump to somewhere in other files. Is there a short-cut key or command to jump back to the last location of the cursor?
user2195
33
votes
4 answers

How to find out the current color theme in emacs

While emacs is running, how can I find out which color theme is currently in use?
Talespin_Kit
  • 3,391
31
votes
4 answers

How to get code completion in emacs?

I know that emacs supports code completion. But to be honest I have never been a good FAQ reader, at least for something that I'm completely new to. So I wonder what I need to download and how to make so emacs can do some smart code completion for…
starcorn
  • 3,236
30
votes
6 answers

Can I create directories that don't exist while creating a new file in emacs?

In emacs, I create a file by visiting it with C-x C-f. Let's say I'd like to create /home/myself/new_directory/file.txt. If new_directory does not exist yet, is there a way to have it get created during the creation of file.txt without any extra…
Jim Hunziker
  • 1,213
29
votes
8 answers

Where is the .emacs file?

I downloaded Emacs 23.1 from GNU's FTP site. I untarred it and built it after configuring. I do not find the .emacs file in my home directory or anywhere in my system! Am I missing something?
srinivas
26
votes
5 answers

Emacs - Disable Some Minibuffer Messages

In Emacs, there are some cases where I would like to prevent messages from appearing in the minibuffer, mainly pertaining to "Beginning/End of buffer" and "Text is read-only". Is there any way I can prevent these messages from appearing in the…
user152809
20
votes
4 answers

Emacs - kill buffer without prompt

I'm wondering how it can be done, so Emacs doesn't pop the prompt asking me whether I really want to kill current buffer with C-x k shortcut. Interesting thing is that same action done via toolbar kills buffer instantly without prompting the user.…
Jarek
  • 1,743
19
votes
6 answers

How to do select column then do editing in GNU Emacs?

I've been using ViM, TextMate, and GNU Emacs for years. For example here is the text I want to edit foo foo foo And here is the text result I want to have bar foo bar foo bar foo When I'm on Vim, I can do "Ctrl v" on the very first line and first…
Arie
  • 363
19
votes
1 answer

Can I tell emacs to paste (middle mouse button) on the cursor position?

If I paste text from, for example, the browser into emacs, the emacs cursor is often already at the position where I want to paste the text. If I would use emacs in console mode, I could just move the mouse over the text and press the middle button…
Flow
  • 1,428
19
votes
4 answers

How do I re-open a file in emacs?

In older emacs versions I used to type: C-x C-f RET And it would re-open the file currently visited in the buffer. Now (emacs 23.1.1) it opens Dired of the directory.
Eyal
  • 593
18
votes
1 answer

How do I stop emacs from creating backup files?

I know there's probably a very good reason for it (i.e. backup) - but for personal reasons (it's just annoying me), is it possible to stop emacs from creating a backup of every file I edit? I'm talking about when it creates a file appended with the…
Nick Bolton
  • 3,400
16
votes
1 answer

How do I jump to the opening or closing paren/brace/... in Emacs?

Suppose my point is currently on or next to a opening or closing paren, brace or bracket. How can I jump to the respective matching counterpart?
Arne
  • 829
16
votes
1 answer

What is emacs keybinding s-u?

When I run revert-buffer in emacs it says: You can run the command `revert-buffer' with s-u I've never seen any keybinding beginning with s- before. What key is that? My emacs version is GNU Emacs 23.2.1 (x86_64-apple-darwin, NS…
dar
  • 413
1
2 3
20 21