From: Duy Nguyen Date: Mon, 15 Apr 2013 09:54:44 GMT Subject: Re: [PATCH v2 09/12] pretty: add %C(auto) for auto-coloring on the next placeholder Message-ID: In-Reply-To: <7v8v4wdhpd.fsf@alter.siamese.dyndns.org> On Sat, Apr 6, 2013 at 4:13 AM, Junio C Hamano wrote: > If %C(auto) applies to some % but not to some others, > the user needs to learn which % will eat the "auto" (so > it no longer applies to the next one) and which one will not even > look at "auto" (so the next % is affected by the auto, > i.e. making the effect of auto skip a %). If the rule > were "%C(auto) applies to -next- placeholder", then the user does > not have to worry about which ones are what you call textual and > which ones are not (and there is no textual placeholder defined in > the glossary). > > That would make it harder to learn. It would be much easier to > explain if you said "%C(auto) affects the next %-placeholder and > then resets". So far (after this series, that is), we have two modifiers: %C(auto) and %< (and friends). Both can be used to modify the "next" placeholder, so either of them must learn to ignore the next non-textual placeholder... > I wonder if "Everything after %C(auto) will not be coloured if the > output is not going to the terminal.", i.e. not resetting once > colouring decision is made, makes more sense, though... .. or we do this, which makes %< and friends the only placeholders that care about the next one. Thanks for the idea. -- Duy