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

4
votes
2answers
1k 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
317 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
148 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
95 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
96 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
41 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 ...
4
votes
1answer
333 views

Emacs M-x query-replace wrap around the document?

I use M-x query-replace on Emacs (M-%) quite often, and I like that I have the flexibility to choose between these options: Spacebar Replace text and find the next occurrence Del ...
4
votes
1answer
70 views

XEmacs: load all files in /home/barry/.emacs_barry

XEmacs creates an .emacs_barry file in my home directory that contain my active buffers + point positions in those buffers(?). It looks like this: "Norma Jean" "/home/barry/plan1.txt" 4504398 nil ...
4
votes
1answer
684 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
651 views

Change view in emacs dired mode

What options are there to change the view of a directory in emacs dired mode? How to apply it? How can I change it on the fly? In particular I want to know: How to make it show the file sizes in ...
4
votes
1answer
350 views

emacs dedicated completion window

To prevent confusion, I only run one "window" of emacs and so I use window in the emacs sense. I'm looking to get a window split which, let's say 70 in width, contains the completions buffer on the ...
4
votes
1answer
264 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
2answers
715 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 ...
4
votes
1answer
33 views

Save scratch emacs file without access to terminal

I'm trying to save the contents of an Emacs scratch buffer, which I can't access any more due to an inaccessible terminal. On my Linux box I've ssh'ed to a server, and started Emacs. My Linux box has ...
4
votes
0answers
80 views

Tracking my shell path in Emacs

Not a long time ago, I found the following precious snippet that allows Emacs to track my current directory on any ansi-term buffer. More specifically, if I cd <some/path> from within a ...
4
votes
1answer
496 views

Colors for menu bar and the scroll bar on emacs 24

I'd like to change the colours of the menu bar and the scroll bar of emacs 24. The instructions of EmacsWiki (the above links) do not work. This might be because I am using emacs 24. According to ...
3
votes
2answers
722 views

Forcing emacs to run with `-nw` when called from terminal

note: This question might have been asked before ( I think I saw it somewhere), but a quick search did not reveal anything. I would like to tell the difference when a command is run from a shell. ...
3
votes
2answers
115 views

Getting emacs to convert latex on the fly?

What's really nice about posting in the math stackexchange, and other forums, is that you can view the latex symbols right below as you're typing your post. Is there a way to do this in emacs? That ...
3
votes
3answers
379 views

Scrolling on very long files (1M+ lines) on Emacs

I was wondering if besides the basic navigation commands: C-p : Jump backwards one line. C-n : Jump forward one line. C-v : Jump forward one full screen. M-v : Jump backwards one full screen. M-a : ...
3
votes
2answers
405 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 ...
3
votes
3answers
969 views

How do I set up a .emacs initialization file?

I am using Linux Fedora 13 (Constantine) and emacs 23.1.1. I am trying to set up a .emacs file for initialization, by using emacs itself to edit and save a file .emacs in my home directory. However, ...
3
votes
3answers
811 views

How to use Emacs to recognize and automatically open GPG encrypted file in ASCII armored format?

gpg -ca passwords.txt create encrypted ASCII file passwords.txt.asc. Emacs open the file as a normal text file: -----BEGIN PGP MESSAGE----- Version: GnuPG v2.0.19 (GNU/Linux) ...
3
votes
1answer
69 views

Undo everything in emacs

Is it possible to undo everything in an emacs buffer in just one step? I can do it step by step using C-x u but how can I do all steps just with one command?
3
votes
2answers
1k views

In emacs (or other editor) how to display the byte offset of the cursor?

The question indicates my preference to use emacs, but the overriding issue is that I want to be able to do a normal text search and somehow see/copy-paste the byte-offset of the matched text. To ...
3
votes
1answer
231 views

Emacs shortcuts in term mode

I've a question about using Emacs as editor and terminal. I split my window into different windows with C-x 3for example. One of the generated Window is used as terminal with M-x term. Usually I ...
3
votes
2answers
759 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
251 views

Can I have emacs automatically indent my whole code after it is all written?

My emacs is set up to automatically indent my code as I write it and also re-indent things correctly if I push tab on any line that got misaligned somehow (usually because I changed the code). I am ...
3
votes
2answers
92 views

How to find Emacs backup files?

Emacs backup files start with .# but I can find those in my directory. I've try: find . -name '^\.#.*' or find . -name '.*#.*' and they are not show up, and I have them. For instance if I create ...
3
votes
1answer
187 views

Emacs: Different users, different themes, same init file

I use emacs at work, where I usually connect to the system with two different users: myuser commonuser The former is my own personal user, whereas the latter is shared by the whole team to manage ...
3
votes
1answer
106 views

