[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is the point of \on-the-fly ?
From: |
David Kastrup |
Subject: |
Re: What is the point of \on-the-fly ? |
Date: |
Tue, 13 Jun 2017 17:16:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Paul <address@hidden> writes:
> On 06/12/2017 01:00 AM, David Kastrup wrote:
>
>> The use case is similar to that of lambda: creating a procedure on the
>> fly without giving it a name.
>
> Ah, got it. Then makes sense to avoid having to use on-the-fly, by
> converting those named on-the-fly procedures into actual markup
> commands.
>
> Just thinking out loud, but if define-markup-command worked like
> define-music-function and friends (i.e. like lambda) so that they
> returned a procedure, like this:
>
> command-name = #(define-markup-command (layout props args...) ...
>
> (define command-name (define-markup-command (layout props args...) ...
>
> Rather than the current form:
>
> (define-markup-command (command-name layout props args...) ...
>
> Would that remove the need for on-the-fly or am I missing something?
> I'm sure that would not be a trivial change -- again just thinking out
> loud.
(define-markup-command bla)
does not define bla, but rather bla-markup, make-bla-markup and bits and
pieces used for signatures and the markup macro.
Even then, creating music functions on the fly _and_ using them requires
use of $(define-music-function ...) since #(define-music-function ...)
does not call the generated music function (would be hard assigning a
music function if it got called right away...).
I actually just proposed an issue where you _can_ call markup functions
on the fly when defined properly. But the process of assigning a markup
command with all that it entails cannot be done in the same manner.
Since we can generate markup commands "on the fly" with \markup
... \etc, assigning them in a manner corresponding to
define-markup-command might be nice.
I suggested
\markup bla = ...
for it without being all too clear about whether this implied \markup
mode, allowing for
\markup bla = \bold \large \etc
rather than
\markup bla = \markup \bold \large \etc
There were no real comments (and I am fuzzy on the details of the
ensuing non-discussion as far as I remember it) so this proposal petered
out.
--
David Kastrup