emacs

Setting auto-mode-alist in emacs

I notice that the current auto-mode-alist entries all end with a single quote, for example ("\\.java\\'" . java-mode) What is the purpose of the single quote. I would have expected to see ("\\.java$" . java-mode) The reason I ask is that I am trying to get files with names matching regexp ^twiki\.corp.* to open in org-mode....

replace regexp r by R if cursor is not on r in emacs

Suppose you visit a file F in an emacs buffer B, let r and R be some replacement regular expressions. Now I want to replace all occurrences of strings r_i which matches r (in some region) by the corresponding replacement-string R_i defined by R such that the following conditions are fulfiled: if I save F, the above replacement must not...

dynamic expansion in minibuffer no longer works when upgrading from Emacs 21.2

Continuing my process of migrating the latest & greatest Emacs 23.2, I hit another unpleasant surprise: dynamic expansion in minibuffer no longer works! By "dynamic expansion in the minibuffer" I mean the feature that lets you blindly hit the spacebar to complete filenames, variables, etc. I also invoked 'Emacs -Q' (to rule out any .em...

How can I use meta-dot (M-.) in python with emacs?

Is there an equivalent of slime for python? For example, if I position the cursor on foo() and do M-. (jump to definition) I would like to see the source definition of the function foo This should work regardless of whether foo is in 1) the local project directory 2) in some ~/.virtualenvs/bar/lib/site-packages 3) in some other p...

Can some please explain this elisp regexp

Can some please explain the following regexp, which I found in ediff-trees.el as a specification for which files/directories to exclude from its comparison process. "\\`\\(\\.?#.*\\|.*,v\\|.*~\\|\\.svn\\|CVS\\|_darcs\\)\\'" Although I am somewhat familiar with regular expressions encountering this elisp string-based variant has throw...

emacs on OS X 10.6

I am a new iMac user. I have extensive experience with Linux on a PC. I downloaded latest version of emacs to the Applications folder. I want to invoke emacs from the command line. However, the default path for emacs is /usr/bin/emacs. what is the best practice for adding the new emacs to the path? I am tempted to create a ~/bin director...

emacs how to invoke the buffer list

Hello! I usually type M-x "buffer-menu", to change buffer. How can I do this with a shorter command? Its quite a long string to type. thanx! ...

Quickhelp for Python in Emacs autocomplete.el?

Hi, I am using Emacs 23.1.1 on GNU/Linux with autocomplete.el 1.3 and Ropemacs 0.6. In Lisp programming, autocomplete.el shows the documentation (known as 'QuickHelp' in autocomplete.el) of the suggested completions. Python completion with ropemacs works, but does not show quick help for the Python completion. Is it possible to enable ...

Why do my emacs comint buffers sometimes seem to share the same history?

I often have several comint buffers open at once, for example I'll have a SQLi buffer open to a database and a set of shell buffers open in various places. Sometimes, for no reason I can detect, all of these buffers start to share a common buffer command history, such that M-p will pull up my last SQL command in a shell-mode buffer, and ...

How can I have term.el (ansi-term) track directories if using anyhting other than bash.

When using eshell or ansi-term and bash emacs changes the default-directory variable depending on what directory you are in. So if I move to /home/user/code/project and then use ido-find-file to open a file it starts ido with the CWD. If I use ksh (my normal shell) or zsh (tried for testing) it doesnt work. Is there a setting or is this...

emacs: search for part of a filename

In eclipse (with the emacs keys) i hit ctrl-x-ctrl-f and it searches for filenames containing the word I type. what is the equivalent emacs feature emacs feature? ...

Emacs C++, opening corresponding header file

I am new to emacs and I was wondering if there is a shortcut to switch between header/source and the corresponding source/header file if there is a reference card like the general emacs ref card Thanks ! ...

Restore previous window position on buffer switch in Emacs

I split windows to view two different parts of the selected buffer simultaneously. If I switch to another buffer in one of the windows and then switch back to the original buffer, I'll lose the previous window position---I'll see the same parts of the selected buffer in both windows. How can I restore window positions amongst buffer swit...

"Edit in Emacs..." input manager for OSX

Is there anything like the input manager for TextMate (at the very end of the page) which allows to edit from any Cocoa text edit controls in TextMate? It basically installs a menu "Edit in TextMate...". I tried to search for it, but I have not find anything. I think it would be very nice to have such a feature. Thanks. ...

basic shortcut (M-del) not working in Emacs and giving erratic behavior

Hello, I am using Emacs and most shortcuts work normally, but M-Del for deleting a word backwards produces either an error at the bottom of a `scan' error, and at other times moves the cursor a set of lines below. Any ideas why this may be happening? M-Del works fine for deleting forward words. (** from a comment made below it appear t...

Problem with pyflakes in emacs on Windows

Hi, I followed this link here to try and set up emacs for python dev on windows. Although everything seems fine, pyflakes is creating problems and not giving me the syntax checking. Everytime I open a '.py' file, I get the error "Failed to launch syntax check process 'pyflakes' with args 'foo.py': searching for program: No such file or ...

How do I find the display size of my system in Emacs?

I use the same .emacs across multiple machines, operating systems and platforms. I would like the default frame size of Emacs upon invocation to be relative to the available screen size (e.g. 96 lines work very well on a 1600x1200 desktop screen, but on an 1280x800 laptop I need to specify no more than 68 lines). Is there an emacs-lisp ...

How can I send plain text email (with line breaks) using sp_send_dbmail?

I have a SQL Server 2008 procedure that sends email via sp_send_dbmail. I'm using the following code: set @bodyText = ( select N'Here is one line of text ' + N'It would be nice to have this on a 2nd line ' + N'Below is some data: ' + N' ' + ...

emacs regexp-builder doesn't work in replace-regexp

Hi I have an emacs buffer containing the text a1b2c3 using the regexp-builder, i create the regexp "b\\(2\\)" and can see the match highlighting (b2, with the 2 in a different colour). however, when i paste the expression into replace-regexp, i get 0 matches. both with and without the quotes. to get a match i need to use b\(2\)...

Problem with emacs terminal mode

Hi, I have some problem with the Emacs terminal mode. I'm a mac user and I use Emacs downloaded from emacsformacosx.com; I installed also ESS and AucTex. I work with R, LaTex, Sweve and, I menage all with Emacs. When I want to compile the Sweave file I open the terminal and I use the "R CMD Sweave myfile.Rnw" command to generate a myf...