From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: isearch and region ? Date: Tue, 7 Nov 2017 18:08:47 +0900 Message-ID: <53A25592-F1EF-4216-A85A-63CDDBF41A4D@gmail.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_648DF0A6-4640-4186-A904-71040DFCA3FA" X-Trace: blaine.gmane.org 1510045792 5920 195.159.176.226 (7 Nov 2017 09:09:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Nov 2017 09:09:52 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 07 10:09:39 2017 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 1eBzt4-000119-3u for ged-emacs-devel@m.gmane.org; Tue, 07 Nov 2017 10:09:38 +0100 Original-Received: from localhost ([::1]:52173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBztB-0005Ed-1J for ged-emacs-devel@m.gmane.org; Tue, 07 Nov 2017 04:09:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBzt3-0005EI-VJ for emacs-devel@gnu.org; Tue, 07 Nov 2017 04:09:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBzsy-0005pQ-TK for emacs-devel@gnu.org; Tue, 07 Nov 2017 04:09:37 -0500 Original-Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]:54904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eBzsy-0005or-Ko for emacs-devel@gnu.org; Tue, 07 Nov 2017 04:09:32 -0500 Original-Received: by mail-pg0-x234.google.com with SMTP id l24so10510564pgu.11 for ; Tue, 07 Nov 2017 01:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=kztIgNUm66iLIxO7fO7UCwdihT0OTIM/uu8phI4Rh0g=; b=FkeQdYP04UgNwrGWLL1JCf+wfJCJQwbMUPyMkV2mhjENPEDszvs9zPme+UzBszrTmL 9u94xvFX6s6tBji63Jt5laLoVLz7g+EuFTvTxUODcIzRhZ0Ps6uCKbb2QTsARbTFTxB7 GSLef26epinY2fHVOhba2BIBZO26chMK48730OttaCeegMSHBHEhwoV5Lcic+3MMxMAq uYPT9DX77z3fU4mQVb8nUPtlhhlDN8S6J+HBORbhk384jfgWiPXW4oqjqVkw7qL5eQwP 8oXLKqDZo12XPyVW2t0cSnE3gy0ldZZmz70CmDCQTHF+2vW95gdwsN6s9AhGUHZkauBM rhMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=kztIgNUm66iLIxO7fO7UCwdihT0OTIM/uu8phI4Rh0g=; b=BLvGXBedU4tRaFOVEVGu7dCaaD0kJDjskTq/uOgl8QFYY+tivxSH32wogRrYnNSJ5L 4c5DjYZ0H5glFVKJ1pEeraOUEVS+Jrq+R4r033Q5S8h2JVCg6agytmY+xz4DnM1X3gjF QnfrE6bSJK0x5N6IQJQYlDMsYTPmYSKBzpqR3aiuAzjT3iBrTdTSXZ0eeIygOLUpDp5N epRtvfzUMqI8M0/BQ7lJF2a/32GITCTSCnehESRbDYNjtGh6y275wWZ8WyMN202bSS4X lgHR0O/yXNGrQGG35vO7S5qpon+lghAVvAfn/IXtu5Kq+MgbUNrcOZ63Fv2I/4sQgmJE 74xw== X-Gm-Message-State: AMCzsaWm6G0A2SzqctKYt0w/4XVtCCj1DwTwhNRndH+f3bBsRAOA/PYL SQEjo1Ug3/fz093Z3SFYibyum+Tg X-Google-Smtp-Source: ABhQp+TMsH47h2PSO0tyb8gED2vT6ZZ2FDdGC1X3tVs3r0ttTBSGBdnC1tCmX30MjyrftJF8qCsQHg== X-Received: by 10.159.253.144 with SMTP id q16mr17357763pls.25.1510045771556; Tue, 07 Nov 2017 01:09:31 -0800 (PST) Original-Received: from [10.254.2.130] ([210.160.37.45]) by smtp.gmail.com with ESMTPSA id h6sm2070576pgn.63.2017.11.07.01.09.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 01:09:30 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3445.4.7) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::234 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:219957 Archived-At: --Apple-Mail=_648DF0A6-4640-4186-A904-71040DFCA3FA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Thank you Yuri. > On Nov 7, 2017, at 17:31, Yuri Khan wrote: >=20 > On Tue, Nov 7, 2017 at 2:39 PM, Jean-Christophe Helary > wrote: >> I would like to know why isearch has been designed so that it does = not create a region with the matching string. The thing that appears in = the buffer looks like a region, but it is not, and that keeps the user = from immediately interacting with the matching string (deleting, = overwriting, killing or yanking, etc.) >=20 > isearch is incremental, so most of the region-affecting actions would > conflict with it. But search is not incremental and does not return a region either. It = just puts point at the end of the match. I guess that's useful when you = are trying to create a region from the original point (where you'd put = the mark) to the end of the matching string, but that's quite a limited = use. Or is search designed only for navigation in the document? What's = the point having a search that does not *find*? Is there a search that returns the matching string as a region? > * Deleting with Backspace deletes the last character of the pattern > (conflicts with deleting the region). > * Typing text adds to the pattern (conflicts with overwriting the = region). > * Pasting (yanking) adds to the pattern, too. I see that there are lots of isearch-yank commands, but no = isearch-kill... On the help list, I was suggested to use C-backspace after an isearch = since the point is at the end of the match, but that only deletes a = "word" and not the full match. By the way, what is the status of the beginning of the match as = highlighted by isearch? It is not a mark, and it is not point... > You would need an isearch command that (1) marks the current > occurrence as a region, and (2) exits isearch mode so you can affect > the region with your next command. I understand that. > On the other hand, some commands could work right out of isearch mode, > if suitably implemented: >=20 > * Deleting with Delete. > * Cutting (killing) and copying. Jean-Christophe Helary ----------------------------------------------- @brandelune http://mac4translators.blogspot.com --Apple-Mail=_648DF0A6-4640-4186-A904-71040DFCA3FA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Thank= you Yuri.

