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
492 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
471 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
326 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
163 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
116 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
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
416 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
329 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
174 views

How do I stop emacs from asking me if I want to load a large file?

When I open a large file in emacs, I get a message saying 'foo.bar file is large; really open?' How do I stop emacs from asking me this question all the time? In other words, if I open the file, I ...
5
votes
3answers
1k views

How to replace current word under cursor in Emacs

How do I replace current word under cursor in Emacs? I know that I can use query-replace or replace-string but every time I do so I have to type entire string to be replaced, this is just annoying. ...
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
1answer
574 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
542 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
889 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
724 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
696 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
320 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
308 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
189 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
215 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
219 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
788 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
118 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
3answers
651 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 ...
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
420 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
185 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
655 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
994 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
700 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
807 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). ...
4
votes
2answers
160 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
263 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
112 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
278 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
370 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
62 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
159 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
200 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
111 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
593 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
478 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
1answer
210 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
276 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
141 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 ...
4
votes
1answer
93 views

How to send the content of an emacs buffer to gcc without writing to disk?

It's common for me to run a throwaway piece of code I'm not particularly interested in saving on my disk, so I'm often working inside emacs in a buffer not attached to any file in my system. When ...
4
votes
1answer
95 views

Emacs depends on perl

Why does emacs depend on Perl? I thought it is all based on C/Lisp? Emacs Version 24.1.4.fc17 (Working on a fresh out of the box fedora17)
4
votes
1answer
392 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 ...
4
votes
1answer
32 views

Copy the last Emacs message into the current buffer

Is there a function I could use to quickly copy the message in the echo area (if any) into my working buffer? Should I define the shortcut for that function with define-key or global-set-key or some ...