Emacs is a powerful text editor with an embedded Lisp environment, which allows for great extensibility. Emacs is a lisp environment with many features that also make it a powerful text editor.

learn more… | top users | synonyms

70
votes
2answers
41k views

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 ...
40
votes
8answers
23k views

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.
32
votes
12answers
25k views

Which version of Emacs makes the best use of the Mac GUI? [closed]

On Windows and Ubuntu I use GNU Emacs, but FSF doesn't provide binaries for the Mac I have a decent version that came with Snow Leopard, but just running in the bash terminal. Is there a version ...
30
votes
7answers
26k views

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 ...
29
votes
5answers
16k views

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. ...
26
votes
2answers
3k views

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?
26
votes
3answers
3k views

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 ...
22
votes
2answers
1k views

Enable Emacs-like keybindings scheme for all QT applications

As for GTK apps under Gnome environment it's possible to set all applications to use Emacs-like input scheme: $ gconftool --set -t string /desktop/gnome/interface/gtk_key_theme Emacs $ gconftool ...
20
votes
3answers
4k views

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 ...
19
votes
3answers
6k views

C-x C-c not working in Emacs 23.1

I am using Emacs 23.1 with Cygwin but when I try to exit by pressing C-x C-c it says C-x C-g is undefined and I am not able to exit.
18
votes
1answer
2k views

How to split Emacs over a dual monitor?

I would like to split Emacs over a double monitor. How do I do that?
18
votes
3answers
6k views

How can I run Mac OSX graphical Emacs in daemon mode?

Short form: I want to run the Mac OSX version of Emacs found on http://emacsformacosx.com/ as a daemon, with graphical and text clients connecting to it as-needed. In detail, here is the workflow I ...
18
votes
2answers
10k views

Getting Gmail in Emacs?

I'm trying to learn Emacs, and I think that getting gmail right in it would be cool. I've tried a but of tutorials online, but I couldn't figure out what a lot of them were talking about. A lot of ...
17
votes
3answers
5k views

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 ...
17
votes
5answers
5k views

Syncing Google Calendar [Gcal] and Emacs Org-mode? Is it possible?

It would be amazing if I could sync Gcal and emacs org-mode, is it possible?
16
votes
5answers
8k views

Is there any *good* HTML-mode for emacs?

I love emacs, and I want to do my web-programming work in it, but I can't find a way to get it to edit HTML properly. I mean it's seriously awful. It will do HTML fine, but not PHP, javascript, ...
16
votes
5answers
5k views

Word count for LaTeX within emacs

I want to count how many words my LaTeX document has in it. I can do this by going to the website for the texcount package and using the web interface there. but that's not ideal. I'd rather have ...
16
votes
3answers
4k views

emacs does not open a file from argument and syntax highlight does not work

In my latest ubuntu box, When I type for example emacs ~/.bashrc, Emacs will start but not open .bashrc. This is true for any file I pass in. I've used Emacs for several years, and have never ...
15
votes
4answers
3k views

Why latest emacs version don't support Windows 7 taskbar?

I have downloaded latest emacs for Windows here, but starting it on Windows 7 shows a taskbar icon that ignores right-click and so can't be pinned I have searched Google and found a lot of bug reports ...
15
votes
7answers
4k views

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 ...
14
votes
4answers
2k views

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 ...
14
votes
3answers
4k views

Ubuntu: Keep emacs in the terminal

I installed emacs on Ubuntu 10.10 using sudo apt-get install emacs-snapshot-gtk I prefer my emacs in the terminal and everytime I emacs something, it pops up in some fancy GUI window. How do I go ...
13
votes
3answers
6k views

How can I hide the Tool-bar in Emacs persistently?

I have installed emacs23 on Linux Mint 8. I would like to hide the toolbar, and I can do it with Options > Show/Hide > Tool-bar. But the Tool-bar comes back next time I start emacs. How can I hide it ...
13
votes
2answers
3k views

Problem with GNU Screen when using Emacs C-x C-s (save-buffer)

When I am using emacs under GNU Screen, if I call C-x C-s screen hangs and does not respond to any keyboard input. I can't reproduce this, but at least one time per day I have to kill my screen ...
13
votes
3answers
5k views

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 ...
13
votes
3answers
1k views

Edit one file in two different buffers in emacs

I would like to open the file foo.bar twice (or more) in emacs, so I can edit two different parts of it simultaneously. Is it possible? Probably the better question is, how to do it? Is there a way to ...
13
votes
1answer
868 views

Emacs as daemon on OS X with window-system

I'm running gnu emacs 23.3.1 cocoa build on OS X 10.6. I added the following to ~/Library/LaunchAgents/gnu.emacs.daemon.plist so that it will start a daemon and automatically restart emacs if I ...
12
votes
4answers
4k views

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.
12
votes
3answers
2k views

