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

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

How to use Emacs to run Matlab programs?

I'm learning matlab and using emacs to edit .m files. Is there a method in Emacs to call matlab to run programs?
9
votes
1answer
858 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 ...
7
votes
2answers
551 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> ...
2
votes
1answer
1k views

Load my .profile for bash in Emacs terminal buffer? (multi-term mode)

I've got multi-term mode (derived from ansi-term) with bash started in Emacs 23.3, which is a terminal emulator running in Emacs. However, I noticed that it did not load my user profile, including ...
2
votes
1answer
277 views

Dired+ on dark color themes

As far as I know, Dired and Dired+ work better by default (give better color contrast) on color themes with clear backgrounds. I know I can customize face colors on Dired+ for Emacs manually using ...
3
votes
2answers
611 views

How to enter Erlang Mode in Emacs?

How do I enter erlang mode in emacs to get code highlighting, etc.? Whenever I open an erlang file nothing special happens. Do I need to change something in my .emacs file, or do I need to add a ...
3
votes
1answer
229 views

Truncate long lines in emacs from command line argument

I know the command in the .emacs for long line truncation is: (setq-default truncate-lines t) or the keystroke: M-x <RET> toggle-truncate-lines <RET> but how do I pass these as ...
8
votes
6answers
409 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 ...
4
votes
1answer
252 views

Emacs ansi-term and term not working well when I ssh into a remote machine

I have the exact same Emacs configuration on a local and remote machine, and when I run M-x ansi-term or M-x term on each of them individually everything works great. However, if I run any of these ...
4
votes
1answer
196 views

Emacs subshell (M-x shell) not autocompleting shell aliases

