From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#21957: 24.5; Make occur search within regions when there is one Date: Mon, 23 Nov 2015 02:22:59 +0200 Organization: LINKOV.NET Message-ID: <87io4t5zto.fsf@mail.linkov.net> References: <87si42sdau.fsf@ipass-lix01.i-did-not-set--mail-host-address--so-tickle-me> <87ziy9tu1m.fsf@mail.linkov.net> <56500129.9090307@itsuwa.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448238491 24869 80.91.229.3 (23 Nov 2015 00:28:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Nov 2015 00:28:11 +0000 (UTC) Cc: 21957@debbugs.gnu.org, Li Ian-Xue To: Artur Malabarba Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 23 01:28:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a0ezJ-0001GO-HF for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Nov 2015 01:28:09 +0100 Original-Received: from localhost ([::1]:58029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ezJ-0002Dr-Oj for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Nov 2015 19:28:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ezG-0002Ci-4d for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2015 19:28:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0ezC-0006AJ-UY for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2015 19:28:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ezC-0006AF-RB for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2015 19:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a0ezC-0008H4-K4 for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2015 19:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2015 00:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21957 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21957-submit@debbugs.gnu.org id=B21957.144823844431755 (code B ref 21957); Mon, 23 Nov 2015 00:28:02 +0000 Original-Received: (at 21957) by debbugs.gnu.org; 23 Nov 2015 00:27:24 +0000 Original-Received: from localhost ([127.0.0.1]:48675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0eyZ-0008G6-Ac for submit@debbugs.gnu.org; Sun, 22 Nov 2015 19:27:23 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:58596 helo=homiemail-a39.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0eyV-0008Ft-4r for 21957@debbugs.gnu.org; Sun, 22 Nov 2015 19:27:19 -0500 Original-Received: from homiemail-a39.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTP id 0001A15006D; Sun, 22 Nov 2015 16:27:17 -0800 (PST) Original-Received: from localhost.linkov.net (m91-131-172-22.cust.tele2.ee [91.131.172.22]) (Authenticated sender: jurta@jurta.org) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTPA id B1118150069; Sun, 22 Nov 2015 16:27:16 -0800 (PST) In-Reply-To: (Artur Malabarba's message of "Sun, 22 Nov 2015 12:13:31 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109109 Archived-At: > I've been thinking it might be nice to have an occur-dwim command. > > 1. If the selected region has multiple lines, it would search only inside > the region. > 2. If the selected region has one line or less, it would use the region as > the search string. > 3. If there's no selection it do the usual occur. This is a useful heuristic, not sure how intuitive it is. BTW, I recall Drew asked how to do the same in Isearch, but I see no way because in Isearch it's useful to mark the beginning of the region, and extend it using Isearch commands by putting the end of the region where Isearch ends.