emacs

How can I write a hook to activate when any emacs frame is raised/focused?

Under Win32, each emacs frame shows up as a different window when Alt-tabbing, which makes sense. However, when I select my main editing window, I'd also like my speedbar frame to auto-raise along with it. Writing a function to raise all frames (or even all currently NOT visible frames) is relatively trivial, but I can't figure out hoo...

How can I get emacs to keep my isearch strings highlighted?

How can I get emacs to highlight the phrase I'm searching for and then keep it highlighted until I search for another phrase? Can it do this transparently i.e. just by searching, not having to run another command afterwards (like isearch-highlight-regexp) ? ...

Isolate an emacs frame

I normally open a new emacs frame when context switching to a different project. Unfortunately, find-file history is shared between frames. Is it possible to open a new frame which is 'blank', i.e. doesn't remember any of the state from any other frame? ...

How to prevent commands from stealing emacs windows?

Hi Everyone, I've been learning GNU Emacs on a Windows system for the last couple of months. One thing that really bugs me is having commands steal or close my windows. For example, when launching eshell it will occasionally put it another window rather than the current one. I also have an extension for VC for IBM's clearcase which also...

How to live with Emacs Lisp dynamic scoping?

I've learned Clojure previously and really like the language. I also love Emacs and have hacked some simple stuff with Emacs Lisp. There is one thing which prevents me mentally from doing anything more substantial with Elisp though. It's the concept of dynamic scoping. I'm just scared of it since it's so alien to me and smells like semi-...

Can I keep the same item for yanks in Emacs?

Something I do often in Emacs is to cut a bit of text, and then replace another bit with the cut text. So, say I've got the text I want to yank as the last item in my kill-ring. I yank it into the new place, then kill the text that was already there. But now the killed text is the latest item in the kill-ring. So next time I want to yank...

Different headline view with Mac/PC of emacs/orgmode?

I use the same org mode (7.01h) for PC and Mac. The thing is that for headline, the mac shows only the last * by changing all the pre *'s color to the same as the background, whereas the orgmode in PC shows all the *'s. I prefer Mac's way. What makes this difference? How can I show only the last * in the headline? ...

Coloring/indenting a script within script in Emacs

I often have shell scripts that call other scripting languages, like so: #!/bin/bash cat somefile|awk ' BEGIN { #This line is not auto-indented and is colored as a string constant. ... } { #Same with this line. ... }' echo "More Bash code here." ... Is there a way to make Emacs recognize the awk string as an awk program in...

How to make emacs Semantic use the TAG file generated by GTAGS

My emacs version is 23.2.1 Although I used the following to change the backend to use GTAGS. (require 'semantic/db-global) (semanticdb-enable-gnu-global-databases 'c-mode) (semanticdb-enable-gnu-global-databases 'c++-mode) I tried to generate a GTAGS file to be used as a backend of semantic. However, everytime when I open a C file, Seman...

what would be a good alternative to ncurses that will work under emacs shell?

I'm an avid Emacs user and love shell-mode that in my opinion brings the best of two worlds: Emacs buffers and terminal emulators. For me shell-mode's biggest down fall is that ncurses based applications wouldn't render correctly. Having the need to design & code a little monitoring app in C that reads and write to standard input & out...

emacs remember all opened files with splitted windows and their positions...

Hello, I'm a little bit out of my mind already so sorry for my language.. I just wanna kill somebody for now, so ofcourse SO is great place to search for normal help. it took really a lot of time to get used to emacs. I like the way it handles everything with shortcuts, that's why VIM is banned for my soul. I just fill I'll give up soo...

how to make proper indentation in emacs?

I just want to select some text and press TAB to indent the selected entire region of selected text to be indented with 4 spaces. ...

How do I display the menu-bar in emacs every time I start up?

I put this in my .emacs file: (custom-set-variables '(gud-gdb-command-name "gdb --annotate=1") '(large-file-warning-threshold nil) '(menu-bar-mode t) '(shell-dirtrack-verbose nil)) (custom-set-faces ...

Emacs search and open multiple files and search on all buffers.

Hello Im not sure if this question should be placed here or in another forum. But here goes. Im currently in the beginning of a switching process forwards Emacs. However im having to basic problems, I cant seem to find an answer for on the internet (google). A. How do I search for multiple files recursively from a specific path. I assum...

emacs 23 on OS X: mailto links & calling compose-mail?

I'm trying the 23.2 release Cocoa Emacs build (OS X 10.6). There's a number of things that are more annoying about Cocoa Emacs than the terrific Carbon Emacs (based on an Emacs 22 build, I believe), so I hoped folks might have some solutions/thoughts (unfortunately posting on neither the carbon-emacs list nor emacs-dev has produced a use...

regexp-opt function missing in emacs?

I've started playing around with elisp to create font-locks (syntax highlighting) in Emacs. Most of the tutorials out there mention using an elisp function "regexp-opt" to optimize regular expressions, but my version of emacs (23.2) doesn't seem to have that function. Furthermore, Googling for the answer doesn't seem to turn up useful re...

How can can I get emacs to insert closing braces automatically

I've just started using emacs, and there's one feature I'd really like, and searching around a bit was fruitless. I hope someone else has done this because I don't want to learn elisp just yet. void foo()<cursor> I would like typing an "{" to cause this to happen void foo(){ <cursor> } I would like this to only happen in cc-mod...

How do I set the colour of brackets/braces/parentheses in Emacs?

I'd like to specify the colour of {}, () and [] in a custom colour theme. Is this possible? Update: Here's the source. Please note the in-development status of this theme; it is unsafe for use both at the workplace and around the home. ;;; Color theme based on Moria for VIM. (defun color-theme-moria () "A color theme based on Moria f...

Enabling flyspell mode on emacs/w32?

I need to install/run flyspell mode on emacs/w32. I installed ispell for windows from this site, and then I followed the procedure written in here. I downloaded the flyspell-1.7a.el to rename it as flyspell.el, and copied it to the load-path directory. I modified the .emacs ;;; http://www-sop.inria.fr/members/Manuel.Serrano/flyspel...

How to configure emacs drag and drop to open instead of append on osx

How to configure emacs 23.1.1 on osx so that file drag and drop on the emacs window opens the file in a new buffer instead of appending it to the current buffer? ...