emacs-devel
[Top][All Lists]
Advanced

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

Re: collect-string


From: Stephen J. Turnbull
Subject: Re: collect-string
Date: Thu, 02 Dec 2010 16:00:36 +0900

Tak Ota writes:
 > Hi Stephen,
 > 
 > Thanks for the comments.
 > 
 > Mon, 29 Nov 2010 21:27:12 -0800: "Stephen J. Turnbull" <address@hidden> 
 > wrote:
 > > Tak Ota writes:

 > > I don't think this describes the behavior of the prefix argument [...]

 > I modified the description slightly.

Much better, thank you (but it's Stefan's opinion that matters, of
course).

 > > The COLLECT argument is undocumented.
 > 
 > I just replicated the same paragraph from occur to multi-occur and
 > multi-occur-in-matching-buffers below.  I added some examples to
 > demonstrate how this feature is useful for some tasks.

I'm not sure whether either that kind of duplication, or such
examples, are considered good style in Emacs docstrings or not.
You'll need to wait for Stefan's comment.  But:

 > ! buffer.  When COLLECT is zero the entire matched strings are
 > ! collected, which is not very useful,

Hmm ... it occurs to me that M-0 and M-1 are really the most useful
numeric values.  Otherwise, you have to plan ahead.  A regexp with
multiple capturing parens is really pretty complex; I suspect most of
the time if you actually need such a thing you'll only notice it as
you type the regexp (after entering the numeric value).  If you don't
need capturing groups, although shy groups are a little more typing
they have the advantage that you can go, "oh, I need a group here" and
insert it without invalidating your prefix argument.

Maybe you could use M-0 for the natural application of "collect the
whole match" and C-u (without numerical value) for "prompt for group
after reading the regexp"?



reply via email to

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