[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
right-hand fingering emacs function
From: |
Arjan Bos |
Subject: |
right-hand fingering emacs function |
Date: |
Sat, 8 Mar 2008 20:45:14 +0100 |
Hi list,
For all those users of the One True Editor ;-) that use right-hand
fingering in their guitar notation, I've written a small bit of elisp
that saves me a lot of typing. Just select the region it should work
on and use M-x lilypond-right-hand-fingering.
(defun lilypond-right-hand-fingering (beg end)
"Lilypond function to update notes to include fingering
It supposes that you've included #(define RH rightHandFinger) to
make RH as a shorthand for rightHandFinger.
This function inserts always the value #3 which can then easily
be changed manually to the correct one."
(interactive "*r")
(when (> beg end)
(let (mid)
(setq mid beg
beg end
end mid)))
(replace-regexp "\\([a-g]\\(is\\|es\\)?[',]?\\)" "<\\1-\\\\RH #3 >"
nil beg end))
I know that it is bad form to use (replace-regexp) but I'm to lazy to
do anything about it. Let the computer waste those cycles, not me :-)
Regards,
A.J.
---
Give anyone a lever long enough and they can change the world. It's
unreliable levers that are the problem.
-- (Terry Pratchett, Small Gods)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- right-hand fingering emacs function,
Arjan Bos <=