lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

possibility of merging \override and \set (was: Naming _another_ lacking


From: Janek Warchoł
Subject: possibility of merging \override and \set (was: Naming _another_ lacking puzzle piece)
Date: Sun, 14 Oct 2012 17:46:26 +0200

Hi,

On Sun, Oct 14, 2012 at 4:28 PM, Carl Sorensen <address@hidden> wrote:
> Two years ago, David and I had a discussion about the existence of /tweak,
> /set, and /override.
>
> <http://lists.gnu.org/archive/html/lilypond-devel/2010-06/msg00054.html>
>
> Perhaps now David has put together enough infrastructure that it is time
> to abandon the previous interface and replace it with one that will be
> more consistent to the user.
>
> Would it be possible to move to something like the following?
>
> /set modifies a property in such a way that no history is kept.
> /unset (or /reset) returns a property to its default value.
>
> /override modifies a property in such a way that a history of the change
> is stored.
> /revert undoes the most recent /override of the specified property.
> [...]

I'm very excited about your suggestion, Carl!

However, i think it may be better to discuss these things /somewhat/ separately:
1) merging \set and \override is one thing,
2) dealing with the stack is another thing,
3) naming the resulting commands is yet another thing.

If (1) is possible, i'm all for it!

Here's some Positive Feedback for David [1]: watching your work for
last year i was more and more amazed at how things get simpler and
simpler, and i thought "if we ever merge \override and \set, that
would surely be able thanks to David's work!"

[1] he recently said that he would feel better and work better with
more positive feedback.

As for (2), i see that there are three operations that can be
performed on stack: push, pop and clear.  As i see it, our current
problem with override is that sometimes we want it to operate "flatly"
(i.e. so that it reverts to the default value), and sometimes we want
a true stack (i.e. to be able to revert to previous value).  We want
to have both possible while keeping the interface as simple as
possible from a user perspective.

Having three commands: \push, \pop and \clear (probably with
different, "user-friendly" names) would provide us with all
functionality we need (or am i mistaken?).  The problem is that using
push and pop might cause problems for users.
So, what about recommending users to use push and clear, while keeping
pop in "advanced toolbox"?
For example, we could have:
\override = push
\reset = clear
\something = pop
and tell users to use \override and \reset as the basic means of
changing properties.  \something would be described as "advanced,
meant for people who know what they're doing" or sth like that.
This way, "regular users" won't have problems with unexpected results
caused by using pop because they'd be using clear instead.

What do you think?
Janek



reply via email to

[Prev in Thread] Current Thread [Next in Thread]