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 .

1676 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?
99
votes
12 answers

Can I create a link to a specific email message in Outlook?

I use Outlook as my email client at work, but I don't want to use it to manage my tasks and todos. (Instead I use plain text files and Emacs org-mode.) Since many todo items start out as mails in my inbox, I often need to reference these mails. Is…
86
votes
11 answers

How can I open a file read-only from command line with emacs/vi/vim

Is there a way to tell emacs/vi/vim (from the command line) that I want to view the file in view-mode or read-only. I know how to open a file as read only if emacs/vi/vim is already running.
Nifle
  • 34,998
82
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
  • 9,311
71
votes
4 answers

Jump to first non-whitespace character in line in emacs

I'm looking for the emacs equivalent of vi's ^. How can I move my cursor to the first non-whitespace character in a line?
71
votes
8 answers

emacs: how to indent/unindent region of python code by 4 spaces?

I have a region of python code selected in emacs. What are the most efficient ways to indent and unindent every line in it by 4 spaces? Ideally I'd like something that's not context sensitive (eg. it'll allow me to indent passages within docstrings…
70
votes
4 answers

Linewrap in Org-mode of Emacs?

Does Org-mode of Emacs support linewrapping? I know in the "regular" mode of Emacs there will just be a little sideways-u-turn on the right and on the left on the line after, and there's no scrolling necessary. However, there are only arrows…
Kyle L
  • 2,379
60
votes
4 answers

How to find out current font used in my Emacs?

How to find out current font used in my Emacs?
qazwsx
  • 9,311
56
votes
4 answers

How to insert tab character in Text mode?

I have tried to parse a file language_data.txt, which is edited by Emacs. The different columns are separated by tab characters. But when I opened the file, I found that each of the tab characters had been replaced by many space characters. For…
Chen Yu
  • 735
53
votes
5 answers

How can I specify the repository from which a package will be installed? (emacs-snapshot)

I want to install emacs-snapshot from http://emacs.orebokech.com But there is already an emacs-snapshot in Ubuntu's repositories. How can I specify the repository from which a package will be installed?
elviejo79
  • 1,133
52
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
49
votes
5 answers

How do you run the previous command in emacs shell?

I am in terminal mode on Ubuntu, and I'm running emacs with 2 buffers open, one is a ruby file, and the other is a shell (opened by typing M-x shell ), and when I switch to the shell buffer, I want to run the same command that I ran before. I would…
Lidmith
  • 593
48
votes
9 answers

How to make Emacs read buffer from stdin on start?

With Vim I can easily do $ echo 123 | vim - Is it possible to do with Emacs? $ echo 123 | emacs23 ... Emacs starts with a Welcome message $ echo 123 | emacs23 - ... Emacs starts with an empty *scratch* buffer and “Unknown option” $ echo 123 |…
sastanin
  • 3,917
41
votes
4 answers

How to get back to an active minibuffer prompt in emacs without the mouse

In emacs, sometimes I will be in the middle of finding a file or switching buffers or doing something in the minibuffer, and I will click somewhere else for some reason. When I go back, the only way to make the minibuffer prompt active again is to…
36
votes
6 answers

How to awake Emacs GUI after pressing Ctrl+z

I'm using Emacs GUI in Gnome. After pressing Ctrl+z, the Emacs window is minimized. However, if I bring the window to the front, it doesn't respond to any key press or mouse event. I searched the web and only found how to bring it back from the…
Ning Sun
  • 627
1
2 3
99 100