lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: etags regex for Lilypond & LY_DEFINE* tags


From: John Wheeler
Subject: Re: etags regex for Lilypond & LY_DEFINE* tags
Date: Mon, 2 May 2022 21:10:27 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

Jean,

On 4/28/22 16:14, Jean Abou Samra wrote:
Hi John,

Le 24/04/2022 à 21:10, John Wheeler a écrit :
To facilitate using emacs xref in lilypond work, I wrote a script to assemble the needed TAGS file.  The unique feature of the script is that it includes the regex to find tags in Lilypond (.ly) files as well as tags defined in LY_DEFINE*  macros, in addition to the normal c++, python, lisp, scheme, yacc, and Makefile  tags.

Is there any interest in including such a script in the Lilypond source tree,  perhaps in a new scripts/emacs directory?



scripts/auxiliar/ is well-suited to that sort of thing, but there
hasn't been agreement on including helpers like that in the sources
(with the maintenance promise it entails). Is it a large script?
If so, it needs some consideration. If not, can it fit in an @example
somewhere in the CG? That might also make it more visible.

It is a shell script, a python script to mangle c++ identifiers, and two
files containing regex patterns for the etags program.  Too large to put
into an example, I think.

By 'needs some consideration' are you suggesting I might just submit
a merge request and ask for discussion?  I have it ready to go, if that is
what you meant.

BTW, I do understand the issue of having to maintain the script. I
had to add the code to mangle C++ identifiers after your
merge request obviating the second argument to LY_DEFINE ...  :-)

I'm using Emacs, but prefer 'git grep' for this task (or just opening
the right source file directly: ly:something-do-whatever is usually
in lily/something-scheme.cc, ly:something-interface::calc-foo in
lily/something-interface.cc, etc.). Is there anyone out there who
would use this?
As a LilyPond newbie, and without the experience to intuitively
know where to look for a function, I found using the emacs xref
commands very appealing.  So much so that it was worth putting
together this script.  So, the primary target user is just starting
to program LilyPond and uses Emacs.

But, given that the script allows jumping to definitions both written
in and imported into LilyPond with just a two character key chord,
I would think anyone using Emacs for programming would use it.

Your thoughts are most appreciated.

Thank you,

John




reply via email to

[Prev in Thread] Current Thread [Next in Thread]