emacs-devel
[Top][All Lists]
Advanced

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

Re: [patch] Run occur command restricted to a region


From: Tino Calancha
Subject: Re: [patch] Run occur command restricted to a region
Date: Fri, 30 Dec 2016 11:47:48 +0900 (JST)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)



On Fri, 30 Dec 2016, Juri Linkov wrote:

Maybe we should use the same logic of other related commands in replace.el
how-many, keep-lines, flush-lines that limit the affected lines to the
active region, or when the region is not active, take only lines after
the current line.  Then we don't need separate commands, and no keys for them.
Yeah, that is a source of confusion when using those tools:
1) Commands like `how-many' or `flush-lines' by default apply to the lines
   after point; they accept optional arguments to cover a region as well.
2) OTOH `occur' by default uses the entire buffer; it doesn't accept
   arguments to select a region.

It's a nice thing if all related tools follow similar defaults. Command `occur' is also used in `multi-occur', to search in multiple buffers: in that case you must search in the entire buffers.



reply via email to

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