Torrent client for Emacs

Does anybody know a bittorrent client for Emacs?
11
votes
3answers
2k views

I'm an Emacs user. How do I learn Vim?

Most of the time, I use Emacs. However, I've decided to try to learn Vim. I'm happy with Emacs, I just am trying to avoid having it turn into Maslow's Hammer. I've seen a few tutorials, but I have ...
11
votes
4answers
7k views

How do I fix my prompt in emacs shell-mode?

I'm doing some programming on a colleague's machine. He has a version of emacs (23.1.1) I haven't used before. My problem is that when I go to shell-mode, my bash prompt looks like this: ...
11
votes
4answers
2k views

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?
11
votes
2answers
2k views

Re-file outline tree into new org-mode file?

I'm just getting started with org-mode and imagine a workflow whereby I capture new tasks and notes in an org-mode "inbox" file. For tasks that grow into projects, I would imagine refiling them into a ...
10
votes
4answers
8k views

How to get code completion in emacs?

Hey, 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 ...
10
votes
8answers
23k views

Where is .emacs file?

I downloaded emacs 23.1 from gnu's ftp. untarred it and built it after configuring. I do not find .emacs file in my home directory or anywhere in my system ! Am i missing something ?
10
votes
1answer
2k views

How to get back to insert mode in VIM when you accidentally hit C-x C-s

Given this vim session: % vim test-file.txt iHello there!C-x C-s How do I get back to insert/command mode again? (C-x C-s means Control-x Control-s, not sure if it's normal vi terminology for ...
10
votes
1answer
738 views

Flyspell save word to dictionary

I'm using flyspell for spell checking in AucTeX. How can I ignore or add a word to the dictionary without using the popup menu and without using the mouse? There's the command ...
10
votes
3answers
2k views

Emacs org mode as a work diary

Is emacs org mode a good choice if you want to maintain a work diary? I have tried to use it and archive old tasks (TODOs) but is there an easy way see which tasks I worked on for example last week ...
10
votes
1answer
1k views

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 ...
10
votes
2answers
405 views

How to interrupt emacs when control-g does not work in very large files?

I've run into some kind of O(n^2) or worse behavior when viewing very large (e.g. 128MB) files in Emacs and jumping to the end of the file. I think it may have to do with my coloring algorithm to ...
9
votes
4answers
4k views

How do I complete file paths in emacs?

Say for instance I'm editing a config file and I want to type in a path. Is there a plugin for emacs that lets you complete a file path in that buffer? I've searched for this and there's like a ...
9
votes
4answers
2k views

emacs: How to return to last position after scroll/page up/down?

After issuing scroll-up or scroll-down in emacs, is there a quick way to return the point to its previous position (assuming I didn't remember to add it to the mark ring)? Alternatively is there any ...
9
votes
3answers
872 views

In Emacs why can I not paste text C-y into a C-s search box?

In Emacs why can I not paste text C-y into a C-s search box?
9
votes
2answers
1k views

Setting major-mode specific keybindings in emacs

In my .emacs file, I want to add a key binding for a specific major mode (setting coffee-compile-file to C-c C-c in coffee-mode). I've found a lot of instructions on using local-set-key and ...
9
votes
1answer
3k views

Emacs opens files in a new frame when opened with “open -a”

I want to be able to invoke Emacs from the command-line, and either start graphical Emacs if it isn't running or visit a file in an already running Emacs. I tried to do this with emacsclient which I ...
8
votes
5answers
7k views

How to run 'emacs' in the terminal emulator without a separate window?

I am looking to switch to Emacs from Vim and one thing that is keeping me away is that Emacs opens up a separate window of its own when run under X. Can I get the same behavior for Emacs as it does ...
8
votes
7answers
3k views

Emacs equivalent to VIM ci"?

Does emacs have the equivalent of VIMs ci" command? Basically I want to replace the text inside a set of quotation marks. In vim I can ci) or ci] or ci} to "change inner *"...
8
votes
3answers
2k views

How to insert a new line and jump to it, in emacs?

It's exactly the same as eclipse Shift+Enter. E.g. I have a some text: Hello, *everyone. I'm Freewind. The * in the first line is the cursor. Then I press some key shortcut, it becomes: Hello, ...
8
votes
4answers
2k views

Emacs: What features or benefits are unique to either GUI or terminal interface?

Emacs can be launched in it's own GUI window or within a terminal (using the -nw flag). What features or work-flow benefits are only available in one mode or the other? I.e. If a user habitually uses ...
8
votes
2answers
7k views

Emacs Auctex: How do I open the pdf in evince at the current cursor position

I use emacs auctex to write latex files. Since the text is pretty long, and I tend to change things in different places, I would like emacs to open the pdf so that the position in the text is shown ...