emacs

How to turn off auto replacement in Emacs Speaks Statistics for R

In Emacs Speaks Statistics for R, how can the auto replacement of "_" with "<-" be turned off? ...

Reloading a changed python file in emacs python shell

In the emacs Python shell (I'm running 2.* Python) I am importing a .py file I'm working with and testing the code. If I change the code however I'm not sure how to import it again. From my reading so far it seems that reload(modulename) should work, but it doesn't seem to. Perhaps just shutting down the python shell and restarti...

How to determine operating system in elisp?

Sorry if this has already been asked; however I don't seem to be able to find an answer anywhere grr. How do I programmatically determine which os emacs is running under in elisp? I would like to run different code in .emacs depending on the os. ...

ediff as mergetool

I would like to be able to use ediff with "git mergetool". I found some patches that alter the source code, which I don't want to do. Instead, I'd like to add ediff support with my .gitconfig. I know git has builtin support for emerge, but I prefer ediff. I attempted to add these lines to my .gitconfig: [mergetool "ediff"] cmd = ...

What are these ^M's that keep showing up in my files in emacs?

So I think it may have to do with textmate, but we work in a small team and are having some issues with full-file conflicts of nearly identical files in git because each line of one branch has a ^M appended to it. I would just google it, but since google searches strip special characters like ^ I am coming to you guys for help on this. ...

Setting different c-basic-offs for different projects

Hi, all I usually use 4 white spaces to indent C programs, but in order to keep in consistent with some open source projects, I have to change to 2-white-space indenting sometimes. Currently my indenting style is assigned in my .emacs file with (setq c-basic-offset 4) And when I want to work on those 2-white-space indenting project...

function to call same shell command in dired

hi, i'd like to be able to call the same shell command on the marked files in dired without the need for emacs to prompt the command input as the command will always be the same. in particular, the command is "open" (for mac os x). i tried to hack the function dired-do-shell-command in dired-aux.el but i don't understand the interacti...

How can I set the encoding of shell-command-on-region output?

I have a small elisp script which applies Perl::Tidy on region or whole file. For reference, here's the script (borrowed from EmacsWiki): (defun perltidy-command(start end) "The perltidy command we pass markers to." (shell-command-on-region start end "perltidy" t ...

Mapping the :edit command to a certain editor

I've got the Haskell interpreter running in Emacs. With this I've got the typical Emacs setup of 2 open windows, the source file I'm editing the Haskell interpreter Using the command :edit file in the interpreter it will open the file I tell it to, but it will open it in Notepad. Is there a way to map the :edit command to use Emac...

emacs - find-name-dired - how to change default directory

In emacs when you type M-x find-name-dired it will give you two prompts. The first is what directory path you want to search in, and the second is what the file pattern you would like to search for. How do I change it (in my .emacs) so the first prompt is always a specific project directory? Also, how do I make it so the file name sear...

Defining new syntax in Emacs

Hi, I have a custom config file format and I would like Emacs to recognize and highlight the syntax. Is this possible. If yes, how do we do it? Thanks for your answers. ...

How do I stop emacs dired mode from opening so many buffers?

When I use dired mode to browse around and find a file I want to open in Emacs, dired opens a new buffer for each directory I visit when looking for the file each time I select a directory with Enter, which means I can end up with a lot of buffers I don't want: . * newer 0 Fundamental c:/work/stackoverflow/batc...

Emacs 23.1 and Mac OS X problem with files drag and drop

I've just compiled and installed emacs 23.1 on my mac. It's running Leopard 10.5.8. And I've noticed that dragging and dropping does not work correctly (as it used to work with emacs 22). Now when dragging a file to the emacs icon on the dock, Emacs will start with two windows (frames in its terminology), one showing the startup screen a...

Cocoa Emacs print-buffer

In Carbon Emacs, I was able to call M-x print-buffer and an OS-X Print Dialog appeared, letting me choose my printer. Now that I've switched to Cocoa Emacs 23.1, the print-buffer command does not behave the same way. It ends up sending the job directly to the printer, using the last selected printer (which might not even be available). ...

Custom Agenda View in Org Mode: Combining Dates and Tags

I would like to create a custom agenda in org mode that will show me all the TODO items with a particular tag that are either overdue or due today. However, I can't find any search function that will allow me to combine the two. Am I missing something, or am I trying to use the tool incorrectly? ...

Trouble installing jdee in Carbon Emacs in Snow Leopard

I recently decided to try emacs for java development, so this is the first time I've used emacs. I'm not getting any error on emacs startup, but I don't think jde is installed correctly because I don't see a "jde" menu item when viewing java files. Any suggestions on how I can troubleshoot further? I downloaded and extracted cedet, jde,...

saving all modified buffers in emacs, but not one by one

When I press C-x s or C-x C-c, emacs displays the names of modified buffers one by one and asks what to do with each (save, diff, pass, ...). Pressing y one by one is slow. Pressing ! doesn't let you see what buffers are being saved. How can I have the names of all modified buffers displayed first so that I can mark off some of them an...

Emacs Lisp: difference between (function (lambda ...)) and (lambda ...)?

What is the difference between (function (lambda ...)) and (lambda ...) and '(lambda ...) ? It seems three are interchangeable in a lot of cases. ...

How do I keep Emacs org-mode from splitting windows?

I'm a new emacs user using emacs for the awesome org-mode. I have links to all my org files at the top of my pages but everytime I click a link it splits my window, so I only have half of the screen estate available. How do I set it so that emacs does not split the window horizontally but rather opens up a new window for my links? ...

kill the associated buffer when close the emacs-client frame by pressing Alt+F4

I get used to emacsclient for the speedy response like vim, by putting emacs into sever mode with command "emacs --daemon". But I found it quite annoying that lots of buffers kept alive when I viewed some files and then closed them by pressing Alt+F4. I have to kill the buffer explicitly before closing the frame. I want to know, if the...