[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: renumbering numeric comments
From: |
Pascal J. Bourguignon |
Subject: |
Re: renumbering numeric comments |
Date: |
Tue, 28 Oct 2014 09:12:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Steven Arntson <steven@stevenarntson.com> writes:
> Greetings! I'm very curious what more knowledgeable souls would do in
> the following situation. I'm writing music using emacs' lilypond
> mode. In Lilypond, measure numbers are usually (so far in my experience)
> entered as comments at the end of a line in the form `%m__':
>
> \tempo 4=100
> e4 d e8 f | %m1
> \tempo 4=130
> <c a>2. | %m2
> <d e,>2 ~ <d e,>8 e | %m3
> ...
>
> These "%m_" numbers are very useful in debugging when the "code" is
> compiled. However, in the above case I later inserted two new measures:
>
> \tempo 4=100
> e4 d e8 f | %m1
> \tempo 4=130
> -----> g8 f e d e f |
> -----> e d c b c d |
> <c a>2. | %m2
> <d e,>2 ~ <d e,>8 e | %m3
> ...
>
> Renumbering everything by hand is a lot of work, because the piece is
> many measures long. I have limited technical expertise, but would love
> ideas about better methods than "by hand!" Thank you!
Write yourself a numbering/renumbering command.
For an example, have a look at:
https://gitorious.org/nasium-lse/nasium-lse/source/028c064543abf8ad4043897d8b9029beab18db15:lse-mode.el#L321
In your case, it is even easier, because you don't have GOTOs.
--
__Pascal Bourguignon__ http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk