M-x all-things-emacs

Entries Tagged as 'elisp'

Quick Tip: Detaching the custom-file

December 6th, 2008 by Ryan McGeary · 5 Comments

I’ve never really liked the built-in customization UI in Emacs (M-x customize). I’m sure plenty of people use it and enjoy it, but, to me, it feels like an abominable tree of never ending and difficult to navigate options. Plus, it sticks your saved customizations as an unorganized mess of elisp smack at the bottom […]

[Read more →]

Tags:elisp · quick · tips

Emacs Starter Kit

December 5th, 2008 by Ryan McGeary · 20 Comments

Phil Hagelberg recently started a new project called Emacs Starter Kit. Here’s how Phil describes it: It’s … a set of dotfiles extracted from my years of obsessive Emacs tweaking. It acts as a base config from which new users can get going with minimal fuss. You won’t learn Emacs from it, but it will […]

[Read more →]

Tags:elisp · newbie · news · quick · tips

Tab Completion Everywhere

March 12th, 2007 by Ryan McGeary · 13 Comments

I am addicted to tab completion in the minibuffer and in shells like bash — so much so that I want it everywhere. By default, emacs comes with dabbrev-expand (bound to M-/). When invoked after typing the first few letters of a word, dabbrev-expand first searches the current buffer and then other open buffers for […]

[Read more →]

Tags:elisp · tips

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

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

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

Maximize on Startup, Part 1

January 29th, 2007 by Ryan McGeary · 12 Comments

This is part one of a two-part series. Here we’ll discuss some straight forward options for maximizing and resizing the emacs window on startup. In part two, we’ll explore a more advanced alternative. I like to maximize my emacs window (aka frame) to fit the entire screen when I really want to focus on what […]

[Read more →]

Tags:elisp · osx · tips · windows · x

Indent Whole Buffer

January 17th, 2007 by Rob Christie · 10 Comments

I use this function almost daily. Why? Well, it’s because too many developers use editors that muck the alignment of the source. 1 2 3 4 5 6 (defun iwb () "indent whole buffer" (interactive) (delete-trailing-whitespace) (indent-region (point-min) (point-max) nil) (untabify (point-min) (point-max))) Open a file, M-x iwb, save, commit, and edit happily. I can’t […]

[Read more →]

Tags:elisp · tips