Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1297)

Issue 6443087: Implement \hidden/\hide as a shorthands for \tweak/override #'\stencil = ##f (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by dak
Modified:
11 years, 7 months ago
Reviewers:
Graham Percival, Keith
CC:
lilypond-devel_gnu.org
Base URL:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Visibility:
Public.

Description

Implement \hidden/\hide as a shorthands for \tweak/override #'\stencil = ##f

Patch Set 1 #

Patch Set 2 : Fix backslash quoting. #

Patch Set 3 : Change to #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
M ly/music-functions-init.ly View 1 2 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 5
Graham Percival
I'm really not happy with \hide vs. \hidden depending on whether it's override or tweak. ...
11 years, 7 months ago (2012-09-12 23:20:46 UTC) #1
dak
On 2012/09/12 23:20:46, Graham Percival wrote: > I'm really not happy with \hide vs. \hidden ...
11 years, 7 months ago (2012-09-13 00:06:12 UTC) #2
Graham Percival
On Thu, Sep 13, 2012 at 12:06:12AM +0000, dak@gnu.org wrote: > How do we expect ...
11 years, 7 months ago (2012-09-13 01:29:35 UTC) #3
Keith
On 2012/09/13 00:06:12, dak wrote: > I copy your "not happy" sentiment, but when thinking ...
11 years, 7 months ago (2012-09-15 06:34:02 UTC) #4
dak
11 years, 7 months ago (2012-09-15 07:25:08 UTC) #5
On 2012/09/15 06:34:02, Keith wrote:
> On 2012/09/13 00:06:12, dak wrote:
> 
> > I copy your "not happy" sentiment, but when thinking this through, 
> > one really wants to have both override and tweak under a reasonably 
> > idiomatic shortcut available.  
> 
> After trying them out, the best names I can think of are:
> 
>  "hideOne" for the tweak; it should be a verb like "tweak" is a verb, and the
> article reminds us to say "one what", unless it directly follows.
> 
>  "hideAll" for the override, analogous to hideNotes, again with the article
> reminding us to say "all what" and clarifying that it affects all such grobs
> from this point forward.
> 
> (Maybe "one" and "all" are not considered to be articles in English ... but
they
> should be.)
> 
>  { g4 g-\hideOne\ff->\trill a \hideOne Stem a 
>    c \hideAll Stem c  d d  }
> 
> As you say, one can say \once\hideAll, and it has pretty much the same effect
as
> \hideOne, which is nicely unsurprising.
> 
> I suggest you put them in, announce as a tentative new feature in
changes.tely,

Nice try, but I won't sneak last-minute changes past the discussion.  Since
there are potentially more cases like this and it does not make sense to do them
inconsistently, we better take the time and leisure to think this through to the
degree we can and reach at least some sort of semi-agreement.

"\tweak" and "\override" are reasonably mnemonic, since "\tweak" changes an
actual object, and "\override" overrides a decision.  I am not exactly
enthusiastic about camel-caps (and I would not want to suggest using underlines
or dashes instead since that would open a much larger "consistency" can of
worms).  Here is one possible way out: only provide the override, ever.  That's
what basically all our preprovided property-setting commands do.  And if we
provide only one basic variant and that is the tweak, we have to remember that a
tweak takes an argument to tweak and you would have to \default that argument
(we actually use that technique for \footnote), something which is a bit
cumbersome to do explicitly every time.

We can already apply \once to more complex property-setting commands.  How about
using a different prefix, like \one or \single, that will take an override and a
music argument and will convert that override into a tweak on the music
argument?

It won't work entirely seamlessly as there is no obvious way (to me) to convert
a \revert into a \tweak without actually performing the revert and looking at
its effects (and I don't think we can easily undo the revert afterwards), so
this will just be able to work on \override and nothing else, but it would open
most of the world of property changes to usage as a tweak.

It would mean having to write more in the input, but it would save us from
inventing camelcase constructs and clever word pairs.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b