emacs

Make Emacs use UTF-8 with Python Interactive Mode

When I start Python from Mac OS' Terminal.app, python recognises the encoding as UTF-8: $ python3.0 Python 3.0.1 (r301:69556, May 18 2009, 16:44:01) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.stdout.encoding 'UTF-8' This works the same fo...

Run sgml-pretty-print when opening an xml file in emacs?

I can currently use sgml-pretty-print to pretty print an xml file in emacs, but it's a manual process: M-< C-space M-> M-x sgml-pretty-print I'd like this to happen automatically (or at least have some option to do so). I'm new to emacs/elisp, and do not understand how: emacs knows what code to run when you open a file (does this ...

Emacs unable to load its startup files

Hi, I upgraded emacs on a remote terminal to 23-snapshot. As I did not have root privileges there, I did 'make install' with 'prefix' set to a folder in my home directory. Now when I start emacs, it gives an error 'Cannot open load file: encoded-kb', it, also, is unable to run dired or load cc-mode. I tried starting it with '--no-site-f...

How do I fix the cursor to the middle of the screen in Emacs, so that the page moves, not the cursor?

I'd like to fix the cursor to the centre line of the screen, so that when I press Ctrl-N or Ctrl-P, the page itself moves up or down, and the cursor stays still. Has anyone got any tips on how to achieve this? Thanks Ed ...

EmacsW32 renames buffers with old Windows shortened file names.

Let's see if I can reach the EmacsW32 users on stackoverflow. I've just installed the patched version of EmacsW32 from http://ourcomments.org/Emacs/EmacsW32.html I find it very nice that .txt files are associated wth Emacs, so that when you click on one, emacsclient opens it in the running instance of Emacs. Problem is, for some reaso...

How to switch split screen emacs where one screen is the editor while the other is terminal emulator?

I have ssh'ed to a remote machine and started emacs. I opened one small python application, and then split the screen into two, and M-x terminal-emulator in the other. I would like to edit the script in one section, then press C-x o and run it on the other section. Unfortunately, I can't seem to C-x o away from the terminal emulator and ...

Can I show different icons for different frames with EmacsW32?

I've created two EmacsW32 frames, one for each of my monitors. I want to be able to alt-tab to the left or right frame when both frames are hidden, but I can't tell them apart because the icon order changes in the alt-tab window. Is there some way to change the icon for a particular frame in EmacsW32 on Windows XP? ...

ELisp: Check if string is already in list

How do I check if a string is already in a list in ELisp? I need to check if a certain path string is already in exec-path, and then add it to that list if it's not. Thanks! ...

Resources for learning Emacs

I'd like to learn Emacs, and was wondering if anyone had any good resources (free or otherwise) to recommend. I'm mostly interested in programming Emacs, starting from the basics, and lots of "exercises". I have used Emacs and most of its editing features, although I'm a bit rusty so a very quick refresher on that would be useful as well...

Making php-mode Compatible with Emacs 23

I am using Emacs 23 and php-mode.el 1.5.0. When I have this in my .emacs: (require 'php-mode) I get this error message when Emacs starts: Warning (initialization): An error occurred while loading `/Users/kdj/.emacs': error: `c-lang-defconst' must be used in a file To ensure normal operation, you should investigate and remove the c...

How can I spot subtle Lisp syntax mistakes?

I'm a newbie playing around with Lisp (actually, Emacs Lisp). It's a lot of fun, except when I seem to run into the same syntax mistakes again and again. For instance, here's something I've encountered several times. I have some cond form, like (cond ((foo bar) (qux quux)) ((or corge (grault warg)) (fred) (t xyzzy))) ...

how to get focus-follows-mouse over buffers in emacs?

Suppose I have a source file open and I launch a shell. I can hit C-x o to switch between the two buffers. But how can I get it so that when I move the mouse the buffer under the mouse gets focus, just like the "focus follows mouse" option common in window managers? ...

In PuTTY, Emacs key combination has no effect

Please try to forgive this slightly off-programming-topic question. At least I'm getting this problem when porting my C++ code to Linux. The problem I'm having is very basic: some key combinations are not recognized by emacs. One result of that is that I can't 'undo' edits in Emacs. I'm running Putty.exe from Windows to my Ubuntu machi...

In Emacs, how do I change the minibuffer completion list window?

I would like to set a specific window for the minibuffer completion list. Currently, I have 3 windows in this configuration: ______ | | | |____| | |____|_| In this case, I'd like to use the bottom left window for the minibuffer completion list. Currently, it seems to a window at random, and most of the time it likes to use the fa...

how to compile emacs 22.3

Hey, I've recently made a Slax instalation with only the core program. I used a copy of the live CD and ran a script to make hda1 bootable and then another script to use lilo to boot it... they were all in the CD... So it's like a big live cd on my HD and not really a full fledged OS. Anyway I want to begin by compiling my own Emacs......

emacs recompile file while running

How do you recompile emacs-lisp scripts from within emacs without problems? I've tried batch-recompile-direcory, but this causes weird glitches with the recompiled files until I restart emacs. Is there any way to do this so that no errors are caused? ...

Multiple hideshow regexes

In emacs, is there a way to get hideshow-mode to recognize multiple regular expressions for hiding? ...

Disabling transient-mark-mode

In my .emacs file, I have (setq transient-mark-mode nil) and yet transient-mark-mode is activated when I start up emacs. Calling transient-mark-mode gives the message 'transient-mark-mode disabled', but C-space still starts highlighting a region. Is there a way to turn this off? ...

Can I use ido-completing-read instead of completing-read everywhere?

I'm a big fan of ido-mode, so much so that I would like to use it for things like describe-function or find-tag and so on, without having to write something like in "Can I get ido-mode-style completion for searching tags in Emacs?" for each one. Both (defalias completing-read ido-completing-read) and (setf 'completing-read 'ido-comp...

2 questions. IDO mode not caching properly / forcing buffers to named windows.

1 My ido mode does not properly cache filenames / folders. It will list files inside a folder, but from a while ago without any of the newer files showing. Any suggestions ? 2 In jde, when I have multiple windows open, compiling on one window will create a corresponding "* name of the class *" that will open on the next window in orde...