I have aliases defined on my .zshrc file that I commonly use when I am on a gnome-terminal. However, when I am on M-x shell on Emacs, the autocompletion does not find them (even though they still ...
5
votes
1answer
673 views

Comparing text files on Emacs

I have a couple of questions about comparing text files on Emacs I have been playing with M-x compare-windows and I read in the documentation that, if I pass it a numeric argument, Emacs ignores ...
2
votes
1answer
82 views

Emacs M-h selects paragraph + an extra line

In Emacs, when I type M-h (mark-paragraph), Emacs selects the paragraph under point plus an extra line (typically right above the paragraph). Is there a way to ask Emacs to just select the paragraph? ...
4
votes
1answer
671 views

Prevent unwanted buffers from opening

I'm using emacs for my daily javascript editing, to switch between buffers I use C-x LEFT and C-x RIGHT and I'm fine with this (even if I find it difficult to know the path of the file I'm modifying). ...
2
votes
1answer
176 views

How do I rebind M-/ in Emacs to M— (dash)

I'm basically trying to figure out how to use keyboard-translate in Emacs to make M-- do the same thing as M-/ How do I go about doing this?
6
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 ...
3
votes
0answers
619 views

In emacs, is there a way to Hex edit/view a buffer without losing the undo info?

When I use hexl-mode in emacs, it discards the buffer's undo info. Is there another way to hex-edit the buffer and yet retain the undo info? If there is no alternative hex-editor, is there a ...
3
votes
2answers
148 views

mode-specific emacs keybindings

I'm trying to get emacs (23.3 on Arch Linux) to map Ctrl+F12 to the built-in "compile" function when in C-mode (actually CC-mode, which comes built-in as well). So far I've tried the following: ...
3
votes
1answer
189 views

Emacsclient docs mention emulating Gnuclient. What is the relationship?

When opening a file in GNU Emacs GUI, I use gnuserv to attach to an already running emacs. I use 'gnuserv' only because the first documentation I read on the subject suggested it. Today I was ...
5
votes
2answers
1k 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 ...
3
votes
1answer
163 views

Emacs not showing filename

Where once was the filename of the file now there is a black stripe, preventing me to see what I'm editing. To clarify a bit, it's that black stripe between "F1" and "All", when I did the ...
3
votes
2answers
205 views

How to bind “ß” to Meta-s?

I am using Carbon-Emacs on MacOS X 10.6 with the US-International keyboard layout. Usually, I can use Alt+s to print the letter "ß". However, Emacs interprets this as Meta+s and complains that there ...
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 ...
4
votes
1answer
226 views

In emacs, how can I pass an argument to a function in a keybinding defintion

I want to create a keybinding for funcion end-of-line+ and pass a value of -1 to i. The function is declared as: (end-of-line+ &optional n) The first of the following snippets below, works ...
8
votes
1answer
377 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 ...
3
votes
3answers
802 views

emacs can't open display

Just recently this has started happening; I run: /usr/bin/emacsclient --alternate-editor="" --no-wait -c and get: ERROR: Display :0.0 can't be opened No other applications do this. The output ...
1
vote
3answers
292 views

vim/emacs plugin to view recursive grep search search results?

Suppose I have a file formatted like this: file1:123 file2:4444 some/other/file:2233 This represents the search results from a grep (i.e. file:line-number). I'd like to have a vim plugin which ...
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 ...
9
votes
4answers
362 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 ...
3
votes
4answers
424 views

How to set up tea-time in emacs to use native notification system in gnome

Is there an easy way of having tea-time display messages via gnome's native notification system? The current "notification function" in tea-time.el is: (defun show-notification (notification) ...
15
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 ...
3
votes
2answers
765 views

Working with screen and emacs

I'm working with emacs (on the terminal) and I use screen to switch between terminals. The key combination Ctrl+A is grabbed by screen. Is there a way to change screen key binding?
4
votes
2answers
672 views

Emacs font size changes frame size?

I'm using emacs 23.1.1. I set the font size in my .emacs with (set-face-attribute 'default nil :height 100) The problem is that my emacs is now really small. The outer box (what I call a window and ...
6
votes
1answer
472 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;'), ...
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 ...
4
votes
3answers
240 views

Open files in emacs by filename instead of complete path

Assume I have a bunch of directories and can guarantee that no two directories have a common filename (i.e. if foo/bar exists, then bar doesn't exist in any of the other directories). How can I setup ...
5
votes
1answer
556 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 ...
2
votes
1answer
171 views

What is .emacs? How do I edit it?

In this article, I don't understand step 7: 7. Add (load-library “init_python”) in your .emacs How can I do this?
5
votes
3answers
840 views

org mode to dokuwiki converter

Is there an emacs org-mode to dokuwiki converter? Is there an dokuwiki to emacs org-mode converter?
2
votes
3answers
318 views

Is there a convenient general way to “grab” the echoed result of a command in Emacs (of M-: or M-!)?

Sometimes, I want to insert the result of an Emacs command (that has been echoed in the echo area) to another buffer or another running X program. So, I'd like to put it to the kill-ring. What would ...
3
votes
2answers
364 views

Is there a user interface in Emacs allowing one to “grab” the buffer's filename conveniently?

It happens quite often that I want to use the path of the file opened in a certain buffer in Emacs (either the full path or the basename) in another place (a buffer or a different X program, say, a ...
4
votes
2answers
1k views

Script for opening a file in an already existing emacs process

I keep emacs open all the time I'm working. I have several script that will launch all the apps and files related to a specific project. But, it will launch emacs again, rather than simply cause the ...
5
votes
2answers
660 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 ...
14
votes
1answer
737 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 ...
4
votes
1answer
575 views

Emacs text-scale-adjust causes line numbers column to incrementally shrink and disappear

I've set up emacs to display line numbers (global-linum-mode 1), and it works until I start enlarging the text via text-scale-adjust The line numbers column starts to shrink, and disappears ...
4
votes
1answer
358 views

In Gnu Emacs how do I set up a global key to toggle the menu-bar?

Using Gnu Emacs 23.1.1 on Ubuntu 10.04... I'm currently a total newb with emacs, and I've decided to go cold turkey with the Gnome menu bar. (but I do want it to be "available" for the teething ...
5
votes
1answer
672 views

Text editor with font-size selection for specific human languages (ie. Unicode Block) eg Devanagari

Pre Linux, I used Windows.. (too many years in the wilderness :) ... however there was a ray of sunshine in amongst all the general virus/re-install flack.. and that was Notepad++, a text Editor I ...
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 ...
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 ...
5
votes
1answer
402 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 ...