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

6
votes
1answer
432 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
901 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
502 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;'), ...
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 ...
5
votes
2answers
510 views

Emacs move to next whitespace

In emacs there are the functions forward-word and backward-word. Are there also functions which move the point to the next/last whitespace?
5
votes
2answers
342 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
2answers
166 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
118 views

In Emacs, how do I inspect what has been modified in a buffer (before saving and overwriting the file)?

In Emacs, how do I inspect what has been modified in a buffer (before saving and overwriting the file)? (In a sense, the requested action is an analog of git status and git add -i showing what has ...
5
votes
3answers
679 views

Piping into less and editing: “cannot edit standard input” error. Workarounds?

I recently learned that if I page my files with less, I can press v and open the buffer in Emacs. This works as long as I have the environment variable $EDITOR set up correctly, which in my case I ...
5
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
1answer
421 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
348 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
2answers
2k views

Some keys are invalid on emacs when using German keyboard

When I am using emacs 23.3 on KDE, I can not input ^, ´ and ~ from my German keyboard. If I press these keys, then emacs says that <dead-circumflex>, <dead-acute> and <dead-tilde> ...
5
votes
2answers
883 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). ...
5
votes
1answer
579 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
1answer
579 views

emacs --daemon crashing after closing emacsclient -c

I start emacs daemon with the following commnad. $ emacs --daemon This seems to work. After this I start emacs client as follows $ emacsclient -c Whenever I close the emacsclient, the server ...
5
votes
3answers
903 views

org mode to dokuwiki converter

Is there an emacs org-mode to dokuwiki converter? Is there an dokuwiki to emacs org-mode converter?
5
votes
1answer
762 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 ...
5
votes
1answer
706 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 ...
5
votes
1answer
332 views

Relocatable emacs

Is there a way to build emacs on Linux so it doesn't embed the path where it was built into the binary, and it can be relocated harmlessly to a different path? That is, if you build with ...
5
votes
1answer
413 views

How can I use two modes in emacs (markdown and auctex)?

When I edit markdown in emacs I use markdown-mode. However I often have to type some math formulas in the markdown file (processed by mathjax). However for those math parts markdown mode is not very ...
5
votes
1answer
320 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
1answer
199 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
235 views

Linux VT Emacs in tmux, breaks color and cursor

TERM is set to screen. I tried with screen-256color, but then the colors went really nuts. I also tried xterm, linux, and some others (that I could think of, not really thinking) but screen is the ...
4
votes
2answers
227 views

Emacs' file extension recognition

How do I get Emacs to recognize new file extensions? For example if I have a .c file and I open it in Emacs, I get the correct syntax highlighting for C, but if I have a .bob file format (which I know ...
4
votes
2answers
800 views

Why is my hostname different in Emacs?

So I changed the name of my computer recently, by editing /etc/hostname. The bash prompt is user@name, so I know it has worked. But in emacs, in the window bar it says emacs@name.tiscali.co.uk. ...
4
votes
2answers
145 views

Why can't Emacs running in a terminal distinguish Ctrl+; from “;”?

This question arose from my previous question on emacs beta. In short I want to bind C-; to an Emacs functions in a terminal, but it seems that something captures this key before it reaches Emacs: ...
4
votes
1answer
1k views

Showing type of newline character in Emacs

How can I have Emacs display the type of new character? I am looking for something similar to what Notepadd does (see below). I read that Emacs comes with M-x whitespace-mode but this doesn't seem to ...
4
votes
2answers
1k views

How to modify write permission on current buffer in emacs?

Is it possible to change the write permissions on a file from inside emacs, without killing/re-opening the buffer? Sometimes I forget to modify the permissions on a file before opening it. I can ...
4
votes
1answer
459 views

Emacs simple arithmetics in query replace

Is it possible to do the following in emacs: Query replace all numbers in a region by the number +n, for example if you have: 12 and 7 are nice numbers let n be 3, then it should transform to 15 ...
4
votes
1answer
190 views

Org-mode tables: How to insert result of a system command?

In Org-mode I would like to insert the result of a Unix command in a field. For instance, consider I have the following table: | / | | /bin | | /usr/bin | | /lib | | /usr/lib | I ...
4
votes
4answers
693 views

Code templates with emacs

How can I configure emacs to generate some code skeleton? For instance, for C files: #include <stdio.h> #include <stdlib.h> int main (int argc, char **argv) { return EXIT_SUCCESS; ...
4
votes
3answers
1k views

No font in emacs on CentOS

When I open emacs over an SSH connection I get this error Warning: Cannot convert string "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct Warning: Cannot convert string ...
4
votes
2answers
718 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?
4
votes
2answers
161 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: ...
4
votes
3answers
275 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 ...
4
votes
1answer
113 views

How to create a Emacs file that looks/feels likes the Emacs start up page?

The Emacs start up page has image, link, and fonts with different size all in one. How can I create a page like that?
4
votes
1answer
308 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 ...
4
votes
1answer
372 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 ...
4
votes
2answers
75 views

Can emacs render downloaded html files?

From Firefox, I downloaded a .html file, with a directory with name ended in _files, by specifying "Webpage, Complete". When open the .html in emacs, even under html-mode, only the source of the html ...
4
votes
1answer
179 views

Removing the last n characters from every line in an emacs buffer

Using Emacs built-in facilities, is there a good way to remove the last n characters (for n >= 1) from every line in an Emacs buffer? I suppose it is possible to define a keyboard macro to do this, ...
4
votes
2answers
220 views

Emacs shell mode makes $PS1 different

I have a custom $PS1 variable that looks like this on my command line: And on emacs using M-x shell unfortunately looks like this: Here is my $PS1 variable export PS1='\[\e]0;\u@\h: ...
4
votes
1answer
132 views

Emacs: make portion of buffer readonly

I sometimes edit files in emacs where portions of the file are documentation or something else that shouldn't be edited, and another portions are "play areas" where I'm free to edit and create new ...
4
votes
1answer
693 views

Emacs X toolkit support?

From what I understand, Emacs uses GTK as it's default X toolkit. Does Emacs support X toolkits other than GTK? For example, can I build Emacs to use Qt4 instead of GTK?
4
votes
1answer
499 views

Change column width in an emacs Ibuffer on the fly

Is it possible to change the column width in an emacs Ibuffer on the fly?
4
votes
2answers
437 views

Emacs: Deleting a line without sending it to the kill ring

I would like to use C-k to delete a line without sending it to the kill-ring. I have the following on my .emacs file (delete-selection-mode 1) but this only seems to work for C-d (delete-char) I ...
4
votes
1answer
222 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 ...
4
votes
2answers
977 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
306 views

Getting wmctrl to work with multiple Emacs windows

I'm trying to write a script that switches focus to Emacs. This is what I have: #!/bin/bash wmctrl -a 'emacs@pat-ubuntu-desktop' It works fine when there is only one Emacs window (or "frame," in ...
4
votes
2answers
146 views

printing .cpp file from command line using emacs

The goal is to print a set of *.cpp files on a network printer, but... in a way that the (color) printer prints the files like they appear in the c++ editor including the colors and highlighting. And ...