Re: [PATCH] Add `origin-variable` property to music objects assigned to variables
David Kastrup <[email protected]> Sun, 28 Jun 2026 15:58:08 +0200
| Newsgroups | gmane.comp.gnu.lilypond.devel |
|---|---|
| Organization | Organization?!? |
| Message-ID | <[email protected]> |
That patch is a really, really, really bad idea since you put your property on the _original_ expression that may see other uses. If you wanted to do this responsibly, you'd have to create a copy on assignment (defeating the savings from LilyPond's copy-on-use contract) or put your property on when _referencing_ a variable. You can see how this is done by looking at what happens with the 'origin data field when referencing a variable. That is when a copy is initiated anyway, and you could tamper with that copy. I am not sure that is really necessary: you could probably in your analysis evaluate whether 'origin refers to an input location only referencing a variable. -- David Kastrup