Re: Define an alias to a parametrized command

2023-06-28 Thread David Kastrup
Simon Albrecht writes: > On 28.06.23 00:54, Valentin Petzel wrote: >> If you want a real alias (that is a second binding to the same function) you >> can do >> >> #(define acc acciaccatura) >> >> This will create another binding to the same object > AFAIK, > acc = #acciaccatura > and likewise >

Re: Define an alias to a parametrized command

2023-06-28 Thread Simon Albrecht
On 28.06.23 00:54, Valentin Petzel wrote: If you want a real alias (that is a second binding to the same function) you can do #(define acc acciaccatura) This will create another binding to the same object AFAIK, acc = #acciaccatura and likewise af = #after will have the same effect. Best,

Re: Define an alias to a parametrized command

2023-06-28 Thread Volodymyr Prokopyuk
Thank you Valetin, David, and Leo for your support! I really appreciate it! Summary of the proposed options - af = \after \etc simple, yet effective solution within the Lilypond syntax, that is less efficient as it creates a wrapper - #(define af \after) simple, yet efficient solution

Re: Define an alias to a parametrized command

2023-06-27 Thread Valentin Petzel
Hello Vlad, Also checkout this thread: https://lists.gnu.org/archive/html/lilypond-user/2023-02/msg00035.html If you want a real alias (that is a second binding to the same function) you can do #(define acc acciaccatura) This will create another binding to the same object, which means you do

Re: Define an alias to a parametrized command

2023-06-27 Thread David Kastrup
Leo Correia de Verdier writes: >> 27 juni 2023 kl. 21:57 skrev Volodymyr Prokopyuk >> : >> >> I'd like to define a shorter alias to a parametrized command. My two >> specific use cases are >> • Define \acc { c='8 d e } to be translated into \acciaccatura >> { c='8 d e } >> • Define

Re: Define an alias to a parametrized command

2023-06-27 Thread Volodymyr Prokopyuk
Hi Leo, The \etc is exactly what I was looking for! Thank you so much, Vlad On Tue, Jun 27, 2023 at 10:32 PM Leo Correia de Verdier < leo.correia.de.verd...@gmail.com> wrote: > Hi Volodymyr! > > You can write: > % > acc = \acciaccatura \etc > af = \after \etc > % > >

Re: Define an alias to a parametrized command

2023-06-27 Thread Leo Correia de Verdier
Hi Volodymyr! You can write: % acc = \acciaccatura \etc af = \after \etc % \set in lilypond is something completely else. HTH /Leo > 27 juni 2023 kl. 21:57 skrev Volodymyr Prokopyuk > : > > Hello, > > I'd like to define a shorter alias to a parametrized command. My

Define an alias to a parametrized command

2023-06-27 Thread Volodymyr Prokopyuk
Hello, I'd like to define a shorter alias to a parametrized command. My two specific use cases are - Define \acc { c='8 d e } to be translated into \acciaccatura { c='8 d e } - Define \af 4. to be translated into \after 4.\! I've tried the \set command, but it seems that the \set