From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.help Subject: Re: killing the result of isearch Date: Sat, 11 Nov 2017 16:36:39 +0100 Message-ID: References: <433bd3d0-a506-4d89-9d10-dcbfb0e23be0@default> <852BAA28-2A50-4AD9-B8D6-9F06905A4395@gmail.com> <87r2tava5x.fsf@hornfels.zedat.fu-berlin.de> <87y3nigy86.fsf@hornfels.zedat.fu-berlin.de> <8B436DA2-1C8B-471F-8D90-08C282864A70@gmail.com> <87375p6v08.fsf@gnuvola.org> <868tfganmj.fsf@zoho.com> 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 1510414622 15237 195.159.176.226 (11 Nov 2017 15:37:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Nov 2017 15:37:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 11 16:36:58 2017 Return-path: Envelope-to: geh-help-gnu-emacs@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 1eDXq3-0003dF-Ju for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Nov 2017 16:36:55 +0100 Original-Received: from localhost ([::1]:46005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDXqB-0001eK-0e for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Nov 2017 10:37:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDXpj-0001e4-GO for help-gnu-emacs@gnu.org; Sat, 11 Nov 2017 10:36:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDXpf-0006CP-Fi for help-gnu-emacs@gnu.org; Sat, 11 Nov 2017 10:36:35 -0500 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:48610) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eDXpf-0006C0-3d for help-gnu-emacs@gnu.org; Sat, 11 Nov 2017 10:36:31 -0500 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 3096D225B6 for ; Sat, 11 Nov 2017 15:29:22 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:mime-version :references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1510414161; x=1511278162; bh=H1T+o8rm59lH3 gvvTa5xUHgJPA3YJQaQxI4lRynpMJQ=; b=L3YQnI1ExPVcwYK4/Jbvy1syMqIGW ijL5W2dcPBKjdLBhUrbOKuZnrxNQuyHtTOgXXzen3RrfS/8TWPKvSSoLonDXNr8D m19LeBUZt0Asc1Bs3aHwPmAHCEtg+8QoHpigZouD3MqtH1Dpqfu8YstrAiWMUbyU OaFcmhekYKUjmA= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id a8sKl7xPARD4 for ; Sat, 11 Nov 2017 15:29:21 +0000 (UTC) Original-Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 3CFE622570 for ; Sat, 11 Nov 2017 15:29:19 +0000 (UTC) In-reply-to: <868tfganmj.fsf@zoho.com> (message from Emanuel Berg on Wed, 08 Nov 2017 14:47:16 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 37.35.109.145 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114853 Archived-At: > From: Emanuel Berg > Date: Wed, 08 Nov 2017 14:47:16 +0100 >=20 > It is called searching but many times what > happens is it is a form of navigation - a goto > in the text buffer, if you will. >=20 > Because I do this all the time, like one of the > most common ways to position point, I get > totally stressed out by the default > "incremental" search. >=20 > Here is some code if anyone else is like me and > hasn't got his own file already >=20 > http://user.it.uu.se/~embe8573/emacs-init/wrap-search.el I was also looking for a less nervous way to search through a buffer recently, and I found that the "/" command in view-mode fits the bill exactly. You hit "/ foo RET", and you are brought to the next match for "foo", starting from the bottom of the window. You can hit "n" and "p" to go forward and backward between matches. What's useful is the omission of some information when you navigate between matches -- only one match per screenful is highlighted, and when you hit "n" or "p" the next time, the search starts from the end or start of the window, respectively. It's useful for getting a rough idea of the matches for a regexp, without actually cycling through all the matches with C-s. And if you need a more fine-grained search, "s" and "r" are bound to isearch-forward and isearch-backward. "/" also comes with some other goodies, see: / runs the command View-search-regexp-forward (found in view-mode-map), which is an interactive compiled Lisp function in =E2=80=98view.el=E2=80=99. It is bound to /. (View-search-regexp-forward N REGEXP) Search forward for first (or prefix Nth) occurrence of REGEXP in View m= ode. Displays line found at center of window. Sets mark at starting positio= n and pushes mark ring. Characters @ and ! are special at the beginning of REGEXP. They modify the search rather than become part of the pattern searched for. @ means search all the buffer i.e. start search at the beginning of buf= fer. ! means search for a line that contains no match for the pattern. If REGEXP is empty or only consist of these control characters, then an earlier remembered REGEXP is used, otherwise REGEXP is remembered for use by later search commands.