[Top][All Lists]

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

collect-string (was: simple useful functions)

From: Stefan Monnier
Subject: collect-string (was: simple useful functions)
Date: Thu, 04 Nov 2010 09:58:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> How about rename the command as collect-occur instead of
>> collect-string and document it as next?
> Wrong namespace.  IMO, the name should *start* with occur (but Stefan
> and Yidong are final authorities on that).

Agreed, namespace cleanliness is one of my favorite forms of
anal retentiveness.

The way I see it, the suggested collect-string is a variant of occur
where the result buffer contains none of the regexp matches's context.
So it would make sense to integrate it very tightly with `occur',
i.e. make M-x occur do the job of collect-strings for some particular
value of its argument NLINES.  Currently, NLINES is assumed to be
a number and all values of that number have a useful meaning, so we'd
have to add this new feature via a non-number value of NLINES.

E.g. C-u M-x occur could do the collect-string thingy (which is still an
incompatible change since some people may like to use C-u M-x occur to get
4 lines of context, but you can make omelets without breaking eggs).


reply via email to

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