Emacs
Tips and Tricks
by Lang
I just use this to keep a stack of things I've learned recently about emacs. I've only been using it for 8 years, so this happens all the time.
- VC Annotate
-
C-x v gfor line-by-line history. - URL Encoding
-
org-link-unescapeandorg-link-escape. - eshell pipe to buffer
-
diff > #<buffer *scratch*> - iBuffer multi-occur
-
Ooperates on tagged files.Ifor replace. - GNUS Gmail Search
-
G Gin the Group buffer. See Gnus Gmail on Emacswiki for more detail. - GNUS Gmail Keeping in Sync
- Catching Up on that same page.
Utilities
SRFI-1 List Utilities
SRFI-2 and-let*
by Lang.
An emacs-lisp implementation of SRFI-2, srfi-2.el. and-let* is a
combination of and and let, which (optionally) binds the result
of each form in the let block. It stops on the first false result,
and executes the body only if all the forms are true.
(and-let* ((val (member 'foo '(a b c foo d e)))
((listp val))
(val (car val)))
val)
If foo was not found in the list, the form would return false
rather than raising an error.
Hacked Packages
html-script.el
by Lang.
My version of html-script.el. This code is originally from http://www.dur.ac.uk/p.j.heslin/Software/Emacs/, and is a simplified alternative to the various multi-modes.
Using the region definitions (each a list of starting regexp,
ending regexp, and mode symbols) the keystroke (by default F12)
will narrow to the region and invoke the first bound function.
F12 a second time will widen the buffer and return to HTML mode.
I hacked up the code a bit to exclude the text matched by the
starting and ending expressions. js2-mode flags any invalid
syntax, and the script tags are certainly that. This seems like a
workable solution for mixed javascript, at least until js2-mode
can play nicely with multi-modes.
Date: 2010-06-11 11:41:45
HTML generated by org-mode 6.33x in emacs 23