From: Junio C Hamano <gitster@pobox.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: Thomas Rast <trast@inf.ethz.ch>,
Eric Sunshine <sunshine@sunshineco.com>,
Git List <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] blame: accept multiple -L ranges
Date: Tue, 09 Jul 2013 13:25:14 -0700 [thread overview]
Message-ID: <7vli5fv5ud.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <51DC6B37.9030108@alum.mit.edu> (Michael Haggerty's message of "Tue, 09 Jul 2013 21:57:43 +0200")
Michael Haggerty <mhagger@alum.mit.edu> writes:
> It would be more general to support "follow the second match to /A/"
> *independent* of whether the first match is also followed. I think your
> proposal only allows the second to be followed if the first is also
> followed. Therefore it seems to me that your wish is to add a
> side-effect to one feature so that you can use it to obtain a simulacrum
> of a second feature, instead of building the second feature directly.
>
> Perhaps allow <start> and <end> to be a sequence of forms like
>
> /A//A/,+20
Remember "A" is just a placeholder and in real life it would be more
than one character. It is just as annoying as hell you have to type
it again.
I am not saying that a mode that resets the "start searching from
here" pointer to the beginning of the file is useless. For example,
I would not mind typing a special character, e.g.
-L <begin1>,<end1> -L !<begin2>,<end2>
that resets the search pointer to the beginning, for a rare case
where I want the search for <begin2> to restart at the top.
But the thing is, the default matters. And it is far more common,
at least to me, when I want to say "from here to there, and then
from here to there", to expect the second "from here" would be below
the first one I already specified, while I am looking at the current
state of a single file from top to bottom and notice two places I am
interested in.
> /A/+20,/B/
>
> Start 20 lines after the first match of /A/ until the subsequent
> match of /B/
Yes, I think -L "/^{/-4,/^}/" would be a nice thing to have, but I
think it is orthogonal to the issue of "where the search for /^{/
next prev parent reply other threads:[~2013-07-09 20:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-07 8:45 [PATCH/RFC] blame: accept multiple -L ranges Eric Sunshine
2013-07-07 9:58 ` Junio C Hamano
2013-07-09 15:04 ` Eric Sunshine
2013-07-09 16:39 ` Junio C Hamano
2013-07-09 17:17 ` Eric Sunshine
2013-07-09 17:42 ` Thomas Rast
2013-07-09 18:23 ` Eric Sunshine
2013-07-09 18:55 ` Junio C Hamano
2013-07-09 19:07 ` Eric Sunshine
2013-07-09 19:12 ` Thomas Rast
2013-07-09 19:21 ` Jonathan Nieder
2013-07-09 19:31 ` Junio C Hamano
2013-07-09 19:57 ` Michael Haggerty
2013-07-09 20:25 ` Junio C Hamano [this message]
2013-07-22 8:12 ` Eric Sunshine
2013-07-22 10:39 ` Thomas Rast
2013-07-22 17:23 ` Junio C Hamano
2013-07-22 19:19 ` Thomas Rast
2013-07-22 21:34 ` Junio C Hamano
2013-07-10 9:18 ` Thomas Rast
2013-07-11 16:44 ` Junio C Hamano
2013-07-09 18:57 ` 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=7vli5fv5ud.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
--cc=sunshine@sunshineco.com \
--cc=trast@inf.ethz.ch \
/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).