From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: [patch] Run occur command restricted to a region Date: Fri, 30 Dec 2016 11:47:48 +0900 (JST) Message-ID: References: <87vau3jl6f.fsf@gmail.com> <87shp6uwvj.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1483066092 19779 195.159.176.226 (30 Dec 2016 02:48:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2016 02:48:12 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Emacs developers , Tino Calancha To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 30 03:48:03 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMnEc-0003bR-99 for ged-emacs-devel@m.gmane.org; Fri, 30 Dec 2016 03:47:58 +0100 Original-Received: from localhost ([::1]:38133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMnEh-0006sk-9g for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2016 21:48:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMnEa-0006se-Ut for emacs-devel@gnu.org; Thu, 29 Dec 2016 21:47:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMnEX-0004bX-2Q for emacs-devel@gnu.org; Thu, 29 Dec 2016 21:47:56 -0500 Original-Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:36769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cMnEW-0004ar-Rp for emacs-devel@gnu.org; Thu, 29 Dec 2016 21:47:52 -0500 Original-Received: by mail-pg0-x241.google.com with SMTP id n5so20627288pgh.3 for ; Thu, 29 Dec 2016 18:47:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=gTGJ7vfYg6MOg1WeKX0BksC/psbeDjqbnAmBrr625nc=; b=qWfH8rzKSq0aDx4XzN5pioY/G1DRjvrKUFdJIV0P2MOvt5P/7/yyh3Na8zC9ppxBm+ 0YGPlL88iDtyiuHDRfHP9PkEaxJkpcHFkY1TljDP3BvKj+4b4PKYUpt7/6A69IOxkSuT 193/eD86YTFu3xqUwZcMeNs8XNjL87qhf4gQnsZ2XhQhF0ePC/SixlkbxCMjqUu/UoLb Lmiym6NU7mbu2wTIn1+axfjCjjfJLCFGSXeN+5HgPDAov8F8gdEQaIHV/l7cBKRWEuhV 7oQzPByPneq/R0+k8bl6n6nPrZD8819O8pr1osCZncsZnKgB70mVzKJKBCzEuVRoW2di F+Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=gTGJ7vfYg6MOg1WeKX0BksC/psbeDjqbnAmBrr625nc=; b=QlMqpnt/M+AzY+4Rh8yiClGCThEj/lO4XP5lsUH+45HtJFNGHvYtLIQMPc9yDchTLg eIEkoPhhVGC39BDZN+uH3CVXHbyLbnNM7/zKMU+2nFLlpUAmKxVhPnvWnP+xb8Iftdzn 8HGD9tX7epKo6gAlSvglKTWALXAmKsguf1jsIEkJThCM2zqHl6BNj0+zMogN6wPnH2Rk 5r4ogKxOmwVC9u8f48W+AwA8QIa+sIx9WYiFW3yBwX3cdpoY7LtvETVBp1lPSSzTSsh6 0co2HQo3Qzuk7gqZw8vfW1jdldeECfyV8lruuAXvEqMP5pfZ7PKyp6Rm1mCt8IKpdVui +bRg== X-Gm-Message-State: AIkVDXI2+RfYcKlxFJkvSyz0hNILbWc76RmfkUpGISe2KHvPviETl9z+H1z9etpPh8GLoQ== X-Received: by 10.84.175.234 with SMTP id t97mr94571309plb.145.1483066071854; Thu, 29 Dec 2016 18:47:51 -0800 (PST) Original-Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id a11sm107811983pfe.96.2016.12.29.18.47.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Dec 2016 18:47:51 -0800 (PST) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <87shp6uwvj.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::241 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210983 Archived-At: 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.