\version "2.19.80"
\language "english"
\paper {
ragged-right = ##t
}
%Tied accidentals have the same placement as the untied ones,
%even though that with ties there should be less grobs occupying space
\score {
\relative c'' {
<cs gs>1 <es cs gs cs,> \break
<cs gs>~ <es cs gs cs,> \break
<es cs>~ <es cs gs cs,> \break
<cs cs,>~ <es cs gs cs,> \break
}
}
%Checking that there are accidental grobs for each notehead
\score {
\relative c'' {
<cs cs,>~
\override Accidental.before-line-breaking =
#(lambda (grob)
(pretty-print grob))
<es cs gs cs,>
%Output:
%#<Grob Accidental >
%#<Grob Accidental >
%#<Grob Accidental >
%#<Grob Accidental >
%Showing there are 4 accidental grobs instead of only the required 2
}
}
%Deleting the tied accidentals "fixes" placement, shouldn't this be default?
\score {
\relative c'' {
<cs cs,>~
\override NoteColumn.before-line-breaking =
#(lambda (nc)
(let* ((nhds (ly:grob-array->list (ly:grob-object nc 'note-heads)))
(accs
(filter ly:grob?
(map
(lambda (nhd)
(ly:grob-object nhd 'accidental-grob))
nhds)))
(stils
(list
ly:accidental-interface::print
#f
ly:accidental-interface::print
#f)))
(for-each
(lambda (acc stil)
(ly:grob-set-property! acc 'stencil stil))
accs
stils)))
<es cs gs cs,>
}
}