From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: [patch] Run occur command restricted to a region Date: Sat, 31 Dec 2016 01:16:34 +0200 Organization: LINKOV.NET Message-ID: <878tqxm1wh.fsf@mail.linkov.net> References: <87vau3jl6f.fsf@gmail.com> <87shp6uwvj.fsf@mail.linkov.net> <83h95lua2f.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1483140757 20451 195.159.176.226 (30 Dec 2016 23:32:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2016 23:32:37 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org, tino.calancha@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 31 00:32:33 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 1cN6ex-0003n5-QT for ged-emacs-devel@m.gmane.org; Sat, 31 Dec 2016 00:32:27 +0100 Original-Received: from localhost ([::1]:41849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cN6f1-0002Iw-44 for ged-emacs-devel@m.gmane.org; Fri, 30 Dec 2016 18:32:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cN6eo-0002IT-CH for emacs-devel@gnu.org; Fri, 30 Dec 2016 18:32:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cN6en-00010E-JT for emacs-devel@gnu.org; Fri, 30 Dec 2016 18:32:18 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:56896 helo=homiemail-a12.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cN6ej-0000uO-RZ; Fri, 30 Dec 2016 18:32:13 -0500 Original-Received: from homiemail-a12.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTP id 9A7EF262069; Fri, 30 Dec 2016 15:32:10 -0800 (PST) Original-Received: from localhost.linkov.net (m83-178-3-130.cust.tele2.ee [83.178.3.130]) (Authenticated sender: jurta@jurta.org) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTPA id 98A1926206A; Fri, 30 Dec 2016 15:32:09 -0800 (PST) In-Reply-To: <83h95lua2f.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Dec 2016 09:53:44 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 69.163.253.7 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:211012 Archived-At: >> > 1) occur-backward: for lines before the current one. >> >> The name occur-backward falsely implies it uses re-search-backward, >> and I'm unsure if we need it as a counter part of isearch-backward. > > I can suggest occur-before and occur-after instead. Or occur-above and occur-below. What causes the doubt is that there are no other commands like that. No =E2=80=98count-words-before=E2=80=99, no =E2=80=98count-words-above=E2= =80=99, just =E2=80=98count-words-region=E2=80=99 no =E2=80=98comment-before=E2=80=99, no =E2=80=98comment-above=E2=80=99, = just =E2=80=98comment-region=E2=80=99, no =E2=80=98delete-before=E2=80=99, no =E2=80=98delete-above=E2=80=99, ju= st =E2=80=98delete-region=E2=80=99, and tens of other similar commands. This means that it's simple enough to select the region (e.g. =E2=80=98M-<=E2=80=99 to the beginning of the = buffer) and use =E2=80=98*-region=E2=80=99 commands to operate on the active region. So it should be enough to handle the active region in =E2=80=98occur=E2=80= =99 without creating new commands.