Re: How to delete a created Glissando without impact on line break?
Thomas Morley <[email protected]> Sun, 28 Jun 2026 20:59:26 +0200
| Newsgroups | gmane.comp.gnu.lilypond.devel |
|---|---|
| Message-ID | <CABsfGyX7by4k2+TLyZYnWExmo+cqKtkEE8g+xGYe=7DuHAyG-A@mail.gmail.com> |
Am So., 28. Juni 2026 um 19:28 Uhr schrieb Dan Eble <[email protected]>: > > On 2026-06-28 08:33, Thomas Morley wrote: > > > > To fix #6946 it would be sufficient to create only those Glissando > > grobs really needed, then there would be no need to delete some of > > them afterwards. > > There seem to be some conditions for that purpose in the original > > cc-engraver, but I don't understand them sufficiently. > > Harm, > > Issue #6946 seems to be a recurrence of issue #1639, which was fixed in > b8dfb88ca356cdde12cccb4cf57ecc64397c137b. That change defers grob > suicide until other engravers have had the opportunity to acknowledge > the end of the spanner. > > Probably, the best response would be to update the Scheme implementation > of Glissando_engraver to defer grob suicide similarly. Since the issue > is a regression, the change would ideally be kept minimal so that it > could easily be back-ported to 2.26. For the initial codes-example of this thread that would probably mean: #(define-public My_glissando_engraver (lambda (context) (let ((glissando-event #f) (start-glissando-line #f) (stop-glissando-line #f) (to-kill '()) (gliss-grob #f)) (make-engraver (listeners ((glissando-event this-engraver event) (set! glissando-event event) (set! start-glissando-line #t))) (acknowledgers ((note-column-interface this-engraver grob source-engraver) (when stop-glissando-line (ly:engraver-announce-end-grob this-engraver gliss-grob (ly:context-property context 'currentMusicalColumn)) (set! to-kill (cons gliss-grob to-kill)) (set! stop-glissando-line #f) (set! gliss-grob #f)) (when start-glissando-line (set! gliss-grob (ly:engraver-make-grob this-engraver 'Glissando glissando-event)) (set! start-glissando-line #f) (set! glissando-event #f) (set! stop-glissando-line #t)))) ((stop-translation-timestep this-engraver) (for-each ly:grob-suicide! to-kill)) ;((finalize this-engraver) ; (for-each ly:grob-suicide! to-kill)) )))) Doing it in `stop-translation-timestep` seems to work, though Mike's fix for #1639 does it in `finalize`. Do you have an advice on it? Well, I could try it out by running regtests, but maybe you have some insight already. > Secondarily, it might be helpful to make Spanner_break_forbid_engraver > more robust in the presence of dead grobs. I'll investigate this part. That would be great. > -- > Dan > Many thanks, Harm