A text editor, usually characterized by its extensibility. Often described as "the extensible, customizable, self-documenting, real-time display editor."

learn more… | top users | synonyms

164
votes
14answers
58k views

What are the pros and cons of Vim and Emacs?

How would you compare these editors? What are the pros and cons of each? [note] This is not meant to be answered by those who "hate one and love another" or those who haven't used both.
16
votes
2answers
2k views

GNU Emacs; Does the GUI version offer anything more than the ability to have a GUI menu?

I've been looking at GNU Emacs for a few months now, on and off (mainly off), and I've really only gone as far as testing a few basic things which I especially want in an editor... I'm slowly getting ...
15
votes
3answers
5k views

How do I configure Emacs to use 'ispell' on Mac OS X?

I'm using brew as my package manager for both Emacs and ispell. I have both installed. Doing a quick google, I was unable to figure out how to tell Emacs where ispell is and to load the appropriate ...
14
votes
3answers
3k views

Shift-arrow not working in emacs within tmux

I recently started using tmux (was a screen user before) and I'm loving it, except for one small problem. I use emacs within my tmux session and I am used to using Shift-arrow keys to move between ...
14
votes
1answer
809 views

Keymapping problem when working with Emacs and Openbox

I have an Apple keyboard and I had to do some remapping of the keys to make the mod-4 key the first key to the left of the Space bar for when working with Emacs. The below script worked fine when I ...
13
votes
2answers
1k views

GNU emacs vs. XEmacs

After using Vim for the past couple of years, I'm switching to emacs as part of my "get out og your comfort zone" 2012 resolution. Although I have been using GNU Emacs for the past 10 days, I am ...
12
votes
3answers
7k views

Ctrl-s hang terminal emulator?

I came across a sentence in vimdoc: Note: CTRL-S does not work on all terminals and might block further input, use CTRL-Q to get going again. and this key indeed hangs my vim. I was ...
12
votes
2answers
2k views

Italics in Emacs on a text terminal (rxvt-unicode)

I am using Emacs running in an urxvt, and I cannot get italics to work in Emacs although the terminal supports it. Here’s my current setup: I haven’t set $TERM, so it is the default ...
11
votes
5answers
1k views

What are some excellent Emacs utter beginner resources?

I administrate a couple of servers and do automation with both python and ruby at times. I've seen some awesome Youtube videos of users with multiple open windows, logged in background chats, and ...
9
votes
4answers
373 views

Good GNU/Emacs tutorial [closed]

I'd like to learn emacs in depth. The problem is that they divide in 2 categories: Basics (That C-x C-s saves files and C-x C-c exists emacs etc.) Everything I'm currently use 1%-10% of emacs ...
9
votes
6answers
864 views

Text Manipulation Across multiple lines

I Have a file that has text like this: AAAA BBBB CCCC DDDD 1234 5678 9012 3456 EEEE 7890 etc... And i want to match up the Alphabetic lines with the Numeric lines so they are like this: ...
9
votes
1answer
1k views

Emacs: How to insert 'λ' instead of 'lambda' in Scheme mode?

Long ago, I came across a text editor function that replaced the word 'lambda' with the character 'λ'. I would like to do this in emacs. My preferences: I would like to activate this function in ...
9
votes
1answer
858 views

Why am I getting 'Name collision between …' errors and how can I fix them?

