emacs

How to make emacs shell execute init file automatically?

My bash init script (~/.profile) contains important initializations, but whenever I use shell-command or compile in emacs, that init file is not read, and without those initialization my bash commands in emacs will fail :( How do I force emacs to execute my init file for the shell that it's using for shell-command? Clarification: I'm no...

Emacs term-mode colors

I used have my term-term-name set to vt1000 and my bashrc set to xterm this worked fine except that colored output did not work. Then i set the term-term-name to screen and my .basrc to screen that make the coloring work but if i type a message thats longer than the line it does not move to the next line but goes to the beginning of the...

Emacs Clojure mode tab-indentation huge in some cases

I'm using Emacs' Clojure mode with SLIME and swank-clojure. I have an issue with the indentation. Most of the time the indentation does what I want: it indents with 2 spaces when I press TAB. But , for example, in the case of a proxy, the indentation I get with TAB is huge: 10 spaces. Example: (defn- create-frame [] (let [frame (JFram...

Matching regexp with grouping in emacs

Hi, I'm trying to match a string and then use grouping to create a new string: (let ((url (browse-url-url-at-point))) (if (string-match "http://domain/\\([0-9]+\\)/\\([a-z]+\\)\.\\([0-9]+\\)" url) (setq filename (concat (match-string 1 url) "_" (match-string 2) "." (match-string 3) ".xml")))) When I (print url) I get the foll...

Given an emacs command name, how would you find key-bindings ? (and vice versa).

If I know an emacs command name, says, "goto-line"; what if I want to query whether if there are any key-sequences bound to this command ? And vice versa, given a key sequence, how can I find its command name ? ...

How can I get the compilation buffer on the bottom rather than on the right in Emacs 23?

I've installed Emacs 23 and have found that the compilation buffer (when using M-x compile) appears in a different position than it did in Emacs 22. The currently open buffer appears on the left and the compilation buffer on the right. How to I revert to the Emacs 22 behavior of having the current buffer open on the top and the compilati...

completely lucid tabs and spaces in emacs?

The title of my question is a reference to sane tabs in emacs. Basically what I want is to globally set tabs and indention to work in some uniform way. I feel like emacs is so much better than TextMate or BBEdit but really the way they handle indention is simple and great for my purposes. In emacs if you use some tab/space scheme that'...

Name of this function in built-in Emacs Lisp library?

The following Emacs Lisp function takes a list of lists and returns a list in which the items of the inner lists have been concatenated to one big list. It is pretty straight-forward and I am convinced something like this must already be part of the standard function library. (defun flatten (LIST) (if LIST (append (car LIST) (fl...

Emacs - Multiple columns one buffer

I'm trying to edit some assembly code which tends to be formatted in long but thin listings. I'd like to be able to use some of the acres of horizontal space I have and see more code on-screen at one time. Is there a method for getting Emacs (or indeed another editor) to show me multiple columns all pointing to the same buffer? C-x 3 ...

how to align arguments to functions in emacs?

Say if I have the following: func(arg1, arg2, arg3...) func(longargarg1, longerarg2, arg3,...) ... How do I align the arguments so that it's like following? func(arg1 , arg2 , arg3...) func(longargarg1, longerarg2, arg3,...) ... [I can use M-x align-regex to align the first argument, but I cannot cook up with a suitable ...

Automatically generate C++ Source and Header (and update vice versa on changes) files

Is there some tool (hopefully emacs) that can update and add the correct function definitions and other things to keep the source (.cpp) and the header (.h) files synchronized. For example if I start doing this file: aaa.h Class AAA { int b; public: void func(); }; something that will automatically create and add file: aaa.c...

Is there a good emacs project management somewhere?

Was hoping to find something relevant in the "related" box ... Is there a good emacs project management plugin somewhere? I'm just playing with new gnumacs and need something simple; something which is gonna keep several files together tied with the project, and enable me to compile them (pretty much just put their names in with the co...

How to get information about current buffer/file in emacs?

When working on a buffer (that maps to a certain file) , how to get info about it? Like Path on disk, size, ... ...

Is there something like Emacs' toggle-read-only in Visual Studio?

The subject says it all. Is there an easy way to toggle the editability of a buffer in Visual Studio? This would be similar to the toggle-read-only command in Emacs. I am not looking to change the file attribute ... just whether I can edit the file while it is open in Visual Studio. I am using 2008 and 2005. Why would I want to do th...

Speedbar in emacs?

Hi Is there a way to dock the speedbar in emacs? Thansk ...

Any Emacs command like paste-mode in vim?

When i'm trying to paste some code from browser to Emacs, it will indent code automatically, is there any way to stop Emacs from indenting temporarily like :set paste in vim? ...

Emacs crashes when I open a specific header file

I was digging through the header files for SDL in Linux when I tried to open the file from the SDL library called "SDL_opengl.h" in Emacs. For some reason, it always causes it to crash. It opens just fine in Vim and in gedit. Has anyone else had an issue with Emacs just plain refusing to open a particular file? What sort of things s...

Auto-formatting a source file in emacs

How do I apply a set of formatting rules to an existing source file in emacs? Specifically I have an assembly (*.s) file, but I would like a generic command for all types of files. I am trying to use M-x c-set-style with gnu style, but I am getting an error: Buffer *.s is not a CC Mode buffer (c-set-style) ...

Bazaar: how put files from different locations in one repository?

I'm new to bazaar and would like to give it a try by storing my Emacs configuration files in one repository. These files consist of a .emacs file in my home directory (on unixish systems) and a couple of Emacs Lisp source files in /usr/local/share/emacs/site-lisp I'd really like to have one repo because some changes in my .emacs file ...

How to open files automatically when starting emacs?

A newbie question and probably very bingable (had to use that word once :-)), but as I gather thats both ok for SO : How can you get files to open automatically when starting emacs? I guess it sth. like executing the find file command in your .emacs but the exact notation isn't clear to me. ...