emacs

Assign multiple Emacs keybindings to a single command?

I'm giving ErgoEmacs mode a try to see if I can use Emacs more comfortably. Some of its keybindings are fairly intuitive, but in many cases I don't want to outright replace the defaults. For example, in the context of ErgoEmacs' navigation shortcut structure, M-h makes sense as a replacement for C-a--but I want to be able to use both, n...

Don't display ^M characters with emacs

Hi Guys, I am wondering if there is a way to have to temporaly not displaying the ^M characters in a file. I don't want to remove them I just want to not displaying them. Cheers, ...

is it possible to move the emacs minibuffer to the top of the screen?

Hi all I've started coding on a 30 inch monitor and am wondering if it's possible to move the minibuffer to the top of the screen in emacs? google searches aren't showing up anything. Cheers Nimai Etheridge ...

Is there a pure HTML5 emacs mode?

Question http://stackoverflow.com/questions/1082474/authoring-html5-in-emacs talks about nxml-mode but, from what I read, that can only be used for XHTML5, I want to use emacs with HTML5 (no XML syntax). Is there any mode with auto-indentation, tag/attribute completion, etc.? ...

Autocompleting \cite{} with emacs + auctex gives "cite: no such database entry"

Hi: I am running Emacs 23.1.1 and AucTeX 11.85 in an Ubuntu 8.10 machine. After opening a tex file, the first time I try to use the autocompletion of the \cite{} command, I get "cite: info not available, use `C-c &' to get it." in the minibuffer. After doing the 'C-c &', I get "byte-code: No BibTeX entry with citation key". Subseque...

How can I execute a SQL query in emacs lisp?

I want to execute an SQL query and get its result in elisp: (let ((results (do-sql-query "SELECT * FROM a_table"))) (do-something-with results)) I'm using Postgres, and I already know all of my connection information (host, username, password, db et al) I just want to execute the query and get the result back, synchronously. ...

Emacs on Windows + SSH: subshell spurios characters?

Hello, I'm trying to connect via SSH to a remote shell, using Emacs on Windows XP. I'm currently using Putty, but I'd like to switch to Emacs. I can't find a way which works right. The best I've achieved is running Plink (command line version of Putty) as a subshell, but I'm still getting spurious characters and duplicated prompts like...

Emacs & PHP indenting question

Hi all, I'm a bit new to using emacs for webdevelopment. I am using php-mode and i am happy with it. There is only one issue i have which causes me a lot of problems because of our company's coding style. When i have a function, e.g.: $instance = new Model('foo', 'bar'); And I want to indent it like this: $instance = new Model( ...

Cucumber's ANSI colors messing up emacs compilation buffer

When working in Emacs, I use the compile command (F12 by default) to run programs. When I run Cucumber in Emacs, Cucumber spits out ANSI colors that the Emacs compilation mode doesn't interpret. The result is ugly and hard to read. Here's a snippet of the *compilation* buffer showing the ugly: ^[[31m(::) failed steps (::)^[[0m The ...

How do I get emacs to write to read-only files automatically?

I am finding myself editing a lot of files that are read-only. I usually hit C-x C-q to call toggle-read-only. Then I hit C-x C-s to save and get, File foo.txt is write-protected; try to save anyway? (y or n) After hitting y, the file is saved and the permissions on the file remain read-only. Is there a way to shorten this process ...

How to advise primitives in Emacs

I was trying to answer another SO question when I hit upon some very odd behavior. Here's my little test case: (make-variable-buffer-local (defvar my-override-mode-on-save nil "Can be set to automatically ignore read-only mode of a file when saving.")) (defadvice file-writable-p (around my-overide-file-writeable-p act) "override...

Emacs: Using and initializing CEDET

Hi, I'm using Emacs with CEDET and auto complete for code completion. Originally I set up CEDET so it loads at Emacs start up every time. However, this took quite a long time, so i thought it would be clever to load it just if needed, i.e. - in my case - when entering C++-Mode. So I moved the original function into a lambda that is ...

Java-mode indentation

Java-mode seems to be unindenting rather than indenting after a method declaration. By which I mean I'd expect to see this: class GoodExample { public void method() { allNicelyIndented(); noProblemsHere(); } } But instead get this: class CrazyIndenting { public void method() { // ((inclass 134) (topmost-...

EDE subproject confusion

I've been trying to get subprojects in EDE to work, but I don't understand much and I can't find any good documentation. What would the project configurations have to look like for the following tree: Test Project.el bin test src Project.el main.cpp class.cpp inc Project.el class.h ...

system speaker in GNU/EMACS

Hello, When I go abroad text or even under any conditions in Emacs works system speaker. How can i turn of it. I try to write system-bell off in /etc/inputrc but it isn't help Thank you ...

Visual Studio 2008: Smoothly switch between Emacs and default keybindings

Is there any way in Visual Studio 2008 to smoothly switch between using Emacs keybindings and the default ones? I will soon be doing some pair programming and I need my Emacs keybindings to keep myself from going insane. ...

Moving the Emacs point to beginning of specific text for Perforce commit messages

How do you move the point in Elisp to the beginning of <enter description here> and kill that text. I'd like to place this in my ~/.emacs-p4, which is used via P4EDITOR, $ echo $P4EDITOR emacs -nw --no-init-file --no-splash --load ~/.emacs-p4 The template use for p4 submit is: # A Perforce Change Specification. # # Change: The ...

C++ Keywords not Colored in Emacs

I have been using emacs for a while for mainly python programming, and have started C++ coding with it. When I open a c++ file, it opens without problems with c++-mode. The background and foreground colors are normal for the theme I have with color-theme, but keywords and strings are not colored differently. Below is the code in my .emac...

Emacs custom background color by mode

I use emacs to edit a number of file types, and would like an easy visual queue to tell .c files from .vhd or .py files, for instance. How can I add a custom background color to the major mode for that language? ...

How to recover from messy situations in Emacs?

I am just starting out in in Emacs. Sometimes I'll be experimenting with something and when I'm finished experimenting, I want to just go back to the buffer I was editing, but I don't know how. Worse, sometimes I hit a key by accident and don't even know what I hit! In Vim I can just hit ESC to recover; is there any similar way to rec...