Every time I try to launch vim or emacs or even top (I think it's actually any command that uses ncurses) in a unix terminal (on a cluster computer over ssh), I get a a continuous stream of 'Name ...
9
votes
1answer
927 views

Gnome stop grabbing my emacs keys

I am using Gnome in Ubuntu 11.04. I work a lot in Emacs, and I find that the Gnome window manager grabs some of the Emacs keys. To some extent, I can stop this by laboriously going through each of ...
8
votes
6answers
438 views

How to disable emacs here document completion

When editing a bash script file with emacs, and trying to enter <<<, at the second < emacs insert a template for a here document, like in the following example: <<EOF EOF This is ...
8
votes
2answers
3k views

How to colorize text in emacs?

I want to view (and/or edit) colorized text in emacs, such as is output by ls -l --color=always, tree..., or whatever. The text I refer to exists in a file. When I open that file in emacs, I want to ...
8
votes
1answer
208 views

Is it possible to name windows in emacs

I would like to be able to name a window in emacs, and specify that window when opening and creating new buffers. I've looked through the manual but all I can find is find-file-other-window, which ...
8
votes
1answer
417 views

emacs: recognising the shebang line

How can I configure Emacs to recognise certain she-bang lines? it recognises the shebang line: #!/usr/bin/env ruby but not the shebang line of #!/usr/bin/env ruby1.9 I figure there must be an ...
8
votes
2answers
962 views

Font size issues with Emacs in linum-mode

I am using Emacs 23. linum-mode works well if using with default settings. But if I increase the font size, the numbers cannot be displayed. It seems the the frame to display the line numbers is not ...
8
votes
1answer
1k views

How to get current buffer's filename in emacs?

One of the main features I miss about Vim, is that it always saves the filename of the current file in the % buffer (more info). That allows launching commands easily like: ;; compile current file :! ...
7
votes
3answers
934 views

My `which` command may be wrong (sometimes)?

I've compiled the last emacs version from the source code (v24.2) because the version installed on my machine is (quite) old for me (v21.3). I've done the usual: $configure --prefix=$HOME make make ...
7
votes
3answers
1k views

Emacs indentation using Tabs

Is there a way to make Emacs indent code using only tabs globally and not spaces. I know of tabify command. I would prefer the automated indentation to use tabs rather than a mixture of tabs and ...
7
votes
4answers
2k views

Emacs sync w/ Google Calendar and Contacts?

Is there a way to use Emacs to sync with Google Calendar and Google Contacts, ideally keeping a local copy so I can access them offline?
7
votes
3answers
3k views

how to ssh to remote server and use local emacs to edit files?

Is there a way to use the emacs installed my local computer to access remote files I have in a remote server? I have googled and found out that I should use TrampMode however it is necessary for me to ...
7
votes
1answer
238 views

How can I get recentf-mode to work with emacs server/client?

I like using recentf mode in Emacs which produces a list of files I have recently opened. This list is persistent between sessions, so I can get to files I used a fairly long time ago. However, I ...
7
votes
2answers
583 views

emacs, How to copy region, and leave it highlighted?

I'm happy enough with the default M-w as (kill-ring-save) which loses the region's highlighting upon running the command. I don't want to alter its behaviour, but I do want to re-bind <C-insert> ...
7
votes
2answers
920 views

Replace require statements by autoload in .emacs file to improve performance

According to these posts: How can I make emacs start-up faster a-nickels-worth.blogspot.de/effective emacs one can somehow replace require and load statements in the .emacs file to speed up the ...
7
votes
1answer
2k views

Korn Shell: End, pgup, pgdown, and delete key not working

So basically my End, Pageup/Pagedown, and Delete key are not working in ksh93. I'm running FreeBSD by the way. My arrow keys are working, and so is my home key. Those keys work when I put this in my ...
7
votes
2answers
127 views

Ido mode and recently opened files

I recently switched to ido-mode in emacs. When I run C-x C-f (ido-find-file) pressing M-r to do a regex search in the recently used files doesn't work any more. Is there a way to enable this regex ...
7
votes
2answers
257 views

Emacs Hexl to read device files?

I have to manually edit a FAT 16 partition. After trying few hex editors, I decided to try Emacs Hexl. sudo emacs -> M-x hexl-find-file -> /dev/sdb The commands open device file but its ...
6
votes
3answers
1k views

How to install/default to the command line version of Emacs?

I installed Emacs using sudo apt-get install emacs. The problem is that when I launch Emacs from the command line (e.g. emacs main.c) it opens Emacs with a GUI. I prefer the command line version which ...
6
votes
4answers
967 views

Open terminal from emacs

Is there a fast way (keyboard shortcut) to open a terminal emulator (in my case urxvt) in the same directory as the file in the current emacs buffer?
6
votes
1answer
661 views

What is the difference between shell, eshell, and term in Emacs?

In Emacs I can run a shell using following commands - M-x term M-x shell M-x eshell What is the difference between these three?
6
votes
4answers
997 views

Block editing *live* in Emacs or Vim

jEdit supports block editing, but Emacs and Vim seem to have some serious usability issues on the same subject. If someone could fill in the unknowns here it would be much more bearable to use either ...
6
votes
4answers
3k views

Emacs command to cut OR copy to system clipboard?

As a very new Emacs user, I've been using Ctrl+w and Ctrl+y to cut/copy and paste between buffers in Emacs. Is there a way to do the same thing so that not just Emacs, but the entire system, can have ...
6
votes
2answers
450 views

vim customized with emacs commands (insert mode only)

I was an emacs user, and I have to switch to vim. But I miss some basic emacs commands in vim insert mode: C-A C-E C-K C-Y C-x C-s ... and some other I know that I can press Escape and then press ...
6
votes
2answers
482 views

Directory shortcuts in emacs buffer

So I asked this question about directory shortcuts in a shell. The idea is I'd like to be able to open a file in /home/Documents/foo, say, by typing C-x C-f ~foo/file. So, is there a way to emulate ...
6
votes
3answers
412 views

Emacs: Open a buffer with all lines between lines X to Y from a huge file

In the same spirit as this other question: cat line X to line Y on a huge file: Is there a way to open from within Emacs (and show on a buffer) a given set of lines (e.g. all lines between line X ...
6
votes
2answers
703 views

emacs does not see my fonts in gentoo

I copied my ~/.emacs file from ubuntu linux; I've installed Consolas font (and it works in gnome terminal, and as a default Monospace font); but Emacs does not see it (custom-set-faces '(default ((t ...
6
votes
1answer
304 views

Emacs commands in xterm

I found that the commands I used to use in gnome-terminal, those I learned in Emacs, are only partially working in xterm. In some cases, I get strange chars like ÿ, æ, and â instead. Do you know how ...
6
votes
1answer
1k views

Helm (formerly anything) , Ido and similar tools for Emacs: Overlap and differences

Reading about Helm and Ido for Emacs I noticed that they support similar features. The EmacsWiki provides great info about both, but I still can't tell what sets them apart. What are the differences ...
6
votes
1answer
520 views

Emacs and windows manager keyboard shortcuts without “Super” key

I found a classic M-series keyboard and I want to use it. However, it does not have the "Windows" key (a.k.a "Super"), only the Shift, Control and Alt modifiers. My keyboard shortcuts are cluttered ...
6
votes
2answers
737 views

emacs colors based on $TERM environment variable

I want to know if it is possible to make emacs, when running in a gnu screen or tmux session, use the same colors as when TERM=xterm. In a gnu screen or tmux session, TERM=screen and emacs uses a ...
6
votes
1answer
666 views

What's the right value of $TERM for emacs' ansi-term, especially if 'eterm-color' isn't available after SSH?

I'm currently setting $TERM to xterm-256color: if [[ -n "$EMACS" ]]; then export TERM=xterm-256color alias emacs="emacsclient --no-wait" export EDITOR="emacsclient --no-wait" export ...
6
votes
2answers
1k views

Comparing directories in Emacs

I am experimenting with ediff-directories, but I am not sure I am using it correctly. I read in the documentation that, once I supply two directories to ediff-directories, if I press == Emacs ...
6
votes
1answer
247 views

Difference between “define-key global-map” and “global-set-key” in Emacs

Looking at how people program their keyboard shortcuts in Emacs, I have noticed two different patterns: One uses: (global-set-key (kbd "M-N) 'select-next-window) The other one: (define-key ...
6
votes
2answers
2k views

Is there a way to give emacs the KDE look and feel?

I'm using emacs for most of my work. I'm switching from gnome desktop to KDE (checking things out) and it bother me that emacs look soo diferent from the rest of the desktop. Is there a way to give ...
6
votes
1answer
126 views

How can I have different Emacs sessions loaded on different Emacs windows while using Emacs on daemon mode?

I'm currently using Emacs on daemon mode. I save my sessions using the desktop package. I also combine that with this in order to have several named sessions saved. If I have several Emacs windows ...
6
votes
1answer
412 views

Emacs mode for man pages

I'm translating man pages, and have run in to a few problems with Emacs. How do you specify language? (With man, it looks like this man -Lsv shutdown for the Swedish "sv" subdirectory, if ...
6
votes
3answers
880 views

emacs syntax highlighting fails on my SSH client

I need to connect to a remote server by SSH to edit some documents. When I work at home, I SSH to the remote server using SSH Secure Shell and open emacs, but it doesn't fully highlight documents as I ...