From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 19 02:02:11 2015 Received: (at submit) by debbugs.gnu.org; 19 Nov 2015 07:02:11 +0000 Received: from localhost ([127.0.0.1]:44126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzJEQ-0003Cq-Kc for submit@debbugs.gnu.org; Thu, 19 Nov 2015 02:02:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzJEO-0003Ci-Ug for submit@debbugs.gnu.org; Thu, 19 Nov 2015 02:02:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzJEN-0002vj-Fw for submit@debbugs.gnu.org; Thu, 19 Nov 2015 02:02:08 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzJEN-0002ve-DF for submit@debbugs.gnu.org; Thu, 19 Nov 2015 02:02:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzJEM-0006sD-7L for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2015 02:02:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzJEI-0002vK-5x for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2015 02:02:06 -0500 Received: from [128.199.246.141] (port=39553 helo=itsuwa.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzJEH-0002sw-Qc for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2015 02:02:02 -0500 Received: from 125-227-241-199.hinet-ip.hinet.net ([125.227.241.199] helo=ipass-lix01) by itsuwa.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZzIsx-0004hB-1W for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2015 14:39:59 +0800 From: b4283@itsuwa.org To: bug-gnu-emacs@gnu.org Subject: 24.5; Make occur search within regions when there is one Date: Thu, 19 Nov 2015 14:39:37 +0800 Message-ID: <87si42sdau.fsf@ipass-lix01.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a wish request. The current occur implementation doesn't include a `region' version which search only within the current region mark by user, instead it operates on the entire buffer. It would come in handy if occur searchs within regions as well. Such behavior is desired, for example, when listing the occurances of a symbol in the body of a function definition. In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) of 2015-09-10 on foutrelis Windowing system distributor `The X.Org Foundation', version 11.0.11704000 System Description: Arch Linux Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LC_CTYPE: zh_TW.UTF-8 value of $LANG: zh_TW.UTF-8 value of $XMODIFIERS: @im=gcin locale-coding-system: utf-8-unix Major mode: C++/l Minor modes in effect: shell-dirtrack-mode: t nyan-mode: t global-linum-mode: t linum-mode: t ido-everywhere: t show-paren-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t global-prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent messages: Load-path shadows: Features: (shadow sort gnus-util mail-extr emacsbug message idna format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils shell pcomplete grep+ grep compile comint ansi-color etags ring misearch multi-isearch cc-langs cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs smooth-scrolling vc-git quail help-mode jka-compr expand-region text-mode-expansions er-basic-expansions thingatpt expand-region-core expand-region-custom nyan-mode buffer-move linum edmacro kmacro cl-loaddefs cl-lib ido xemacs-theme paren delsel cus-start cus-load windmove afternoon-theme-autoloads cherry-blossom-theme-autoloads colorsarenice-theme-autoloads geiser-autoloads helm-autoloads js2-mode-autoloads info easymenu php-mode-autoloads rust-mode-autoloads advice help-fns toml-mode-autoloads package epg-config time-date china-util tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 727609 127367) (symbols 48 27690 0) (miscs 40 1313 683) (strings 32 121297 25891) (string-bytes 1 1561851) (vectors 16 91267) (vector-slots 8 1181120 133080) (floats 8 89 446) (intervals 56 7376 3100) (buffers 960 23) (heap 1024 75181 2588)) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 19 19:06:06 2015 Received: (at 21957) by debbugs.gnu.org; 20 Nov 2015 00:06:06 +0000 Received: from localhost ([127.0.0.1]:45336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzZDK-0006Wn-4U for submit@debbugs.gnu.org; Thu, 19 Nov 2015 19:06:06 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:42519 helo=homiemail-a18.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzZDI-0006Wb-16 for 21957@debbugs.gnu.org; Thu, 19 Nov 2015 19:06:04 -0500 Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 9B0A625006B; Thu, 19 Nov 2015 16:06:02 -0800 (PST) Received: from localhost.linkov.net (82.131.20.219.cable.starman.ee [82.131.20.219]) (Authenticated sender: jurta@jurta.org) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPA id C8A3A250069; Thu, 19 Nov 2015 16:06:01 -0800 (PST) From: Juri Linkov To: b4283@itsuwa.org Subject: Re: bug#21957: 24.5; Make occur search within regions when there is one Organization: LINKOV.NET References: <87si42sdau.fsf@ipass-lix01.i-did-not-set--mail-host-address--so-tickle-me> Date: Fri, 20 Nov 2015 02:04:53 +0200 In-Reply-To: <87si42sdau.fsf@ipass-lix01.i-did-not-set--mail-host-address--so-tickle-me> (b4283@itsuwa.org's message of "Thu, 19 Nov 2015 14:39:37 +0800") Message-ID: <87ziy9tu1m.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21957 Cc: 21957@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > This is a wish request. > > The current occur implementation doesn't include a `region' version > which search only within the current region mark by user, instead it > operates on the entire buffer. > > It would come in handy if occur searchs within regions as well. Such > behavior is desired, for example, when listing the occurances of a > symbol in the body of a function definition. Do you think it would suit your needs when you first narrow the buffer (e.g. to the body of a function with C-x n d) before running occur? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 21 00:29:38 2015 Received: (at 21957) by debbugs.gnu.org; 21 Nov 2015 05:29:39 +0000 Received: from localhost ([127.0.0.1]:46575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a00jy-0008DF-Hh for submit@debbugs.gnu.org; Sat, 21 Nov 2015 00:29:38 -0500 Received: from [128.199.246.141] (port=41324 helo=itsuwa.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a00je-0008Ck-DE for 21957@debbugs.gnu.org; Sat, 21 Nov 2015 00:29:37 -0500 Received: from 36-236-127-213.dynamic-ip.hinet.net ([36.236.127.213] helo=[192.168.1.109]) by itsuwa.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1a00jc-00047v-RS; Sat, 21 Nov 2015 13:29:16 +0800 Subject: Re: bug#21957: 24.5; Make occur search within regions when there is one To: Juri Linkov References: <87si42sdau.fsf@ipass-lix01.i-did-not-set--mail-host-address--so-tickle-me> <87ziy9tu1m.fsf@mail.linkov.net> From: Li Ian-Xue Message-ID: <56500129.9090307@itsuwa.org> Date: Sat, 21 Nov 2015 13:29:13 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <87ziy9tu1m.fsf@mail.linkov.net> Content-Type: text/plain; charset=big5 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Yes, that is what I did when I found out `occur' doesn't do regions. A friend of mine suggested that a combination of narrowing (C-x n w) and M-s o should do the trick, and it did. Nevertheless still I would still prefer `occur' to accept a regional parameter, as it would be much straight forward mode of operation. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 21957 Cc: 21957@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Yes, that is what I did when I found out `occur' doesn't do regions. A friend of mine suggested that a combination of narrowing (C-x n w) and M-s o should do the trick, and it did. Nevertheless still I would still prefer `occur' to accept a regional parameter, as it would be much straight forward mode of operation. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Yes, that is what I did when I found out `occur' doesn't do regions. A friend of mine suggested that a combination of narrowing (C-x n w) and M-s o should do the trick, and it did. Nevertheless still I would still prefer `occur' to accept a regional parameter, as it would be much straight forward mode of operation. Thank you. Juri Linkov 於 西元2015年11月20日 08:04 寫道: >> This is a wish request. >> >> The current occur implementation doesn't include a `region' version >> which search only within the current region mark by user, instead it >> operates on the entire buffer. >> >> It would come in handy if occur searchs within regions as well. Such >> behavior is desired, for example, when listing the occurances of a >> symbol in the body of a function definition. > Do you think it would suit your needs when you first narrow the buffer > (e.g. to the body of a function with C-x n d) before running occur? From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 22 07:13:53 2015 Received: (at 21957) by debbugs.gnu.org; 22 Nov 2015 12:13:53 +0000 Received: from localhost ([127.0.0.1]:47673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0TWj-0003sQ-Bk for submit@debbugs.gnu.org; Sun, 22 Nov 2015 07:13:53 -0500 Received: from mail-lf0-f47.google.com ([209.85.215.47]:34270) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0TWO-0003ry-Hb for 21957@debbugs.gnu.org; Sun, 22 Nov 2015 07:13:51 -0500 Received: by lffu14 with SMTP id u14so92973997lff.1 for <21957@debbugs.gnu.org>; Sun, 22 Nov 2015 04:13:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=KadmYTnEqxUp4NWxdC4J7UWqTQ7oY7QishtijXqH0Xw=; b=oUYq6+qei7pLJ2SClSObhtrUUzb4WUt1n4+BPAl/VR41NArgE1f05LdDnno1GLW0rn kxFaKRQFUSqRuedmdDdSZteXH90VOllKUsUoLxyI2RfHqjOCEUBtTBWiDXMPq626Rxlb VouG7clL3+a8+79UyY5rn/WsKVZ5O5w9N0Wy1NuEydMLdpkQF6yluXckIY/YUpK8jkYx ORWxvzco0bFcJCOipcxYyopcwDEKI0CGSEDOzD44rIMIOUUMS90dtvucsrO52NbUJisv cgrUdi4/LDSLSxVBD3YVId5wS6DDe5f+xhD2mG9cEuh9oEtelSSYsDuxK9gIVpnaI/qS PDKA== MIME-Version: 1.0 X-Received: by 10.25.19.69 with SMTP id j66mr9224742lfi.25.1448194411690; Sun, 22 Nov 2015 04:13:31 -0800 (PST) Received: by 10.112.202.99 with HTTP; Sun, 22 Nov 2015 04:13:31 -0800 (PST) Received: by 10.112.202.99 with HTTP; Sun, 22 Nov 2015 04:13:31 -0800 (PST) In-Reply-To: <56500129.9090307@itsuwa.org> References: <87si42sdau.fsf@ipass-lix01.i-did-not-set--mail-host-address--so-tickle-me> <87ziy9tu1m.fsf@mail.linkov.net> <56500129.9090307@itsuwa.org> Date: Sun, 22 Nov 2015 12:13:31 +0000 X-Google-Sender-Auth: PSgTPEa9LleY-r_zt4BpTF242YU Message-ID: Subject: Re: bug#21957: 24.5; Make occur search within regions when there is one From: Artur Malabarba To: Li Ian-Xue Content-Type: multipart/alternative; boundary=001a114069d479815f0525200948 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21957 Cc: 21957@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: bruce.connor.am@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a114069d479815f0525200948 Content-Type: text/plain; charset=UTF-8 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. --001a114069d479815f0525200948 Content-Type: text/html; charset=UTF-8

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.

--001a114069d479815f0525200948-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 22 19:27:23 2015 Received: (at 21957) by debbugs.gnu.org; 23 Nov 2015 00:27:24 +0000 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 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 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) 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) From: Juri Linkov To: Artur Malabarba Subject: Re: bug#21957: 24.5; Make occur search within regions when there is one Organization: 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> Date: Mon, 23 Nov 2015 02:22:59 +0200 In-Reply-To: (Artur Malabarba's message of "Sun, 22 Nov 2015 12:13:31 +0000") Message-ID: <87io4t5zto.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21957 Cc: 21957@debbugs.gnu.org, Drew Adams , Li Ian-Xue X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 22 19:54:15 2015 Received: (at 21957) by debbugs.gnu.org; 23 Nov 2015 00:54:15 +0000 Received: from localhost ([127.0.0.1]:48683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0fOY-0000VL-Gx for submit@debbugs.gnu.org; Sun, 22 Nov 2015 19:54:14 -0500 Received: from mail-lb0-f182.google.com ([209.85.217.182]:36795) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0fOD-0000UZ-Ta for 21957@debbugs.gnu.org; Sun, 22 Nov 2015 19:54:12 -0500 Received: by lbblt2 with SMTP id lt2so87955449lbb.3 for <21957@debbugs.gnu.org>; Sun, 22 Nov 2015 16:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=FitageHn0LxPko6OyN5Yd48R3Yw4Aqm53pRHIKj+5Ro=; b=MS47bn4KXLQnIxv+S9SsMAehL3Q4nfx61c+A0wtrz68FIdM5VJI72RCjySB254x4xx YfgI7qiWObgg2H3FgOI8TRvFZ2bHIUv8MbuJ2aU4TuUnznYwGXxUOjtUO95LrZvFHvDN LOidFGxkX4v28DSoIRPtq9qfoP7z3X4K5DdWlZNVFMBe2xtrnoP1mJsWj4+EIrpEwyjv Je2Li3GhS0loAfqbybZYUrHl7O3MbKwPmaAcfxc7vT4oHhWpzQfrHh2ND86S/s2bnQ1M u9eGDPF9fJGU2OdPZcwo7ljjpxKeD9Rn/5giFWOrorRX9Y6RiG2ewo932f2CFHdyobnR Eaeg== MIME-Version: 1.0 X-Received: by 10.112.130.195 with SMTP id og3mr8225051lbb.69.1448240032883; Sun, 22 Nov 2015 16:53:52 -0800 (PST) Received: by 10.112.202.99 with HTTP; Sun, 22 Nov 2015 16:53:52 -0800 (PST) Received: by 10.112.202.99 with HTTP; Sun, 22 Nov 2015 16:53:52 -0800 (PST) In-Reply-To: <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> <87io4t5zto.fsf@mail.linkov.net> Date: Mon, 23 Nov 2015 00:53:52 +0000 X-Google-Sender-Auth: pG8724PW-wAVpy3ifmoLBV_ZIGI Message-ID: Subject: Re: bug#21957: 24.5; Make occur search within regions when there is one From: Artur Malabarba To: Juri Linkov Content-Type: multipart/alternative; boundary=047d7b3a83aab5b0d805252aa855 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21957 Cc: 21957@debbugs.gnu.org, Drew Adams , Li Ian-Xue X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: bruce.connor.am@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --047d7b3a83aab5b0d805252aa855 Content-Type: text/plain; charset=UTF-8 > 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. Technically that's not necessary. Isearch always pushes the mark for you anyway, even though it doesn't activate the region. But most people don't know that, and even though I know it I frequently forget and activate region before isearch. Anyway, I don't see why it would be a problem. Just add an item to do a regular search if the region is empty. --047d7b3a83aab5b0d805252aa855 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

