M-x all-things-emacs

Entries from February 2007

Quick Tip: Add occur to isearch

February 27th, 2007 by Ryan McGeary · 10 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 (regexp-quote isearch-string)))))) This adds an extra keybinding to interactive search (C-s) that runs occur on the current search string/regexp, […]

[Read more →]

Tags:elisp · isearch · quick · tips

Quick Tip: Reuse Dired Buffers

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 e) or […]

[Read more →]

Tags:dired · quick · tips

Maximize on Startup, Part 2

February 22nd, 2007 by Ryan McGeary · 59 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 […]

[Read more →]

Tags:elisp · osx · tips · windows · x

Newbie Tip: transient-mark-mode

February 20th, 2007 by Ryan McGeary · 8 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 requires a bit […]

[Read more →]

Tags:newbie · quick · tips

Emacs Key Bindings in MS Word

February 18th, 2007 by Ryan McGeary · 7 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 feel free to suggest other emacs equivalent Word commands […]

[Read more →]

Tags:misc · osx · windows

Emacs, JDEE, Ant, and the Eclipse Java Compiler

February 13th, 2007 by Rob Christie · 6 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

Quick Tip: Defining Mode Specific Key Bindings

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 […]

[Read more →]

Tags:elisp · java · quick · ruby · tips

Quick Tip: dired-recursive-deletes

February 8th, 2007 by Ryan McGeary · 7 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. This […]

[Read more →]

Tags:dired · quick · tips

Quick Tip: visible-bell

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 visible-bell […]

[Read more →]

Tags:quick · tips

Newbie Tip: y-or-n-p and Function Aliases

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 newbie tips where […]

[Read more →]

Tags:newbie · tips