Why does Emacs make it difficult for me to have two frames open the same buffer?

I have 2 frames. I switch the buffer in first frame to buffer A. When I try to switch the buffer in the second frame to buffer A, Emacs brings the first frame forward. What I want is to open buffer A ...
3
votes
1answer
195 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 ...
3
votes
1answer
102 views

Appending values to environment variables from within Emacs

I am new to Elisp. I would like to do the following in my init file: ; Retrieve the value of LD_LIBRARY_PATH ; Append '/path/to/some/lib/:'to it ; Save the new value of LD_LIBRARY_PATH So far I ...
3
votes
1answer
101 views

Symbolic link starting with .#

I have a symlink in one of my directories that has the following name: lrwxrwxrwx 1 XXXX ZZZ 37 Jan 15 18:18 .#perl.org -> XXX@YYY.com.2980:1344441539 I am wondering what this symlink ...
3
votes
1answer
199 views

canlock-password - hashed password (?) mysteriously in .emacs

In my .emacs, this has appeared, for unknown reasons: (custom-set-variables ; ... '(canlock-password "fdd7041be5b...") And so on, totalling 40 characters and digits. C-h v offers this: ...
3
votes
2answers
244 views

Creating Emacs TAGS file

I am working through the "Emacs Lisp Intro" book within Emacs 23.4.1 on Debian Wheezy (CrunchBang Waldorf). Section 4.1 discusses the find-tags command and the TAGS file. Instructions are included to ...
3
votes
1answer
145 views

In Emacs, editing C, sort-fields not working, or stating sole completion. Why?

In Emacs, editing C, and trying to execute sort-fields doesn't seem to be working. I enter M-x sort-fields after highlighting a region. At one point it was letting me pass a field number, but then ...
3
votes
1answer
252 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 ...
3
votes
1answer
165 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
225 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 ...
3
votes
1answer
132 views

Navigating the CLI: Go back N words

I'm a Vim user, so I'm learning Emacs commands for use in the Bash CLI. I know that on my systems I can use Vim-keybindings in Bash but I'd like to learn how to use it effectively in its default ...
3
votes
2answers
157 views

Emacs - Changing show-paren-mode Areas

I like show-paren-mode in Emacs, but I would really like to change the highlighting behavior for closing brackets. That is, I want the opening bracket to be highlighted when the point is on the ...
3
votes
4answers
746 views

emacs copy and paste

How can I copy from emacs and paste into another instance of emacs or else where? If I do C-space, M-w, and then C-y, I can only paste in the open instance of Emacs. If I navigate to another Emacs ...
3
votes
2answers
185 views

Wiki for emacs users

I am looking for a new wiki software for a small private network. Since all users are very addicted to emacs, it would be nice to make everything "emacs compatible". What wiki software is most ...
3
votes
1answer
197 views

End of lines problem in emacs when editing markdown texts via It's All Text

I want to edit markdown source in emacs using the It's All Text plugin for firefox. In markdown you have to add two spaces to the line-end to get a new line. Suppose there is such a newline in a ...
3
votes
2answers
705 views

Emacs auto encryption and gpg

Emacs encrypts/decrypts .gpg files automatically. But recently I have lost the ability to decrypt files encrypted by the Linux gpg tool and vice versa. I use: passphrase symmetric encryption gnupg ...
3
votes
1answer
975 views

Disabling caps lock by setxkbmap makes it Shift key in Emacs

I'm using GNU Emacs 23.2.1. within Xfce 4.8.0 (both coming from the Ubuntu Natty repository). I disable the CapsLock by running /usr/bin/setxkbmap -option "ctrl:nocaps" at the beginning of the Xfce ...
3
votes
1answer
68 views

How to replace a char at the cursor in emacs lisp

I want to create a minor mode that helps to input thai tone character. This is what I wrote: (defvar thai-input-mode-map (let ((map (make-sparse-keymap))) (define-key map "2" (lambda () ...
3
votes
3answers
64 views

emacs: in terminal selected string gets lost on ctrl-k

I select an absolute file name with the mouse in a terminal I want to open this file in a running emacs: ctrl+x ctrl+f Emacs mini buffer: contains "~/...." I enter ctrl-a ctrl-k to delete "~/...." I ...
3
votes
1answer
126 views

How to use the Meta/Alt Key with tput?

I want to redefine keybindings for the commandline of a lisp dialect. The commandline is actually modeled after Vi and implemented with tput/terminfo. I want an alternative version with Emacs ...
3
votes
1answer
103 views

can color-theme bind to a buffer?

I want to use different color-theme for different file types. I tried to use add-hook to set the color-theme for the major-mode, but it only applies when the buffer is first load. If I switch to ...