prompt you for a shell command to run and replaces region with
the results. This is handy for doing things like getting
external program locations in scripts and running grep and
(if (equal mark-active nil)
+(defun jj/start-or-switch(func buffer-name)
+ "Call func if there is no buffer with buffer-name, or switch to buffer-name.
+ Don't clobber current buffer."
+ (if (not (get-buffer buffer-name))
+ (split-window-sensibly (selected-window))
+ (switch-to-buffer-other-window buffer-name)))
;; indenting utility functions taken from http://bit.ly/WWwD11
"Indent the currently visited buffer."