On Nov 7, 2017, at 17:31, Yuri Khan <yuri.v.khan@gmail.com> wrote:

On = Tue, Nov 7, 2017 at 2:39 PM, Jean-Christophe Helary
<jean.christophe.helary@gmail.com> wrote:
I would like to know why = isearch has been designed so that it does not create a region with the = matching string. The thing that appears in the buffer looks like a = region, but it is not, and that keeps the user from immediately = interacting with the matching string (deleting, overwriting, killing or = yanking, etc.)

isearch is = incremental, so most of the region-affecting actions would
conflict with it.

But = search is not incremental and does not return a region either. It just = puts point at the end of the match. I guess that's useful when you are = trying to create a region from the original point (where you'd put the = mark) to the end of the matching string, but that's quite a limited use. = Or is search designed only for navigation in the document? What's the = point having a search that does not *find*?

Is there a search that returns the matching string as a = region?

* Deleting with Backspace deletes the last = character of the pattern
(conflicts with deleting the = region).
* Typing text adds to the pattern (conflicts with = overwriting the region).
* Pasting (yanking) adds to the = pattern, too.

I see that there are lots of isearch-yank commands, but = no isearch-kill...

On the = help list, I was suggested to use C-backspace after an isearch since the = point is at the end of the match, but that only deletes a "word" and not = the full match.

By the way, what is = the status of the beginning of the match as highlighted by isearch? It = is not a mark, and it is not point...

You would need = an isearch command that (1) marks the current
occurrence = as a region, and (2) exits isearch mode so you can affect
the region with your next command.

I = understand that.

On the other hand, some = commands could work right out of isearch mode,
if suitably = implemented:

* Deleting with Delete.
* Cutting (killing) and copying.


Jean-Christophe Helary
-----------------------------------------------
@brandelune http://mac4translators.blogspot.com


= --Apple-Mail=_648DF0A6-4640-4186-A904-71040DFCA3FA--