dot-emacs

gdb within emacs on Windows

I'm running Emacs 22.3 in Windows. Earlier today I had gdb working within Emacs just fine. I was installing QT4 and during the installation it asked me to uninstall MSYS which I quickly clicked through not thinking about things. I think I had gdb installed with the MSYS package and Emacs was using that, but I'm not completely sure. N...

gdb not showing code within emacs on Windows

I asked a question just yesterday which caused this new issue. http://stackoverflow.com/questions/1424231/gdb-within-emacs-on-windows Basically I was installing a QT sdk which asked me to uninstall MSYS which I did & I hosed my emacs/gdb interaction. Here is the gdb_init file that I'm using. Before the uninstall of MSYS this work...

How to have emacs auto-refresh all buffers when files have changed on disk

I have a non-emacs global search and replace function that causes my disk files to become more up-to-date than my emacs buffers (en masse). Is there any way to tell emacs to refresh all the buffers from disk in one fell swoop, instead of having to do each one individually by reloading the file? Thanks! D ...

custom-theme-set-faces compatible with tty

I have created an emacs-23 custom theme using customize-create-theme. It works fine under X (Linux gnome desktop). However, when running under a tty (within gnome-terminal) some of the colors are wrong. It is not the accuracy of the colors which are a problem (although it would be nice to match them under both situations) but the fact t...

Emacs Setting which-function-mode

I would like to have which-function-mode on by default when I open up Emacs. I've added the following lines to my .emacs file. (setq which-func-mode t) (setq which-function-mode t) When I open up a .cpp file and navigate to the body of a function, I'm not seeing the function name in the status bar at the bottom like I should. If ...

Don't show uninteresting files in Emacs completion window

How do I prevent Emacs from showing me all the files I'm not interested in (such as ~ backup files, .pyc files, or .orig files) when I: C-x C-f TAB ? It is working in one respect: if I know the file I want to open begins with foo and I type foo TAB then the mini-buffer correctly autocompletes all the way to foo.py. It correctly ignored ...

What do I pass to the switch-to-buffer arguement in my .emacs file?

I am getting an error in my .emacs file at the following line: (switch-to-buffer *Completions*) error: symbols value as variable is void I did a describe-function on switch-to-buffer and found I CAN pass it a BUFFER (and another optional argument which I do not currently need). What am I doing wrong? Just a few notes: a. I also need...

How do I get my cocoa emacs on Mac OS X to load my .emacs visual customizations for new windows (any document opened after the first)?

So I just downloaded emacs 23.1 for my new snow leopard macbook pro from http://emacsformacosx.com/ and it works like a charm, except... I have visual customizations in my .emacs, a few lines are extracted here: (set-background-color "black") (set-cursor-color "green") (set-default-font "--Lucida Console-normal-r-normal-normal-1...

How can I show the Org-mode agenda on Emacs start-up?

I would like the Org-mode agenda to automatically show what I have to do today when I open Emacs. The org-agenda command is interactive, so it doesn't seem to work well for this purpose. Is there a way to show the Org-mode agenda on Emacs start-up? Thanks, Conor ...

cannot open file cua in second instance of emacs

i get the following error when trying to open a second instance of emacs: File error: "Cannot open load file" , "cua" I guess I don't HAVE to open another instance of emacs (that is the beauty after all), I was just trying to keep some things separated (specifically work - like code and debug - and play - like news). Would there be a...

change emacs ruby-mode indent to 4 spaces

From a previous post I got Ruby mode working in emacs. This is working great. http://stackoverflow.com/questions/2078079/setting-up-emacs-file-for-mac-ruby-development Our company uses 4 spaces for indents though instead of the default 2. I am having difficulty getting this to work. Here is my .emacs file (add-to-list 'load-pat...

Default string for grep-find in emacs

I often use the command grep-find in emacs to search through my source files, but it's annying that it always finds matches in temporary files and backup files and so on. The default command for grep-find is: find . -type f -print0 | xargs -0 -e grep -nH -e I know I can modify it before I run it to match my needs but how do I change i...

emacs grep-find link in same window

When I use grep-find it opens another window (area in the frame) with a list of results that I can select. When I select one it opens the target file in a different window than grep-find is in. How can I get the target file to open in the same window as the grep results (replacing the grep results window with what I am actually looking...

How to gracefully exit SLIME and EMACS

Hi All, I have a question regarding how to "gracefully exit SLIME", when I quit Emacs. Here is the relevant portion of my config file: ;; SLIME configuration (setq inferior-lisp-program "/usr/local/bin/sbcl") (add-to-list 'load-path "~/Scripts/slime/") (require 'slime) (slime-setup) ;; configure SLIME to gracefully quit when emacs ;;...

Changing font-lock color in SMerge mode

In Emacs 23.1 I'm opening up a file with conflict markers from a svn merge and consequently it opens it up in SMerge mode. The conflicted text is highlighted in bright yellow. From what I could find this is whatever the font-lock color is set to, correct? I'd like to change the highlight color in SMerge mode. What would I need to a...

Setting tab size in Emacs

I'm using Emacs as an editor. I want to set the tab size to four spaces. In my .emacs file I have the following: (setq default-tab-width 4) I've also tried: (set-default tab-width 4) Either way, when I open emacs and try to tab, it inserts two spaces. Am I doing something wrong? It almost seems like its not seeing my .emacs fil...

make emacs in a terminal use dark colors and not light font-lock colors

I am using emacs on MacOS 10.6 with Terminal. I have a white background. It's very hard to read quoted C++ strings. They are coming up in pale green. Keywords are in turquoise. After searching through the source I cam across cpp.el and have determined that I am using the cpp-face-light-name-list instead of cpp-face-dark-name-list. Ap...

Restore Emacs Session/Desktop

I've been searching for how to restore an emacs session, with no luck. I'm looking to restore all previously open buffers, some of which might contain erc, shells, directory listings, files, etc. Every time I open emacs, I spend a considerable amount of time arranging my buffers; splitting them into rows and columns, opening a shell, a...

What is a simple way to combine two Emacs major modes, or to change an existing mode?

In Emacs, I'm working with a file that is a hybrid of two languages. Question 1: Is there a simple way to write a major mode file that combines two major modes? Details: The language is called "brew" (not the "BREW" of "Binary Runtime Environment for Wireless"). brew is made up of the languages R and Latex, whose modes are R-mode and...

In Lisp, Avoid "Cannot open load file" when using require

I am working on a custom .emacs file that I will be able to use on several different computers. I would like to be able to load a mode if it exists on the system. If it does not exist I would like Emacs to stop showing the error: File error: Cannot open load file, X. For example: (require 'darkroom-mode) Results in: File error: Cann...