A text editor, usually characterized by its extensibility. Often described as "the extensible, customizable, self-documenting, real-time display editor."
105
votes
14answers
25k views
vim vs. emacs… and no, this is not a flame war
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.
13
votes
2answers
2k 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 ...
11
votes
2answers
1k 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 ...
10
votes
5answers
984 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
6answers
600 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
2answers
736 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 ...
8
votes
4answers
324 views
Good GNU/Emacs tutorial
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 ...
8
votes
2answers
569 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 ...
8
votes
1answer
154 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
541 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 ...
8
votes
1answer
286 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
1answer
2k 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 ...
8
votes
1answer
456 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 ...
7
votes
2answers
379 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
91 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
190 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 ...
7
votes
1answer
453 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
:! ...
6
votes
3answers
275 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
3answers
492 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 ...
6
votes
3answers
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?
Thanks!
6
votes
5answers
267 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 ...
6
votes
2answers
353 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
2k 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 ...
6
votes
1answer
411 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
1answer
443 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 ...
6
votes
1answer
160 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
3answers
464 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 ...
6
votes
1answer
551 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
365 views
emacsclient -t hangs
I'm trying to use emacs (23.2.1) in daemon mode. I started it as emacs --daemon and that works just fine. But whenever I try emacsclient -t somefile I first get a line of garbage (e.g., `1;25C2;'), ...
6
votes
0answers
398 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 ...
5
votes
3answers
363 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 ...
5
votes
2answers
574 views
Open emacs in a terminal when editing crontab
I have setup emacs as my default editor in /etc/profile. When I want to use emacs in a terminal. I open it with the -nw option. How can I have the same behavior when doing a crontab -e preventing it ...
5
votes
4answers
588 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 ...
5
votes
4answers
2k 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 ...
5
votes
2answers
204 views
Is it possible to stop emacs from down translating my key chords?
emacs has the default behaviour of double-guessing which key-combo (chord) I've pressed. It automatically down-translates to a lesser chord when the key-combo I pressed is unassigned, eg. ...
5
votes
3answers
262 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 ...
5
votes
2answers
87 views
Emacs on OpenBSD for DEC VAX?
I have managed to install OpenBSD 5.2 on my DEC VaxStation 4000 Model 90 but to my surprise have not found a binary for Emacs (any version) for the VAX architecture. As best as I can tell I do not see ...
5
votes
1answer
367 views
As we call `#!/bin/perl` 'shebang', what we call `-*- perl -*-`?
The first line of a script may be in format of #! interpreter, so the shell will execute the script using the specific interpreter. This is so called shebang or shbang.
Similarly, there can be some ...
5
votes
2answers
181 views
Tracing the workings of a function in Emacs
I am learning emacs lisp. One of the things I was playing with was setting variables. So I go and set fill-column to 50 (setq fill-column 60). After this evaluating fill-column does give me 60, but ...
5
votes
1answer
436 views
why does my emacs whitespace mode add “” to my buffer?
I'm using Putty to ssh into a RedHat box, and I'm running GNU emacs inside the putty ssh window.
When I turn on whitespace-mode using M-x whitespace mode, I notice I see a "Â" before each space or ...
5
votes
2answers
132 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 ...
5
votes
2answers
506 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 ...
5
votes
1answer
352 views
Anything , Ido and similar tools for Emacs: Overlap and differences
Reading about Anything 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 ...
5
votes
1answer
147 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 ...
5
votes
1answer
738 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 ...
5
votes
1answer
127 views
How to get background color in Emacs?
In Emacs no window mode, the background is automatically the same as the terminal (gnome-terminal). When I look at (frame-parameters) I see that (background-color . "unspecified-bg"). Well, for me, ...
5
votes
2answers
271 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 ...
5
votes
1answer
78 views
Synonyms (from a thesaurus) in Emacs
I use Emacs 23 on Debian sid. I can check the spelling of a word in Emacs with M-$. How can I obtain synonyms (using a thesaurus?) for a word in Emacs?
None of the following were useful: one, two, ...
5
votes
1answer
193 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 ...
5
votes
1answer
632 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 ...
