From: "Pascal J. Bourguignon" <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: renumbering numeric comments
Date: Tue, 28 Oct 2014 09:12:51 +0100 [thread overview]
Message-ID: <87ppdc629o.fsf@kuiper.lan.informatimago.com> (raw)
In-Reply-To: mailman.12210.1414461603.1147.help-gnu-emacs@gnu.org
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
next parent reply other threads:[~2014-10-28 8:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.12210.1414461603.1147.help-gnu-emacs@gnu.org>
2014-10-28 8:12 ` Pascal J. Bourguignon [this message]
2014-10-28 17:13 ` renumbering numeric comments Steven Arntson
2014-10-28 1:59 Steven Arntson
2014-10-28 3:53 ` Yuri Khan
2014-10-28 17:11 ` Steven Arntson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppdc629o.fsf@kuiper.lan.informatimago.com \
--to=pjb@informatimago.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).