Entries from February 2007
February 27th, 2007 by Ryan McGeary · 9 Comments
Zenspider gives us an excellent tip for extending incremental search. Add this to your emacs initialization:
1
2
3
4
5
6
(define-key isearch-mode-map (kbd "C-o")
(lambda ()
(interactive)
(let ((case-fold-search isearch-case-fold-search))
(occur (if isearch-regexp isearch-string
[...]
[Read more →]
Tags:elisp · isearch · quick · tips
February 25th, 2007 by Ryan McGeary · 1 Comment
By default, dired creates new buffers when visiting new directories. Sometimes this is desired, especially when you need to visualize the contents of two separate directories; however, when you’re just navigating around, all the extra buffers tend to clutter your buffer list.
Typical navigation is done with dired-find-file (bound to f, RET, or [...]
[Read more →]
Tags:dired · quick · tips
February 22nd, 2007 by Ryan McGeary · 31 Comments
In part 1 of the series, we discussed two ways to resize the emacs frame on startup. Here, we will use the display-pixel-width and display-pixel-height functions to automatically determine the proper size of the emacs frame.
Option 3 (the package)
As I tried to come up with a generic way to maximize the emacs frame on [...]
[Read more →]
Tags:elisp · osx · tips · windows · x
February 20th, 2007 by Ryan McGeary · 5 Comments
Setting a mark (C-SPC) is probably the most frequent command I use besides basic navigation. The mark not only acts as a saved jump-to point, but it also sets the region. A region is what other editors might call a selection. By default, emacs does not highlight the active region, so it [...]
[Read more →]
Tags:newbie · quick · tips
February 18th, 2007 by Ryan McGeary · 4 Comments
Macosxhints.com points us to a way to enable emacs key bindings in Microsoft Word. Just assign new shortcut keys to each of these Word commands (instructions below):
StartOfLine : C-a
EndOfLine : C-e
LineUp : C-p
LineDown : C-n
CharLeft : C-b
CharRight : C-f
Please [...]
[Read more →]
Tags:misc · osx · windows
February 13th, 2007 by Rob Christie · 3 Comments
This post describes how to integrate jdee, ant, and the eclipse batch compiler to get the same warning and error messages as your Eclipse-loving friends. I am assuming that you already know your way around the jdee environment (i.e., you have it setup and configured such that you can run an ant build from within [...]
[Read more →]
Tags:java · tips
February 10th, 2007 by Rob Christie · 3 Comments
Many times I use global key mappings for commands that I use every day. For example, I build java projects daily using ant, so I have the following in my .emacs:
(global-set-key [f5] ‘jde-build)
Less frequently, I use the C-c C-v C-. which is the default key binding for the command jde-complete. Both commands are in [...]
[Read more →]
Tags:elisp · java · quick · ruby · tips
February 8th, 2007 by Ryan McGeary · 3 Comments
By default, dired only deletes empty directories. You know the drill. Put your point on the directory, D, y (yes), “file-error Removing directory directory not empty,” (slam fist on table). Doh!
Fortunately, dired supports deleting directories recursively. Add this to your .emacs:
(setq dired-recursive-deletes ‘top)
The dired-recursive-deletes variable decides whether recursive deletes are allowed. [...]
[Read more →]
Tags:dired · quick · tips
February 6th, 2007 by Ryan McGeary · 3 Comments
This one is personal preference, but I find it annoying when emacs beeps on errors. I like knowing when something bad/unexpected happened, but the beep is too much when the sound is on and useless when muted. Add this to your .emacs to enable a visual alert cue that flashes the frame instead:
(setq [...]
[Read more →]
Tags:quick · tips
February 3rd, 2007 by Ryan McGeary · 3 Comments
Part of the reason we started M-x all-things-emacs was to encourage newcomers to the emacs world. The emacs learning curve is a steep one, and sometimes it’s easy for the more advanced members of the contingent to take some of the basics for granted. This is the first of a series of [...]
[Read more →]
Tags:newbie · tips