Re: Updating alists

2021-12-30 Thread David Kastrup
Jean Abou Samra writes: > Le 30/12/2021 à 23:04, Lukas-Fabian Moser a écrit : >> Hi Jean, >> >>> >>> Both of these cases seem to work the same as in >>> current versions if I do >>> >>> [...] >>> >>>  SCM >>>  assq_tail (SCM key, SCM alist, SCM based_on = SCM_EOL) >>>  { >>> -  for (SCM p = alist

Re: Updating alists

2021-12-30 Thread David Kastrup
Lukas-Fabian Moser writes: > Hi Jean, > >> >> Both of these cases seem to work the same as in >> current versions if I do >> >> [...] >> >>  SCM >>  assq_tail (SCM key, SCM alist, SCM based_on = SCM_EOL) >>  { >> -  for (SCM p = alist; !scm_is_eq (p, based_on); p = scm_cdr (p)) >> +  for (SCM p =

Re: Updating alists (was: Tenuto marking too close to note)

2021-12-30 Thread Jean Abou Samra
Le 30/12/2021 à 23:04, Lukas-Fabian Moser a écrit : Hi Jean, Both of these cases seem to work the same as in current versions if I do [...]  SCM  assq_tail (SCM key, SCM alist, SCM based_on = SCM_EOL)  { -  for (SCM p = alist; !scm_is_eq (p, based_on); p = scm_cdr (p)) +  for (SCM p = alist;

Re: Updating alists (was: Tenuto marking too close to note)

2021-12-30 Thread Lukas-Fabian Moser
Hi Jean, Both of these cases seem to work the same as in current versions if I do [...]  SCM  assq_tail (SCM key, SCM alist, SCM based_on = SCM_EOL)  { -  for (SCM p = alist; !scm_is_eq (p, based_on); p = scm_cdr (p)) +  for (SCM p = alist; scm_is_pair (p) && scm_is_pair (scm_car (p)) && !sc

Re: Updating alists

2021-12-30 Thread Jean Abou Samra
Le 30/12/2021 à 22:30, David Kastrup a écrit : An empty list does not have a last cdr. Of course. Thanks.

Re: Updating alists

2021-12-30 Thread David Kastrup
Jean Abou Samra writes: > Le 30/12/2021 à 12:36, Lukas-Fabian Moser a écrit : >> It's much worse than that: It's not the first time _I've_ been >> tripped up by this (previously it was with sort!). I'll just have to >> write 100 copies of >> >> "The exclamation mark in something! does not mean th

Re: Updating alists (was: Tenuto marking too close to note)

2021-12-30 Thread Jean Abou Samra
Le 30/12/2021 à 12:36, Lukas-Fabian Moser a écrit : It's much worse than that: It's not the first time _I've_ been tripped up by this (previously it was with sort!). I'll just have to write 100 copies of "The exclamation mark in something! does not mean the function is guaranteed to make the

Re: Updating alists

2021-12-30 Thread Lukas-Fabian Moser
\version "2.23.6" myScripts = \default-script-alist myScripts.tenuto.padding = 5 \layout {   \context {     \Score     scriptDefinitions = #myScripts   } } {   a-- } (One might also skip defining a new variable and instead change default-script-alist directly, but it has to be re-read

Re: Updating alists

2021-12-30 Thread David Kastrup
David Kastrup writes: > For stuff like > > > midiDrumPitches.ridecymbal = fis,, > midiDrumPitches.ridecymbala = b > midiDrumPitches.ridecymbalb = a > midiDrumPitches.crashcymbal = g > > > \midi > { > \context { > \Score > drumPitchTable = #(alist->hash-table midiDrumPitches) > } > } >

Re: Updating alists

2021-12-30 Thread David Kastrup
Lukas-Fabian Moser writes: > Another question: With the (hopefully) upcoming changes in the > script-alist structure (using symbols instead of strings as keys), > we're quite close to being able to simply do > > \version "2.23.6" > > myScripts = \default-script-alist > myScripts.tenuto.padding =

Updating alists (was: Tenuto marking too close to note)

2021-12-30 Thread Lukas-Fabian Moser
Hi Jean, (CCing devel because of the stuff below the asterisks) Although this approach manipulates internal data structures of LilyPond, it has the advantage of dealing with your issue at the root and not causing side effects for other scripts. Unfortunately, this approach does not work direct