From: Will Palmer <wmpalmer@gmail.com>
To: git@vger.kernel.org
Subject: Re: [RFD] Expanded Pretty Format Placeholders Proposal
Date: Thu, 17 Mar 2011 20:57:34 +0000 [thread overview]
Message-ID: <1300395454.2004.9.camel@walleee> (raw)
In-Reply-To: <1299804441.6220.1.camel@walleee>
On Fri, 2011-03-11 at 00:47 +0000, Will Palmer wrote:
..snip
> For my own purposes (conditional formats), I'd like to see the ability
> to embed an entire sub-format within a placeholder. Clearly this would
> complicate the parser quite a bit (we wouldn't be able to just look for
> a closing ")", for example), but I think the flexibility makes it work
> it. To achieve this in terms of a specification to shoot for, we can
> simply say that any embedded "%(" must be terminated by its own ")" to
> be valid. eg:
> %(foo-condition: %(format: %H, aka %h), %H )
of course, this conflicts with the need to embed a literal ")" within a
sub-format. The simplest option for this would be to either allow %) as
an escape, as with %%. Even simpler, of course, would be %x29, but this
seems needlessly obscure. The only objection I have to %) is "It's
ugly". To me, %(format: "this is a paren: )") is easier to read, but
that would just be moving the problem around, adding the necessity of
the just-as-ugly-or-moreso %", or alternatively C-style \" and \\.
So I think that %) will be the best option.
>
> -- Will
>
next prev parent reply other threads:[~2011-03-17 20:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 0:47 [RFD] Expanded Pretty Format Placeholders Proposal Will Palmer
2011-03-17 20:57 ` Will Palmer [this message]
2011-03-17 21:35 ` Junio C Hamano
2011-03-17 22:00 ` Will Palmer
2011-03-18 7:18 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300395454.2004.9.camel@walleee \
--to=wmpalmer@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).