> 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 wher= e
> Isearch ends.

Technically that's not necessary. Isearch always pushes = the mark for you anyway, even though it doesn't activate the region. Bu= t most people don't know that, and even though I know it I frequently f= orget and activate region before isearch.

Anyway, I don't see why it would be a problem. Just add = an item to do a regular search if the region is empty.

--047d7b3a83aab5b0d805252aa855-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 22 20:29:39 2015 Received: (at 21957) by debbugs.gnu.org; 23 Nov 2015 01:29:39 +0000 Received: from localhost ([127.0.0.1]:48688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0fwo-0001OP-Qu for submit@debbugs.gnu.org; Sun, 22 Nov 2015 20:29:39 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:27428) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0fwm-0001OH-PC for 21957@debbugs.gnu.org; Sun, 22 Nov 2015 20:29:37 -0500 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tAN1TY5W018002 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Nov 2015 01:29:34 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id tAN1TYFh008103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 23 Nov 2015 01:29:34 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id tAN1TXLx008641; Mon, 23 Nov 2015 01:29:33 GMT MIME-Version: 1.0 Message-ID: <99d74c5d-0047-4d4e-970e-008bc4a12b62@default> Date: Sun, 22 Nov 2015 17:29:26 -0800 (PST) From: Drew Adams To: Juri Linkov , Artur Malabarba Subject: RE: bug#21957: 24.5; Make occur search within regions when there is one References: <87si42sdau.fsf@ipass-lix01.i-did-not-set--mail-host-address--so-tickle-me> <87ziy9tu1m.fsf@mail.linkov.net> <56500129.9090307@itsuwa.org> <87io4t5zto.fsf@mail.linkov.net> In-Reply-To: <87io4t5zto.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 21957 Cc: 21957@debbugs.gnu.org, Li Ian-Xue X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) > > 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. >=20 > This is a useful heuristic, not sure how intuitive it is. >=20 > 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. No, I don't think that was me. Or not quite, if by that you mean something I might have said about searching the region. I'm not in favor of things such as the automatic switching among #1, #2, and #3, above. I prefer to let users pick whether to search the region, regardless of its size or whether it contains a newline char. The combination of 1,2,3 above is _not_ a useful heuristic, IMO. It can be useful to do any of those things, but I don't think it is useful to couple them together in a "dwimish" way. I'm also not in favor of Isearch just picking up the region as the search string (regardless of whether it contains newlines). I prefer that users yank the region into the search string if they want to search with it. (I also give them another command ('C-M-y') to yank the secondary selection, which is typically not at point, and which doesn't change until you change it explicitly.) IOW, I think it is better to have users explicitly say what behavior they want, instead of dwimming them around. FWIW, in Isearch+ these features are related to the region: 1. Option 'isearchp-restrict-to-region-flag' restricts searching to the active region (regardless of its size or the presence of a newline). You can toggle this during Isearch using 'C-x n'. 2. Option 'isearchp-deactivate-region-flag' causes the active region to be deactivated (removing highlighting). That makes it easier to see what is being searched. 3. If you also use library `modeline-posn.el' then when you search the active region you can keep that restriction for query-replacement invoked from Isearch. 4. Non-nil option 'isearchp-set-region-flag' selects the last search target as the region when you exit Isearch. You can toggle this during Isearch using 'C-SPC'. If you also use library `replace+.el' then you can similarly select the last replacement as the region when you query-replace etc. 5. You can put a text or overlay property on the text in the region, and then later search the zones of text that have that property (they need not be contiguous). 6. If you also use library `zones.el' then you can search multiple zones defined by their limits (buffer positions or markers in any buffers), instead of by properties. You can add the active region to a set of such zones, using 'C-x n a'. You can coalesce such zones, uniting their overlaps. (That happens anyway when you search a set of zones.) 7. When you search zones of any kind, non-nil option 'isearchp-dim-non-prop-zones-flag' dims the pieces of text that are not being searched. You can toggle this during Isearch using 'C-M-D' (aka 'C-M-S-d'). 8. You can search zones defined by text/overlays/buffer limits as described above, or you can search the complement. You can toggle searching the complement using 'C-M-~' during Isearch. http://www.emacswiki.org/emacs/IsearchPlus http://www.emacswiki.org/emacs/Zones http://www.emacswiki.org/emacs/ReplacePlus http://www.emacswiki.org/emacs/ModeLinePosition From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 24 08:43:40 2022 Received: (at 21957) by debbugs.gnu.org; 24 Jan 2022 13:43:40 +0000 Received: from localhost ([127.0.0.1]:42568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBzdD-0006dO-Ol for submit@debbugs.gnu.org; Mon, 24 Jan 2022 08:43:39 -0500 Received: from quimby.gnus.org ([95.216.78.240]:51012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBzdB-0006d8-HU for 21957@debbugs.gnu.org; Mon, 24 Jan 2022 08:43:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=CSW4G4BIWcVN4Qm5jCsP6xv1tmNk+rlQ5D46nK/ACig=; b=ZSOcZQQC8poXlM/OnuP3SLr2KS XTlcKqH6AR59hW25kQZh4Jwoj5PchtU4rUDY/6PG2dLFvBypdpkakWYc0edwn99Eq8IpESGskOYcC DTaa/UtzXVGMGtJc7AGlBkUXdNdqGq9IriIJk2lGmaPvKijAHx7k695p15uzErkFO+Nc=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nBzd3-000858-1s; Mon, 24 Jan 2022 14:43:31 +0100 From: Lars Ingebrigtsen To: Li Ian-Xue Subject: Re: bug#21957: 24.5; Make occur search within regions when there is one References: <87si42sdau.fsf@ipass-lix01.i-did-not-set--mail-host-address--so-tickle-me> <87ziy9tu1m.fsf@mail.linkov.net> <56500129.9090307@itsuwa.org> X-Now-Playing: Peter Gabriel's _So_: "In Your Eyes" Date: Mon, 24 Jan 2022 14:43:28 +0100 In-Reply-To: <56500129.9090307@itsuwa.org> (Li Ian-Xue's message of "Sat, 21 Nov 2015 13:29:13 +0800") Message-ID: <87sftd6ygv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Li Ian-Xue writes: > Yes, that is what I did when I found out `occur' doesn't do regions. A > friend of mine suggested > that a combination of narrowing (C-x n w) and M-s o should do the trick, > and it did. > > Neverth [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21957 Cc: 21957@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Li Ian-Xue writes: > Yes, that is what I did when I found out `occur' doesn't do regions. A > friend of mine suggested > that a combination of narrowing (C-x n w) and M-s o should do the trick, > and it did. > > Nevertheless still I would still prefer `occur' to accept a regional > parameter, as it would be much straight forward mode of operation. (I'm going through old bug reports that unfortunately weren't resolved at the time.) occur now works as requested in the current Emacs version -- it does the operation on the active region, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 24 08:43:46 2022 Received: (at control) by debbugs.gnu.org; 24 Jan 2022 13:43:46 +0000 Received: from localhost ([127.0.0.1]:42571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBzdJ-0006dj-Vs for submit@debbugs.gnu.org; Mon, 24 Jan 2022 08:43:46 -0500 Received: from quimby.gnus.org ([95.216.78.240]:51026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBzdI-0006dN-Ns for control@debbugs.gnu.org; Mon, 24 Jan 2022 08:43:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Cs0OP/rZ6ofU2K2BknkxxTyYpZOGqTceQJA/Z1WuLJc=; b=BfA1mNVfqPhrfPSR8U1C8eRPkv QDJP93g4X4DA3rddiUJopE+Xrv1hDdF5O0YBEJ3xYDJ4BYS/D2ixo1Ajlabb14AClFwLOU/qkJiYn KZkHvOePt7sIvsuCvnfJARCxHKhwu3c8BVYwoIMkxWHjE2cqF8lSitbilBQWFGRIZ0Fo=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nBzdA-00085G-Qs for control@debbugs.gnu.org; Mon, 24 Jan 2022 14:43:38 +0100 Date: Mon, 24 Jan 2022 14:43:36 +0100 Message-Id: <87r18x6ygn.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #21957 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 21957 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 21957 quit From unknown Fri Sep 05 11:02:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 22 Feb 2022 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator