GNU bug report logs - #46469
27.1; `isearch-del-char' should move point further back

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Augusto Stoffel <arstoffel@HIDDEN>; dated Fri, 12 Feb 2021 19:23:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 28 Apr 2021 21:41:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 28 17:41:18 2021
Received: from localhost ([127.0.0.1]:54276 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lbrvq-0003dL-35
	for submit <at> debbugs.gnu.org; Wed, 28 Apr 2021 17:41:18 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:44143)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1lbrvo-0003d7-IZ
 for 46469 <at> debbugs.gnu.org; Wed, 28 Apr 2021 17:41:17 -0400
Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166])
 (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id E30A8100005;
 Wed, 28 Apr 2021 21:41:08 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
Organization: LINKOV.NET
References: <87zh09xggr.fsf@HIDDEN> <87eehjstt9.fsf@HIDDEN>
 <87a6s7nngp.fsf@HIDDEN> <87sg5yekf6.fsf@HIDDEN>
 <875z074lf3.fsf@HIDDEN> <87r1iu6shx.fsf@HIDDEN>
 <871raurtyc.fsf@HIDDEN>
Date: Thu, 29 Apr 2021 00:37:12 +0300
In-Reply-To: <871raurtyc.fsf@HIDDEN> (Augusto Stoffel's message of "Wed, 28
 Apr 2021 23:16:11 +0200")
Message-ID: <871rau5br7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> But this change will cause a problem to me.  Usually, I type 'C-s'
>> several times with a non-empty search string to arrive to Nth occurrence.
>> Then to be able to continue the search with a shorter string, I remove
>> some characters from the search string with 'C-M-d' (isearch-del-char).
>> Then continue searching with 'C-s' from the same place.  But with the patch,
>> 'C-M-d' unexpectedly jumps to a previous match, and every next 'C-M-d'
>> jumps back it its previous match that makes no sense.
>
> I can verify this.  But I think you just found a related but independent
> issue.  Consider this example:
>
> (progn
>   (save-excursion (insert "a1 b2 a3"))
>   (isearch-mode t t)
>   (isearch-printing-char ?a)
>   (isearch-repeat-forward)
>   (isearch-printing-char ?\\)
>   (isearch-printing-char ?|)
>   (isearch-printing-char ?b))
>
> When "\\|b" is added to search string, the point is at "3".  So it
> shouldn't move, right?  But instead it goes back to "2".
>
> Do you get the same behavior?

I tested it in non-regexp mode, and the aforementioned use case is also
for non-regexp mode.

But in the regexp mode, maybe what you found is a bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 28 Apr 2021 21:16:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 28 17:16:21 2021
Received: from localhost ([127.0.0.1]:54217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lbrXh-00030T-Lo
	for submit <at> debbugs.gnu.org; Wed, 28 Apr 2021 17:16:21 -0400
Received: from mail-ej1-f53.google.com ([209.85.218.53]:35493)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1lbrXg-00030F-3B
 for 46469 <at> debbugs.gnu.org; Wed, 28 Apr 2021 17:16:20 -0400
Received: by mail-ej1-f53.google.com with SMTP id u17so96798914ejk.2
 for <46469 <at> debbugs.gnu.org>; Wed, 28 Apr 2021 14:16:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=KmqSl45w47YCzSf9syMs/jgQTMzj/OpkhqG1quT0xmA=;
 b=Qzqwv0/CL7ZBN/artmLT2Utq72hbWyKHzNzEqhI+tGbEJkAZ/fbEp7Til1R8ghDrvO
 Jx1gspZL77qelF8JQ+K+f8BltgLbm0L1KOpfFiWt+habc0TQaRaMl3cqtEQNplvFkegj
 F7m3/KvU4eSL/YRAjRNjU8lgDTqKesBK+sK6j35nh7BuN6hIsfyu71YABIV7CBcT8irF
 jGdxseDUVbW3VqH4Kl2OpW/2yQEmYt4nVUF6vAEXEdcrIJHT06MJOvr7X56x06yJG0O5
 WCGJ2EHED9aCUnQ+3069yELuH0aOmAucsfm3kn/XSQDHtsRlIwdZ+5WluunzBdiWlKPw
 P8hA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=KmqSl45w47YCzSf9syMs/jgQTMzj/OpkhqG1quT0xmA=;
 b=Fhbu4vbcVyhsAPUGsjCOmo6gP/a4vYkXcOlWSvq3mhkAjkxj3Xed8ePgF2nZzyZnuT
 kcmir/46t4+49OrjHWgOFIsZTfTSYWoJ5megZ4W2UegsXih8igxrQO0WZ3RFZZVtmYgG
 YD1yx41Shrg2+dQhWutEBUrhmLZ3Qxv/7SPo/pWyT9mVphCuWL3NUWrDF9NGbD3qlGxR
 UDaTIrBiutIAXN57lZq4z67wCxXmpPywFRPHwJOFQ4zkdr2121YPqyDNNu4n8qx4Rzd1
 pq79h8bDY6XfcuVuxWjOhnjSDJ6m5F9aX2Y43HATZob6LViEnjWodGNxd1yBXVHOV5ix
 CO5Q==
X-Gm-Message-State: AOAM533+NflYhdjMhFhezR9wqKz4nT45ZjacXRMsoBC9NalLWFseCfHe
 Udejkln+/ocT/qOXe+HN3uwNi5QM/uLRAA==
X-Google-Smtp-Source: ABdhPJxyGTZIcOrvBd2BOIIm0iedD4Z1iAx+84fsB0YIyWnFZNpmIMXBBrjC5+iDn4fcXP35x3yuLQ==
X-Received: by 2002:a17:906:d18a:: with SMTP id
 c10mr30858237ejz.271.1619644573868; 
 Wed, 28 Apr 2021 14:16:13 -0700 (PDT)
Received: from ars3 ([2a02:908:2211:8540::68a])
 by smtp.gmail.com with ESMTPSA id p2sm552191ejo.108.2021.04.28.14.16.12
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 28 Apr 2021 14:16:13 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN> <87eehjstt9.fsf@HIDDEN>
 <87a6s7nngp.fsf@HIDDEN> <87sg5yekf6.fsf@HIDDEN>
 <875z074lf3.fsf@HIDDEN> <87r1iu6shx.fsf@HIDDEN>
Date: Wed, 28 Apr 2021 23:16:11 +0200
In-Reply-To: <87r1iu6shx.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 28 Apr 2021 23:53:14 +0300")
Message-ID: <871raurtyc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> But this change will cause a problem to me.  Usually, I type 'C-s'
> several times with a non-empty search string to arrive to Nth occurrence.
> Then to be able to continue the search with a shorter string, I remove
> some characters from the search string with 'C-M-d' (isearch-del-char).
> Then continue searching with 'C-s' from the same place.  But with the patch,
> 'C-M-d' unexpectedly jumps to a previous match, and every next 'C-M-d'
> jumps back it its previous match that makes no sense.

I can verify this.  But I think you just found a related but independent
issue.  Consider this example:

(progn
  (save-excursion (insert "a1 b2 a3"))
  (isearch-mode t t)
  (isearch-printing-char ?a)
  (isearch-repeat-forward)
  (isearch-printing-char ?\\)
  (isearch-printing-char ?|)
  (isearch-printing-char ?b))

When "\\|b" is added to search string, the point is at "3".  So it
shouldn't move, right?  But instead it goes back to "2".

Do you get the same behavior?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 28 Apr 2021 20:55:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 28 16:55:41 2021
Received: from localhost ([127.0.0.1]:54203 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lbrDh-0000NQ-EL
	for submit <at> debbugs.gnu.org; Wed, 28 Apr 2021 16:55:41 -0400
Received: from relay10.mail.gandi.net ([217.70.178.230]:37077)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1lbrDf-0000N9-3R
 for 46469 <at> debbugs.gnu.org; Wed, 28 Apr 2021 16:55:40 -0400
Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166])
 (Authenticated sender: juri@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id 9D147240002;
 Wed, 28 Apr 2021 20:55:31 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
Organization: LINKOV.NET
References: <87zh09xggr.fsf@HIDDEN> <87eehjstt9.fsf@HIDDEN>
 <87a6s7nngp.fsf@HIDDEN> <87sg5yekf6.fsf@HIDDEN>
 <875z074lf3.fsf@HIDDEN>
Date: Wed, 28 Apr 2021 23:53:14 +0300
In-Reply-To: <875z074lf3.fsf@HIDDEN> (Augusto Stoffel's message of "Tue, 27
 Apr 2021 20:44:32 +0200")
Message-ID: <87r1iu6shx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> For the record, the search ring advance/retreat commands suffer from a
> bug similar to the `isearch-del-char' one described here.
>
> Namely, `C-s M-p M-p M-p' presumably takes you to the first match, after
> the starting point, of the third history element.  It would be very
> strange to expect that the result of this key sequence depends on the
> first and second history elements, or on the contents of the buffer
> beyond the first match of the third history element.
>
> And, in fact, everything is fine when `search-ring-update' is nil.
> However:
>
> (progn
>   (setq search-ring-update t

Your proposed change makes sense.  Since this is a non-default value
of search-ring-update, I'm not sure how the users who customized it to t
would like such change.

>> I tried again, but your patch still doesn't work.  With
>> It signals the error "Keyboard macro terminated by a command ringing the bell".
>
> Now I see, my old patch only worked in regexp mode (which is `C-s' for
> me).  The attached one seems to work (but this is subtle stuff, there
> may be edge cases).

Thanks, now it's clear why it didn't work when I tried.

But this change will cause a problem to me.  Usually, I type 'C-s'
several times with a non-empty search string to arrive to Nth occurrence.
Then to be able to continue the search with a shorter string, I remove
some characters from the search string with 'C-M-d' (isearch-del-char).
Then continue searching with 'C-s' from the same place.  But with the patch,
'C-M-d' unexpectedly jumps to a previous match, and every next 'C-M-d'
jumps back it its previous match that makes no sense.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 27 Apr 2021 18:44:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 27 14:44:42 2021
Received: from localhost ([127.0.0.1]:50885 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lbShO-0004bD-66
	for submit <at> debbugs.gnu.org; Tue, 27 Apr 2021 14:44:42 -0400
Received: from mail-ej1-f44.google.com ([209.85.218.44]:38826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1lbShN-0004b1-Ac
 for 46469 <at> debbugs.gnu.org; Tue, 27 Apr 2021 14:44:41 -0400
Received: by mail-ej1-f44.google.com with SMTP id r12so90933418ejr.5
 for <46469 <at> debbugs.gnu.org>; Tue, 27 Apr 2021 11:44:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=P/u9tsiFPXF4Bft9B/aQV7+J6QG91I/INhvhlJkYBfM=;
 b=ETljpMcRKe3UatrzLKHWSH5dRU2ud59tgxgHfYKEpMM69MnMd2Qo0yUZDovv76REr+
 +VVuzMNjaI+AtMTCuq9XEy1GOLFEOjCo6U1ce6+twl1zBaRUClLCXt1vZov22NSyNhOE
 niwWCryayidig3MUMYFBTg2eYNPUveHRMijtg4QgycIOShQLRRlLKRnliNsWhYw1lqxT
 b7h0CRqgSLlr4s+KgwxltWsxa7v5tsOrXAcVWFyZbvGLKmcJ23KgX11ZJhsi5Lxq9kE4
 W5+5QQtHQi/A0TJ2iHcExH0mHd/VhUhtpPjzWxP0TzfaQTqvV+GbYGLA/hJulIOfq+lh
 9LLw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=P/u9tsiFPXF4Bft9B/aQV7+J6QG91I/INhvhlJkYBfM=;
 b=JQ23GoqrbXNheiyasoP4JR5OH42NWx15GJf3OZg0Io9/BnS8tM2h6I7sCgbJm2lAzu
 ZYOorB5ei7yJqfamuHXYTiMoRyTQqHIkAIa6yt7gfX71dY6L/1QtWmz++DV0C+sL7nJV
 gLlhbDpI1jveaBiWSQWRVQMve0uN9e9ZjWzFmySgUMHO/LwWHOQAeW08wKRD+Cg3n5Ur
 bPtStbgxXIPL+D7CJYmGOMfcSgAzEM+6mPAZvNA/jvFLo90X7a3ogaoFWgmySXbTIbAn
 EmN0WHvaPt5x9spbcV7nGhAKqq35yRw+K3XqeUhS/Rhy8HQZyGqTrzbosSpPTlY6rSXa
 If7A==
X-Gm-Message-State: AOAM532lo+BIrX+h17R/0302DoeWmHivqTTPxYvGf2f5nzKjL48xi75A
 pBBgpO69YPMfuc4sd67pIfXBaGcw3zs=
X-Google-Smtp-Source: ABdhPJzOL7sdQ9TTxyuRxrlNgrAnw5BFIpqpOsxyvmxOeNzh6/Gy+QG+yNpnCBueY5vleyFH+rqhYA==
X-Received: by 2002:a17:906:590b:: with SMTP id
 h11mr12491865ejq.147.1619549075157; 
 Tue, 27 Apr 2021 11:44:35 -0700 (PDT)
Received: from ars3 ([2a02:908:2211:8540::68a])
 by smtp.gmail.com with ESMTPSA id sb20sm388519ejb.100.2021.04.27.11.44.34
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 27 Apr 2021 11:44:34 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN> <87eehjstt9.fsf@HIDDEN>
 <87a6s7nngp.fsf@HIDDEN> <87sg5yekf6.fsf@HIDDEN>
Date: Tue, 27 Apr 2021 20:44:32 +0200
In-Reply-To: <87sg5yekf6.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 14 Feb 2021 19:45:37 +0200")
Message-ID: <875z074lf3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

For the record, the search ring advance/retreat commands suffer from a
bug similar to the `isearch-del-char' one described here.

Namely, `C-s M-p M-p M-p' presumably takes you to the first match, after
the starting point, of the third history element.  It would be very
strange to expect that the result of this key sequence depends on the
first and second history elements, or on the contents of the buffer
beyond the first match of the third history element.

And, in fact, everything is fine when `search-ring-update' is nil.
However:
  
(progn
  (setq search-ring-update t
        search-ring '("1" "2" "3")
        search-ring-yank-pointer nil)
  (save-excursion
    (insert "expect point here -> 3 2 1 2 3 <- but instead get here"))
  (isearch-mode t)
  (isearch-ring-retreat)
  (isearch-ring-retreat)
  (isearch-ring-retreat))

On Sun, 14 Feb 2021 at 19:45, Juri Linkov <juri@HIDDEN> wrote:

> I tried again, but your patch still doesn't work.  With
>
> (progn
>   (define-key isearch-mode-map (kbd "DEL") 'isearch-del-char)
>   (execute-kbd-macro [?\C-s ?y backspace ?x ?1]))
> x1yx2
>
> It signals the error "Keyboard macro terminated by a command ringing the bell".

Now I see, my old patch only worked in regexp mode (which is `C-s' for
me).  The attached one seems to work (but this is subtle stuff, there
may be edge cases).


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-Make-isearch-del-char-backtrack-the-search-more-aggr.patch

From a29f3c0b2b43af6b9c283205643a1e2ac43030b7 Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <arstoffel@HIDDEN>
Date: Fri, 12 Feb 2021 19:37:14 +0100
Subject: [PATCH] Make `isearch-del-char' backtrack the search more
 aggressively

This allows to always find the first occurrence of the search string
after the last `isearch-repeat' or the start of search.
* lisp/isearch.el (isearch-del-char): Go to barrier before updating
the search.
---
 lisp/isearch.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9f3cfd70fb..f6a55c7918 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2505,13 +2505,12 @@ isearch-del-char
                                      isearch-string "")))
   ;; Do the following before moving point.
   (funcall (or isearch-message-function #'isearch-message) nil t)
-  ;; Use the isearch-other-end as new starting point to be able
-  ;; to find the remaining part of the search string again.
-  ;; This is like what `isearch-search-and-update' does,
-  ;; but currently it doesn't support deletion of characters
-  ;; for the case where unsuccessful search may become successful
-  ;; by deletion of characters.
-  (if isearch-other-end (goto-char isearch-other-end))
+  ;; Go to `isearch-barrier' to be able to find an earlier occurrence
+  ;; of the remaining part of the search string.
+  (if isearch-regexp
+      (isearch-fallback nil nil t)
+    (goto-char isearch-barrier)
+    (setq isearch-adjusted t))
   (isearch-search)
   (isearch-push-state)
   (isearch-update))
-- 
2.30.2


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 15 Feb 2021 19:41:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 15 14:41:12 2021
Received: from localhost ([127.0.0.1]:38745 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lBjk7-0003GF-GI
	for submit <at> debbugs.gnu.org; Mon, 15 Feb 2021 14:41:11 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43796)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lBjk5-0003G2-Dl
 for 46469 <at> debbugs.gnu.org; Mon, 15 Feb 2021 14:41:09 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35682)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lBjjz-0003db-H4; Mon, 15 Feb 2021 14:41:03 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4854
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lBjjy-0005E5-Hj; Mon, 15 Feb 2021 14:41:03 -0500
Date: Mon, 15 Feb 2021 21:41:05 +0200
Message-Id: <83eehh9l0u.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
In-Reply-To: <871rdhruuo.fsf@HIDDEN> (message from Augusto Stoffel on Mon, 
 15 Feb 2021 20:31:27 +0100)
Subject: Re: [External] : bug#46469: 27.1; `isearch-del-char' should move
 point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
 <87im6wxw11.fsf@HIDDEN> <838s7se42b.fsf@HIDDEN>
 <SA2PR10MB44743377C89D0D6012C7C030F38A9@HIDDEN>
 <83wnvbb9iq.fsf@HIDDEN> <878s7rnmm8.fsf@HIDDEN>
 <87wnvapmin.fsf@HIDDEN> <871rdhruuo.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org, drew.adams@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Augusto Stoffel <arstoffel@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  Drew Adams <drew.adams@HIDDEN>,
>   46469 <at> debbugs.gnu.org
> Date: Mon, 15 Feb 2021 20:31:27 +0100
> 
> In any case, I can add a defcustom (or a third independent command,
> which would be more or less equivalent) if anyone else has interest in
> this.  But since that doesn't seem to be case, I would rather take back
> my suggestion.

As I said, I have no objection to supporting this behavior as an
option, especially since you believe (and I have no reason to doubt)
that others could like it.  Please don't feel discouraged that both
Juri and myself don't share your preferences: we are just 2 people.

> My interest was to make Isearch a (very tiny) bit more user-friendly,
> but having 3 versions of delete would have the opposite effect, IMHO.
> I can live with the current one, even if it's suboptimal.

I don't think what you suggest is really a 3rd command, it's more like
a minor variant of one of the 2 existing commands.  So I see no reason
to withdraw your proposal, certainly not because of the above.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 15 Feb 2021 19:31:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 15 14:31:40 2021
Received: from localhost ([127.0.0.1]:38740 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lBjau-0002Kj-Go
	for submit <at> debbugs.gnu.org; Mon, 15 Feb 2021 14:31:40 -0500
Received: from mail-ej1-f48.google.com ([209.85.218.48]:40103)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1lBjap-0002D1-T1
 for 46469 <at> debbugs.gnu.org; Mon, 15 Feb 2021 14:31:39 -0500
Received: by mail-ej1-f48.google.com with SMTP id b14so7109345eju.7
 for <46469 <at> debbugs.gnu.org>; Mon, 15 Feb 2021 11:31:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=p7Qm7TYph8gZT6TK3gtpE3wGmKashBBL/fsR/YSnAq4=;
 b=nQc/O33iypOshwU2anU8pNPEM4QPT7VYNmXGkLwos9Yx+oFcqerwH/0/2P1v1Wo8Bl
 re7Ntrf0hwGtyQk/UkT0qJT09zlLhGV4zYlJBMvKSeu3vMZ2B9ORvFpc/NVk9f7krA4n
 zjv6z3ObQbIWdY0k6Jrwfsm+okc0Os+5FQHS4WpfsFCHdLYEXyMMbfgrCubqMlLsiBf/
 y8WSmKfqKkEjggBY+x+ZNFcwYSN+LWWzfDeO+W6lOHfUUeqkSQhm7ygTSJJ9t8NmfS4K
 gQYPAnMLrogs54uZCY2uQZFjyS9utA3niKTLt797okP6KvZrZYWRWp0fBbQl4LJydRSR
 T6Cg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=p7Qm7TYph8gZT6TK3gtpE3wGmKashBBL/fsR/YSnAq4=;
 b=LwFgPITomZnI3H0mkSfq8ND3/zGJEHFj6fGIXzCslmO+NIGURb+MpypAJKvKy28N6j
 pyLOfOLRJ0nHOzlywDdh8llAThWkCusb8UNHySqkLtE1MPF3sYJ1RFYHwy2J5XPjyqH2
 xH8CS/VyJi5Zc/p3DslmhutrIE98TsAuS/emZE/2LTjSn+9UOjomR2RSbGt7tEYXBCfE
 BLXUBGCchbCx0iidbST54OLfNn01jgz8yIJdxzP7eDiPuGPouspEM4y3IvJZmFe9Pn+8
 MxmfSru8z5tgPLkbm8Fm6ujt0MKK4omKjIT/XBYiHoCyRoqDrjDpNODNGvtBNxunf8ja
 FK2Q==
X-Gm-Message-State: AOAM530pQTH2lszdgIEczpHolzcuwzDYxTkKkpR7smfTmTvegEZIrutg
 w5OnMX7F5rkYCXV9QgymfUrT95VzjaE=
X-Google-Smtp-Source: ABdhPJxalwjaMgYxZ1NDu72qRfJcu5Ns26fAh5JN9d+835jWQP80VWOf1NWtXS09Kh6NdijFcp7r5w==
X-Received: by 2002:a17:906:4c90:: with SMTP id
 q16mr17759284eju.49.1613417489814; 
 Mon, 15 Feb 2021 11:31:29 -0800 (PST)
Received: from ars3 ([2a02:908:2211:8540::16e5])
 by smtp.gmail.com with ESMTPSA id kb25sm11277358ejc.19.2021.02.15.11.31.28
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 15 Feb 2021 11:31:29 -0800 (PST)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: [External] : bug#46469: 27.1; `isearch-del-char' should move
 point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
 <87im6wxw11.fsf@HIDDEN> <838s7se42b.fsf@HIDDEN>
 <SA2PR10MB44743377C89D0D6012C7C030F38A9@HIDDEN>
 <83wnvbb9iq.fsf@HIDDEN> <878s7rnmm8.fsf@HIDDEN>
 <87wnvapmin.fsf@HIDDEN>
Date: Mon, 15 Feb 2021 20:31:27 +0100
In-Reply-To: <87wnvapmin.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 14 Feb 2021 19:49:52 +0200")
Message-ID: <871rdhruuo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46469
Cc: Eli Zaretskii <eliz@HIDDEN>, 46469 <at> debbugs.gnu.org,
 Drew Adams <drew.adams@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, 14 Feb 2021 at 19:49, Juri Linkov <juri@HIDDEN> wrote:

> I wonder why you don't use `isearch-delete-char' in this case?
> It does exactly what you want - it undoes what you typed.

I've used `isearch-delete-char' for years and never really got used to
how it undoes a `C-s'.  It's too electric for me, somehow.

In any case, I can add a defcustom (or a third independent command,
which would be more or less equivalent) if anyone else has interest in
this.  But since that doesn't seem to be case, I would rather take back
my suggestion.

My interest was to make Isearch a (very tiny) bit more user-friendly,
but having 3 versions of delete would have the opposite effect, IMHO.
I can live with the current one, even if it's suboptimal.

Thanks,
Augusto




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 14 Feb 2021 17:53:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 14 12:53:45 2021
Received: from localhost ([127.0.0.1]:36650 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lBLaa-0000D1-QT
	for submit <at> debbugs.gnu.org; Sun, 14 Feb 2021 12:53:45 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:57585)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1lBLaY-0000Cn-Oy
 for 46469 <at> debbugs.gnu.org; Sun, 14 Feb 2021 12:53:43 -0500
X-Originating-IP: 91.129.108.204
Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204])
 (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id ADED340004;
 Sun, 14 Feb 2021 17:53:34 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: [External] : bug#46469: 27.1; `isearch-del-char' should move
 point further back
Organization: LINKOV.NET
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
 <87im6wxw11.fsf@HIDDEN> <838s7se42b.fsf@HIDDEN>
 <SA2PR10MB44743377C89D0D6012C7C030F38A9@HIDDEN>
 <83wnvbb9iq.fsf@HIDDEN> <878s7rnmm8.fsf@HIDDEN>
Date: Sun, 14 Feb 2021 19:49:52 +0200
In-Reply-To: <878s7rnmm8.fsf@HIDDEN> (Augusto Stoffel's message of "Sun, 14
 Feb 2021 08:18:23 +0100")
Message-ID: <87wnvapmin.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: Eli Zaretskii <eliz@HIDDEN>, 46469 <at> debbugs.gnu.org,
 Drew Adams <drew.adams@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> I mistype things, but I never hit ‘C-s’ by mistake.  So I want a way
> to undo just what I typed.  The current `iserach-del-char' does
> something slightly different.

I wonder why you don't use `isearch-delete-char' in this case?
It does exactly what you want - it undoes what you typed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 14 Feb 2021 17:53:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 14 12:53:36 2021
Received: from localhost ([127.0.0.1]:36647 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lBLaS-0000Cg-Ip
	for submit <at> debbugs.gnu.org; Sun, 14 Feb 2021 12:53:36 -0500
Received: from relay11.mail.gandi.net ([217.70.178.231]:53035)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1lBLaR-0000CT-2p
 for 46469 <at> debbugs.gnu.org; Sun, 14 Feb 2021 12:53:35 -0500
Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204])
 (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 6E5C2100007;
 Sun, 14 Feb 2021 17:53:26 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
Organization: LINKOV.NET
References: <87zh09xggr.fsf@HIDDEN> <87eehjstt9.fsf@HIDDEN>
 <87a6s7nngp.fsf@HIDDEN>
Date: Sun, 14 Feb 2021 19:45:37 +0200
In-Reply-To: <87a6s7nngp.fsf@HIDDEN> (Augusto Stoffel's message of "Sun, 14
 Feb 2021 08:00:06 +0100")
Message-ID: <87sg5yekf6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Anyway isearch-fallback in your patch does nothing.  Maybe you intended
>> to use isearch-pop-state, but this what isearch-delete-char already does.
>
> Please rest assured that the patch works, or at least works in all test
> cases I could come up with.  It implements the behavior I described in
> detail in my third message in this thread.
>
> Put in another way, the patch makes ‘C-s y DEL x’ pretty much equivalent
> to ‘C-s y☺\|x’, where DEL stands for `isearch-del-char' and ☺ stands for
> an unmatchable regexp.

I tried again, but your patch still doesn't work.  With

(progn
  (define-key isearch-mode-map (kbd "DEL") 'isearch-del-char)
  (execute-kbd-macro [?\C-s ?y backspace ?x ?1]))
x1yx2

It signals the error "Keyboard macro terminated by a command ringing the bell".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 14 Feb 2021 15:24:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 14 10:24:55 2021
Received: from localhost ([127.0.0.1]:36570 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lBJGZ-0004xH-Hi
	for submit <at> debbugs.gnu.org; Sun, 14 Feb 2021 10:24:55 -0500
Received: from eggs.gnu.org ([209.51.188.92]:47852)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lBJGY-0004x5-4A
 for 46469 <at> debbugs.gnu.org; Sun, 14 Feb 2021 10:24:54 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39837)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lBJGR-0002fH-7a; Sun, 14 Feb 2021 10:24:47 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3373
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lBJGQ-0001eb-ER; Sun, 14 Feb 2021 10:24:46 -0500
Date: Sun, 14 Feb 2021 17:24:47 +0200
Message-Id: <83v9aubrk0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
In-Reply-To: <878s7rnmm8.fsf@HIDDEN> (message from Augusto Stoffel on Sun, 
 14 Feb 2021 08:18:23 +0100)
Subject: Re: [External] : bug#46469: 27.1; `isearch-del-char' should move
 point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
 <87im6wxw11.fsf@HIDDEN> <838s7se42b.fsf@HIDDEN>
 <SA2PR10MB44743377C89D0D6012C7C030F38A9@HIDDEN>
 <83wnvbb9iq.fsf@HIDDEN> <878s7rnmm8.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org, drew.adams@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Augusto Stoffel <arstoffel@HIDDEN>
> Cc: Drew Adams <drew.adams@HIDDEN>,  Juri Linkov <juri@HIDDEN>,
>  46469 <at> debbugs.gnu.org
> Date: Sun, 14 Feb 2021 08:18:23 +0100
> 
> Re the idea that we can't change the behavior of an old command: if
> taken too seriously, this principle would imply that the standard Emacs
> UI can never improve

I didn't say that behavior of old commands cannot change, I said it
cannot change _unconditionally_.  That is, users should have a way to
revert to the old behavior.  It is generally preferable to make any
change in behavior opt-in; but even if we decide to make it the
default, there should be a way to go back.  That is because Emacs is a
very old and stable program, with users who are used to its present
behavior, and we try very hard not to break things that were working
for many years, nor change them in incompatible ways, since such
changes tend rightfully annoy veteran users.

In this particular case, whatever new aspects of the behavior you
suggest to add, they should be conditioned on a user option, and users
should be told in NEWS about the new behavior and the way to go back
to the old one (if the new one is made the default).

> Also, `isearch-del-char' changed from one obscure key to another
> obscure key in Emacs 27.  So clearly things can change.

It is IMO unfortunate that so many changes are happening lately in the
Isearch area regarding key bindings.  But that doesn't mean we should
make more changes there too lightly, let alone make them
unconditional.  At least keybindings can be easily undone on the user
level.

> Re this being a personal preference: I wouldn't bother to send a patch
> if I thought so.

"Personal preference" should not be interpreted to mean you are the
only person to prefer that.  Rather, it means that some people may
want that and some won't.  At least two people in this thread opined
that the existing behavior is fine, so clearly at least some people
would like to have the existing behavior.  Which doesn't mean what you
suggest doesn't have its place, it just means it isn't the only
opinion among Emacs users.

Where some users prefer one behavior and some prefer another, a user
option to control which behavior actually happens is a good way to
allow everyone to have what they want at a price of flipping a
variable.

> Is there a case where the current behavior is much more convenient
> and/or takes the search to a state that can't be easily reproduced by
> the patched version?

It is more convenient to me because I'm used to it: when I want to
remove the last character from the search string, I type DEL twice
without even looking.  I'm guessing there are others who have the same
habits.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 14 Feb 2021 07:18:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 14 02:18:33 2021
Received: from localhost ([127.0.0.1]:35404 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lBBfs-0003QJ-Pu
	for submit <at> debbugs.gnu.org; Sun, 14 Feb 2021 02:18:32 -0500
Received: from mail-ej1-f41.google.com ([209.85.218.41]:45866)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1lBBfq-0003Q7-Hp
 for 46469 <at> debbugs.gnu.org; Sun, 14 Feb 2021 02:18:31 -0500
Received: by mail-ej1-f41.google.com with SMTP id b9so6121812ejy.12
 for <46469 <at> debbugs.gnu.org>; Sat, 13 Feb 2021 23:18:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=VVWsKm7SzCfgjww9QfHE8DxyP00cZ9fAD103Dp4fnM4=;
 b=XFDdoj+xNQjfKJq9Ms2e0HRnNXNL8+LgeDyWNRcVgcSzQkA+hNJcz5GpYvQZdlK02x
 /rEmJgdbY+Q1U5PpD7qCIt5kjGN0RRuHhwtCdjym0lA/UiMdXaGUB28Ob7kRsbTMeVgY
 fDlOtJdHbin8TGGU91pjsAXO9EN2IWBNaP1MzF/XzzqVTHBT63VL/pcFQefWz23rmPex
 22kYPPevBxChMUIFoGJTavi5kePMmEyewGto6iMm9o7ALDz+VeeCExSUE8eAavBhuHf4
 PoTPgdpWfO9fBpaZy7kR7hKLp13mllXYKR18AxgMktvcVmNSIonuqBXKlzXqV5cqPHOe
 aP+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=VVWsKm7SzCfgjww9QfHE8DxyP00cZ9fAD103Dp4fnM4=;
 b=s4kn2GRvrb0kfMiicfyjJ/Z38qvF9eSwO7e3RNqMc7n9fca7k4pvKVpiIvL1IXYc28
 LwdFcX2klUvBJ+IzOignGPpFb5K53rscqRwNGt6wFfCFbktwgNkowNL9c1oQOQHERJ3G
 FcyRDV6byHiuhzQxNLjzZoZVaXhf7wBa3MmdoaTCThNO6S0J1125GV8UyjiIKjLquGuI
 nFlefNu3W3triZl0ZWJ4rfz/COne2W3sur2NQMZufReECzX3V43ZuygqGqDfNY8dZw5a
 wxMP11FfTw4blRNLN4uOY+RBWK3OS4Q5hpjVEcTIJ7cfs5QxkuC91HK5zgKj1k7a320M
 nkVw==
X-Gm-Message-State: AOAM532ofU7Ey197JWfMxE55Q+zPa0xbZG74ssSr/2f699sJuo+JHRHc
 YyXk931iRXtBpozTmvNz4tTqkl3bvwA=
X-Google-Smtp-Source: ABdhPJxqLDHQ7n01WEQS/10MITSwDCL5pq99CApJoSgXTweh3zzjg0kuXTxeA1JuEevFl/sAB//KYw==
X-Received: by 2002:a17:906:9b4f:: with SMTP id
 ep15mr10348620ejc.423.1613287104513; 
 Sat, 13 Feb 2021 23:18:24 -0800 (PST)
Received: from ars3 ([2a02:908:2211:8540::16e5])
 by smtp.gmail.com with ESMTPSA id q14sm8100504edw.52.2021.02.13.23.18.23
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 13 Feb 2021 23:18:24 -0800 (PST)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: [External] : bug#46469: 27.1; `isearch-del-char' should move
 point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
 <87im6wxw11.fsf@HIDDEN> <838s7se42b.fsf@HIDDEN>
 <SA2PR10MB44743377C89D0D6012C7C030F38A9@HIDDEN>
 <83wnvbb9iq.fsf@HIDDEN>
Date: Sun, 14 Feb 2021 08:18:23 +0100
In-Reply-To: <83wnvbb9iq.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 14 Feb
 2021 05:42:05 +0200")
Message-ID: <878s7rnmm8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org, Drew Adams <drew.adams@HIDDEN>,
 Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Re the idea that we can't change the behavior of an old command: if
taken too seriously, this principle would imply that the standard Emacs
UI can never improve; I'm glad this is not the case.  Also,
`isearch-del-char' changed from one obscure key to another obscure key
in Emacs 27.  So clearly things can change.

Re this being a personal preference: I wouldn't bother to send a patch
if I thought so.  As already mentioned, lots of programs copied Emacs's
incremental search, and apparently all changed how DEL works in a
similar way.  This indicates that the patched `isearch-del-char' is what
most people expect (but I'm not suggesting to bind it to DEL, just have
it around for those who want it).

With all that said, could we discuss the merits of the change itself?

If it has a real drawback in comparison with the current
`isearch-del-char', then it would be fine to add a defcustom.  But I
suspect that 3 alternative ways to delete characters from a search
string is a bit over the top.  We can probably come up with a solid
default behavior here.

I already explained my rationale for wanting the change: I mistype
things, but I never hit =E2=80=98C-s=E2=80=99 by mistake.  So I want a way =
to undo just
what I typed.  The current `iserach-del-char' does something slightly
different.  Refer to my third message in this thread for details.

Is there a case where the current behavior is much more convenient
and/or takes the search to a state that can't be easily reproduced by
the patched version?

Thanks,
Augusto




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 14 Feb 2021 07:00:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 14 02:00:20 2021
Received: from localhost ([127.0.0.1]:35398 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lBBOG-00030S-6P
	for submit <at> debbugs.gnu.org; Sun, 14 Feb 2021 02:00:20 -0500
Received: from mail-ej1-f44.google.com ([209.85.218.44]:43435)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1lBBOB-000307-3w
 for 46469 <at> debbugs.gnu.org; Sun, 14 Feb 2021 02:00:19 -0500
Received: by mail-ej1-f44.google.com with SMTP id y9so6105753ejp.10
 for <46469 <at> debbugs.gnu.org>; Sat, 13 Feb 2021 23:00:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=yFEbFKxL3ubHAHiyMcs7Wyg2JgwSo92ZTqeZon+8cM4=;
 b=TpnTww2pheT0xsiVHMI0/WvXttJGJDFYhbEBzEZTqR7DA5/VmC9vAexePVTMm9TYtU
 QRAhYba95ICaWrnuqateB+FPgV2ZPWkLA2VY6Scww9uMCty7uoVQXXRGCP0BNDDqXU8e
 B5tlP/6ALdxxjF9uk/YwKVY+y1D4uepxU/1hPb4iIJlx9n2es6tFwkg4bS+TcvQq0YiU
 sdEzuiAjOeKMmY8vdic/3jEgS6GlXvKmxcXYs9jmFTkezz7CP9jOyumIYafxBp6Rfddt
 31Vmjyjt1kwdRoaSkkTPZ3d+wz4w5fvOlhuqHhgQOOPwI2we8kIIJgRT6gYZl94vCkNa
 eg9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=yFEbFKxL3ubHAHiyMcs7Wyg2JgwSo92ZTqeZon+8cM4=;
 b=GQPchuJUGaxy72OSEc7XuHbCOUyIK+9XhY8ifUbwi/oU43IoejlSJ+GBQJoLyPapmU
 fYyaQXL3XZPOwD+58ii3Ca/uJ+Vu6DHFsTVrAN9NAlEYAvcdyIFv2x8ZtiG4FiNNoZ6v
 /FtBW7WPA2ZcKw/OoFjHT/cH3Z+CxbZgwOSsHPVjxLrCSZXeDN4ge26v7RowL+MfPKYt
 xmVBTorSNLvO+soJYYcsfRD1lQ4XA4VGU4USvkV3r3CnXPsDa1d5yInHGg3YX5EmIK/H
 yyeAIB200Y4TKtq05Vi1SFVEcxqTd1bgB580CuVlZEguJraQazwiZTNq4884Fg+WzORM
 DRJw==
X-Gm-Message-State: AOAM5323AxsVkUThJkeFKgYVL5j47IrR8Xc/39KzCmSVvZP4Jpj+m5DB
 3um8P8dkw2sVoCRcQLS+imF2ItPnvVY=
X-Google-Smtp-Source: ABdhPJyLNC4XI1Drw6Rvd4WPzvXQRahdRSgHY8pj9cUEQ7Fx4kmq5+mDo0zu1JPObHzHrqdWB6C+1Q==
X-Received: by 2002:a17:906:1944:: with SMTP id
 b4mr4143035eje.342.1613286008373; 
 Sat, 13 Feb 2021 23:00:08 -0800 (PST)
Received: from ars3 ([2a02:908:2211:8540::16e5])
 by smtp.gmail.com with ESMTPSA id s10sm8786951eja.26.2021.02.13.23.00.07
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 13 Feb 2021 23:00:07 -0800 (PST)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN> <87eehjstt9.fsf@HIDDEN>
Date: Sun, 14 Feb 2021 08:00:06 +0100
In-Reply-To: <87eehjstt9.fsf@HIDDEN> (Juri Linkov's message of "Sat, 
 13 Feb 2021 20:31:46 +0200")
Message-ID: <87a6s7nngp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Juri,

On Sat, 13 Feb 2021 at 20:31, Juri Linkov <juri@HIDDEN> wrote:

> Anyway isearch-fallback in your patch does nothing.  Maybe you intended
> to use isearch-pop-state, but this what isearch-delete-char already does.

Please rest assured that the patch works, or at least works in all test
cases I could come up with.  It implements the behavior I described in
detail in my third message in this thread.

Put in another way, the patch makes =E2=80=98C-s y DEL x=E2=80=99 pretty mu=
ch equivalent
to =E2=80=98C-s y=E2=98=BA\|x=E2=80=99, where DEL stands for `isearch-del-c=
har' and =E2=98=BA stands for
an unmatchable regexp.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 14 Feb 2021 03:42:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 13 22:42:18 2021
Received: from localhost ([127.0.0.1]:35323 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lB8Ic-0006LU-7S
	for submit <at> debbugs.gnu.org; Sat, 13 Feb 2021 22:42:18 -0500
Received: from eggs.gnu.org ([209.51.188.92]:51036)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lB8IY-0006LF-9c
 for 46469 <at> debbugs.gnu.org; Sat, 13 Feb 2021 22:42:16 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33531)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lB8IS-0002Hu-1Q; Sat, 13 Feb 2021 22:42:09 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3775
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lB8IP-0000yD-W7; Sat, 13 Feb 2021 22:42:07 -0500
Date: Sun, 14 Feb 2021 05:42:05 +0200
Message-Id: <83wnvbb9iq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
In-Reply-To: <SA2PR10MB44743377C89D0D6012C7C030F38A9@HIDDEN>
 (message from Drew Adams on Sat, 13 Feb 2021 23:14:48 +0000)
Subject: Re: [External] : bug#46469: 27.1; `isearch-del-char' should move
 point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
 <87im6wxw11.fsf@HIDDEN> <838s7se42b.fsf@HIDDEN> 
 <SA2PR10MB44743377C89D0D6012C7C030F38A9@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: arstoffel@HIDDEN, 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Drew Adams <drew.adams@HIDDEN>
> CC: "46469 <at> debbugs.gnu.org" <46469 <at> debbugs.gnu.org>
> Date: Sat, 13 Feb 2021 23:14:48 +0000
> Accept-Language: en-US
> 
> > If we are talking about personal preferences, then I suggest to make
> > your desired behavior an opt-in one by introducing a defcustom.  We
> > cannot change the behavior of isearch-del-char unconditionally if the
> > existing behavior is not a bug, but just something some users may not
> > like.
> 
> If we are talking about personal preferences
> (and I think that's the case), a user can just
> bind their preferred keys to their preferred
> commands in `isearch-mode-map'.

We were discussing a possible change to an existing commands.
Keybindings cannot change the commends to which they are bound.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 13 Feb 2021 23:15:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 13 18:15:05 2021
Received: from localhost ([127.0.0.1]:35211 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lB481-0008Ts-IK
	for submit <at> debbugs.gnu.org; Sat, 13 Feb 2021 18:15:05 -0500
Received: from userp2130.oracle.com ([156.151.31.86]:41804)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1lB47y-0008T6-Bw
 for 46469 <at> debbugs.gnu.org; Sat, 13 Feb 2021 18:15:04 -0500
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 11DNEu5Z022287;
 Sat, 13 Feb 2021 23:14:56 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2020-01-29;
 bh=Ri6zxWghHRMMl7T7xZ5s2dQ5xAh13pgC4Wrz4oDGMSM=;
 b=huYjLDgO1UQXHFmMQl8+91HJwP6aIxi+mZ42A8YC2zu6DaQVW8smep6VSyjOY+d/hjRC
 RnArZZ92w0QsmyiL+rl6EQT2h090yk6Xj+NDX/yuloyXFEV7qgNtqcQOxxsYJRQU0YK7
 I9XoAqUjkfIqNPwhsmW5WzyQASyWqK5HvOTDsrUQ109+9XzYMwy+0PaLesgosIL3vBN9
 hd3mjV0Q+jrpk+UTxR7rnBEOY6j33CrY3VAiefEWICmB1j7zewGDrR/DOr1/up/TWxwF
 tep25UN7I/QiIijPWY52GB4ICX23i/sk8hdyx62Esd3U1nUVylMruqNs8AiAZIFK9iq1 FA== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by userp2130.oracle.com with ESMTP id 36p66qs58k-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sat, 13 Feb 2021 23:14:55 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 11DN9mou134562;
 Sat, 13 Feb 2021 23:14:55 GMT
Received: from nam11-bn8-obe.outbound.protection.outlook.com
 (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171])
 by userp3030.oracle.com with ESMTP id 36p6d9dgh3-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sat, 13 Feb 2021 23:14:55 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=ldVamO29lPrJdkMOIXSkuLni57l6cTwzzbl9V7H+Eyo+4L88/p0GpgGd+amzFSPHgurfxQXGmFfewvWb6NZMNsdhnzv8qwsGvRzRgat8jRq163ygFQqELapOaNOJqjl0U3v61RWt9Hqs9aiEexkHdshOgcyjy8y05tOG+l2DPYvOgQkCV+bRZY2w4c8KMRcq7sgrlvL55tbIb91bT8gvOdllE8S35IrwBtR51/2qd9U1jirjQ3sVgU/LAUcMEJs0EuC+Z3D2SVm4IXsrY19MJ6Ek4f1gZLJX2ao2TMWW/T33EijZ4HKP0Hc6O2t4mvzBVq0WyDH2YwcEgRKX7S1usA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=Ri6zxWghHRMMl7T7xZ5s2dQ5xAh13pgC4Wrz4oDGMSM=;
 b=bFZpnAu2dNuyGyOkc7Dup7Oi3W3LcBwQxUlnAK3IQdyw4fNF08C7lvw7gf3P3qXCBwrqb3gqIIEJsH4+LHjbdph4YH6LSdaDzzJ2I/iY4NHd75jga6dDu8N5L7HS/qEo3IbH9lzmvBTHhQc+Zh9SVk8gSzOMAX/LJN4QwjogFGYupibzEEvDRhqWq3VPyGe4R2H0fxLeb1WoRMFJvfoLo2E4IVlYfBu5rbZf8O4M3UyEnLgx47ORhjl/wNXRGBZXii4R92RisLFhqipzziC6mNl+v9MQzY4V9BDIj5ltiio2pnfkkKix5vi9xBcsZVeE0e8ftstra9P4KhUYcvIoJQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=Ri6zxWghHRMMl7T7xZ5s2dQ5xAh13pgC4Wrz4oDGMSM=;
 b=nZQbwd8XnwgOGJA6MHxtYNXLohmXHAa63QbYWVB9XPb3zWxENwUuMNddjA1UIOQPDSUs9ciD5fDAgA8NBYsqUkanzxzm95q7m9ENgnMD+h3Rg//fmKV840UnYy3aCRUi83mA8ZR2ui/IRoXf9c7JaOnUabzOlIo87vvR2IlujY4=
Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15)
 by SN6PR10MB2734.namprd10.prod.outlook.com (2603:10b6:805:41::24)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Sat, 13 Feb
 2021 23:14:48 +0000
Received: from SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::b8d2:db6d:3e4b:d315]) by SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::b8d2:db6d:3e4b:d315%5]) with mapi id 15.20.3846.038; Sat, 13 Feb 2021
 23:14:48 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Augusto Stoffel <arstoffel@HIDDEN>
Subject: RE: [External] : bug#46469: 27.1; `isearch-del-char' should move
 point further back
Thread-Topic: [External] : bug#46469: 27.1; `isearch-del-char' should move
 point further back
Thread-Index: AQHXAeaj/4evZNRHkEKF6bbF1boUUapWt+WQ
Date: Sat, 13 Feb 2021 23:14:48 +0000
Message-ID: <SA2PR10MB44743377C89D0D6012C7C030F38A9@HIDDEN>
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
 <87im6wxw11.fsf@HIDDEN> <838s7se42b.fsf@HIDDEN>
In-Reply-To: <838s7se42b.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: gnu.org; dkim=none (message not signed)
 header.d=none;gnu.org; dmarc=none action=none header.from=oracle.com;
x-originating-ip: [73.170.83.28]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: d4c532c8-8b73-4f4b-92d9-08d8d075288b
x-ms-traffictypediagnostic: SN6PR10MB2734:
x-microsoft-antispam-prvs: <SN6PR10MB27348339D0F02F4653DEC0B5F38A9@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:7691;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 5r6xZNUG27e4k7UdjjXdRQVKoUz3nsC52W+lJGAS8ebCIdHAFhdSvaM31QwGO3O/JNUnwg8ZdFaY0m9LW6FJx1AYqaBYegjUMpKdfWiJ5YA9hlWFsrsK3WnoVAfB2fKdawgcqLFOca8F0+dOsFQKOHh3IPfQHDwe1i6zKLTupdXWYk6gm3BE/nJDY/Y2xoBHwZWNsDhjBf/kdvPryCC3TdVp0TqwIHkAXY4NgSZefwhoveDr4nuiln+unMTdpCgZyyknorlVAzNFEHiSb581SJXZU1jLqWZ6hDAsYvAND4Ylu0jTJskQ1JYk9hWgSwozZmMXXANsQlxi1rtg5l89ZlZ6x6qn9KAmhO9DhZBDZHVhyXJbvO94QE4h3zAltFmn03UqCQi7EdYyFlOOwn7yO9z35zvXbQFtKhMjbrUrk4mlaBTRLDftUcf3jNrQNZhZNBY5cwFTim6SWi749h2vbtt5RlJAKGF3Doz9epI4X5f2ebN9bhOjQItVxk4lNy3v9ZG0gVDfyJkI2xVLxslYKjjln0t/0mVw/GKhGXtWvqe7qMpBu/f7Pz6Eo5n4HLhg
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(346002)(366004)(376002)(396003)(136003)(39860400002)(66556008)(64756008)(6506007)(66446008)(66476007)(8936002)(44832011)(66946007)(76116006)(5660300002)(26005)(8676002)(55016002)(7696005)(316002)(478600001)(71200400001)(33656002)(86362001)(110136005)(186003)(9686003)(4744005)(4326008)(2906002)(52536014)(81973001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: =?utf-8?B?em9kc1g5Y1FHeXVVbXlWbk1HMVNNVzc0ajZaczhyejdCWkRsOTAralZmY3k2?=
 =?utf-8?B?QU1SbnNQY3pNRXgwVFFvTlRqS25INnB6L2R3NGh6OUYvdjBiTWZkUkMwdFdm?=
 =?utf-8?B?MHhta2ZOczlLODlGL1JPdTdwOUZGRVFycU0rcThUYTc1MjFRNGpxVHZTV0Q0?=
 =?utf-8?B?eFJaeis5NWtRWmd0ZHpLdXp2b3FyaUVaemY4ZVFaVURKOVVNOHNEWU5vcmFW?=
 =?utf-8?B?amwvN2QvaDUvMmF5YVZKYkxQUDlrdFdYbFE2RmhMdmQ2SEt5RldoRDN1eFYz?=
 =?utf-8?B?SEYzRGE5d3VPQzA0VXJ0RFAvd0RHdStqVUdKdDZrQVZPNmRpc3B1SEp5ZDNL?=
 =?utf-8?B?QmRwV3BDK2d0eFVaelpoanUyUU5WWEpRTlR4ZXFObWJ3bjUrQ1BYWk5KSGM0?=
 =?utf-8?B?eThTam1lTkEvQXdwNzlyWkFnbkxtbElySGtySDJyVzZEdlI3am0xZERSWnpZ?=
 =?utf-8?B?d3d2MUhNNDB0M3N6WlJZc1dzQllHMWExbXJYdEpLVENjVDY1UHNSRysxVUxo?=
 =?utf-8?B?YzB0UkxMeFM0YVBsMmE5eDhKa0k0RkdNYXpjOGVXaVZXc1N2aWMvSzNkVkcz?=
 =?utf-8?B?V1hLYlQ2ZWEyMmxDZE9EOXBGUmxmc2ZVK1g2QUxtc2RUc3VuU3FHTkpvZXZX?=
 =?utf-8?B?R0doMmQ2YklXa2tRaE5IVk9Zc3NUY2hSRzlnem1IQUFhK2Y2cVFuYk9YVG9h?=
 =?utf-8?B?RnNnRVQzYmdKQjlBR0J6bmVxMGFyaUlTV2dzcjZGR0ZCT1BZTW1XUGdzM2xV?=
 =?utf-8?B?QUtvK2lFQmZvUS8yTmhVYkhKZXpRT0ZBamFHSjNzYzluSjlVNTVMR1ExV1l5?=
 =?utf-8?B?RHZ5OENmK0V4ZHpzT0Jhcm9zTGtoMGRSWEx6cWdWWTlhN2VpaTg1UWNJSk1t?=
 =?utf-8?B?ZWc1UU84SjZEeEN2OHdGTG11aStTaXhYMEVlVGNhcGU2bjlpUExTME51bito?=
 =?utf-8?B?L29ZVkdlOFFLL1F2eTZLcmlOSTdlOHM4MStFUDdjMG9rQWJCUzMvZnFQNnIr?=
 =?utf-8?B?TG5BakxXNmErL3RtVkpqM053c2VsUGlJOXRzc0N3Z1grU1BMQlo1MGtma1dW?=
 =?utf-8?B?cUl5WTNPUzU4N3hhTXhEUlZzMmZvMVYwY3N3dVpXMHVjdmprbHg1UGFKcVh5?=
 =?utf-8?B?eUJ0Q2lvQk5JZWJ5SlpoaHB6eTllWk9RL3cybytEUTA5eldETjVhc2hXZnpT?=
 =?utf-8?B?U2Z2UnV0Njk5bEdnNndaWnhpOG1mVWc2RDhPcEdtSnhWSUQ2d0lHTngwNEZa?=
 =?utf-8?B?YkQvQkJhbWphdlFBVE1jS2hjaFlXaHJJQ21lMnE1T1ZTVndGc1VCU2ZKbFFP?=
 =?utf-8?B?M2Nwa2c1dzgxREVZSllrNUkweFJDMjlRcnVnQXRsOUljemlKaXl4Q3IzWCs4?=
 =?utf-8?B?aWxCUm5vNkxWM25OdktxM1dJVlFYQ2IyUGx4bTJ4OFp4MmMxM2J1K0VjR0Y0?=
 =?utf-8?B?U3FvdU51cEEwMVdCa1NISUpqSllPUDN0akVxSE9RR2ZsMEErVko1Nm9GRlNZ?=
 =?utf-8?B?c1dCOWF1Sm5mY2pHME0rUDZjVTRSbFBhVUpYVTA3K3hvN0VzVnBVWlM5dnUw?=
 =?utf-8?B?aVJRWVMyRjlXcFpXeUJvL1JHR1c0K0poNWhjUVpTSEpGY3JaRUZlalN2RTNn?=
 =?utf-8?B?MUdsdE4vVE96N1IrUnlicG9QVG1EbGRPcHdQcmYvRFBRemtBbGw0UUwwNVpx?=
 =?utf-8?B?MnZGYS9aWldtTUM1UHZKdHBJK2lDWGJHNHdGVStlRnRhOFFRT2JNVERpSmxG?=
 =?utf-8?Q?6YsWicJMyTION4+krGiymQKBQYCVnZrScyfaz0y?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: d4c532c8-8b73-4f4b-92d9-08d8d075288b
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2021 23:14:48.2165 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 6oekRrxl6+daq5U9pDdlPqRtktMeeOAUVSPpmIhreG8vWdSfhyQHFWd0NfWmbtT4BJ3WBKbapQ4pGFoHz5eB0g==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2734
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9894
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 phishscore=0 suspectscore=0
 mlxscore=0 malwarescore=0 bulkscore=0 mlxlogscore=926 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2102130212
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9894
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 lowpriorityscore=0 suspectscore=0
 impostorscore=0 priorityscore=1501 clxscore=1011 spamscore=0 mlxscore=0
 phishscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxlogscore=999
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2102130213
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 46469
Cc: "46469 <at> debbugs.gnu.org" <46469 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

PiBJZiB3ZSBhcmUgdGFsa2luZyBhYm91dCBwZXJzb25hbCBwcmVmZXJlbmNlcywgdGhlbiBJIHN1
Z2dlc3QgdG8gbWFrZQ0KPiB5b3VyIGRlc2lyZWQgYmVoYXZpb3IgYW4gb3B0LWluIG9uZSBieSBp
bnRyb2R1Y2luZyBhIGRlZmN1c3RvbS4gIFdlDQo+IGNhbm5vdCBjaGFuZ2UgdGhlIGJlaGF2aW9y
IG9mIGlzZWFyY2gtZGVsLWNoYXIgdW5jb25kaXRpb25hbGx5IGlmIHRoZQ0KPiBleGlzdGluZyBi
ZWhhdmlvciBpcyBub3QgYSBidWcsIGJ1dCBqdXN0IHNvbWV0aGluZyBzb21lIHVzZXJzIG1heSBu
b3QNCj4gbGlrZS4NCg0KSWYgd2UgYXJlIHRhbGtpbmcgYWJvdXQgcGVyc29uYWwgcHJlZmVyZW5j
ZXMNCihhbmQgSSB0aGluayB0aGF0J3MgdGhlIGNhc2UpLCBhIHVzZXIgY2FuIGp1c3QNCmJpbmQg
dGhlaXIgcHJlZmVycmVkIGtleXMgdG8gdGhlaXIgcHJlZmVycmVkDQpjb21tYW5kcyBpbiBgaXNl
YXJjaC1tb2RlLW1hcCcuDQo=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 13 Feb 2021 18:33:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 13 13:33:14 2021
Received: from localhost ([127.0.0.1]:35042 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lAzjG-0001kp-Hb
	for submit <at> debbugs.gnu.org; Sat, 13 Feb 2021 13:33:14 -0500
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:47853)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1lAzjD-0001k9-Mr
 for 46469 <at> debbugs.gnu.org; Sat, 13 Feb 2021 13:33:13 -0500
X-Originating-IP: 91.129.108.204
Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204])
 (Authenticated sender: juri@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 826C220004;
 Sat, 13 Feb 2021 18:33:03 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
Organization: LINKOV.NET
References: <87zh09xggr.fsf@HIDDEN>
Date: Sat, 13 Feb 2021 20:31:46 +0200
In-Reply-To: <87zh09xggr.fsf@HIDDEN> (Augusto Stoffel's message of "Fri, 12
 Feb 2021 19:56:36 +0100")
Message-ID: <87eehjstt9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Suppose my buffer contains the text "x1yx2" right after point, and that
> `isearch-del-char' is bound to DEL in Isearch mode.  If I type
>
>    C-s y DEL x1
>
> then I would expect the search to succeed: the cursor would first go
> after "y", then return to the starting point of search after pressing
> DEL – this is how `isearch-delete-char' behaves, anyway.
>
> Instead, the cursor remains after "y" after pressing DEL, and the search
> fails with the cursor after the second "x".  I have attached a patch to
> fix this.

Sorry, the reason for the current behavior is explained in the comments.
Anyway isearch-fallback in your patch does nothing.  Maybe you intended
to use isearch-pop-state, but this what isearch-delete-char already does.

> I have also attached a second trivial patch for an unrelated, very tiny
> bug.

Thanks, this fix is now pushed to master.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 13 Feb 2021 13:29:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 13 08:29:04 2021
Received: from localhost ([127.0.0.1]:33731 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lAuyu-0002PC-ID
	for submit <at> debbugs.gnu.org; Sat, 13 Feb 2021 08:29:04 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33946)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lAuyp-0002Oe-EP
 for 46469 <at> debbugs.gnu.org; Sat, 13 Feb 2021 08:29:02 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49294)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lAuyk-0007LW-3i; Sat, 13 Feb 2021 08:28:54 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2655
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lAuye-00039s-1N; Sat, 13 Feb 2021 08:28:49 -0500
Date: Sat, 13 Feb 2021 15:28:45 +0200
Message-Id: <83v9awcd0y.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
In-Reply-To: <87eehkxphz.fsf@HIDDEN> (message from Augusto Stoffel on Sat, 
 13 Feb 2021 10:53:44 +0100)
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
 <87im6wxw11.fsf@HIDDEN> <838s7se42b.fsf@HIDDEN> <87eehkxphz.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Augusto Stoffel <arstoffel@HIDDEN>
> Cc: 46469 <at> debbugs.gnu.org
> Date: Sat, 13 Feb 2021 10:53:44 +0100
> 
> As to this being just a personal preference: I'm sure you'll find people
> attached to the current behavior if you poll the mailing list, but let
> me note that, in other sensible search UIs, DEL works like the patched
> ‘isearch-del-char’.  I've just tested Swiper, gedit and zile.  They're
> all like the patched version.  I see no reason for a defcustom here.

I'm afraid we have no choice, since the current behavior is very old.
We cannot make incompatible behavior changes in such old commands
unconditionally.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 13 Feb 2021 09:53:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 13 04:53:58 2021
Received: from localhost ([127.0.0.1]:33569 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lArcj-0005HL-VK
	for submit <at> debbugs.gnu.org; Sat, 13 Feb 2021 04:53:58 -0500
Received: from mail-ej1-f46.google.com ([209.85.218.46]:41270)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1lArce-0005H4-H4
 for 46469 <at> debbugs.gnu.org; Sat, 13 Feb 2021 04:53:56 -0500
Received: by mail-ej1-f46.google.com with SMTP id f14so3357310ejc.8
 for <46469 <at> debbugs.gnu.org>; Sat, 13 Feb 2021 01:53:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=KLaEVk29IAxe92GUGLCAlMj7Wp/dOuKeELN/wUz0jlE=;
 b=HPMs8kUdgbXao1WrDJBDqImV+r1mUrRihD6ROX56+VZSEzaO/nVPy5HU4t5c2P00Ti
 dXiP6AXLr5y9+Bd/JGk7fNK4rNOAlNbLirB6Le0gnF2GMYg9weD6/vII37dPCb+ozgxB
 jP4WsxSbF0JESAXUY7Apx0PESnuWlX/uONv8ToKIDguNbxb0BclaD9cSaZSVVtgpmF3A
 /T8EW6L3kjGgDK5o+FZT0ztuoWepytBKKH0AFcz+Nh70XRFSlFu/CjcOdZAC3eGMEqTE
 oPWFw76mkHFs7PVaLL51vpCpN3I8g7S5pnhH9pu/AnbrXSixMqTRlVOn3r73qWrrgbzn
 hAvg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=KLaEVk29IAxe92GUGLCAlMj7Wp/dOuKeELN/wUz0jlE=;
 b=IMB5cCkHAhxGviZQbrwcZyd/qx5g9VwirhZV9yx61A36+HPLspkE1cWTTISQD8rzzh
 r6pQIR7vBpgWJPN1XKbgd/PoEV1fWkB3ow+bAKLHyombXYfJu1ne0F2D9JjX682HcEld
 hS/4lHAjT2fVFgtrUUhvG65ATgfnUSGs4IpNpylZ2YK/Vrmhwb5O9S+Wn9Lj3pb3jZEe
 D2isytqo/YBztKPO1mtc1xRtPU99t8r8AeIBefNjrJDN8QGh80JfAFg3kr6n6G6Vohoe
 9BHc8o8RfgRLEzDcBL+PBia1G5uSY//9BWgYapBi56+qj3jzwAQg/hs2g96rb0ZsLYMs
 3s1g==
X-Gm-Message-State: AOAM532NbV46B7tfYcAjCSYO9ODvqQg2pXcDGD35YR0iTqPwL+b3Sbj6
 +4buBO1ZcMQAW1VctpWzK2rcwhPLwkE=
X-Google-Smtp-Source: ABdhPJxexnq2vgjN3c/x0nnnliSX2+sQ2mVqVLd1YPkreCxZsjvqfGSHJTXO/i1tCNJpCjemn3y6Og==
X-Received: by 2002:a17:906:8690:: with SMTP id
 g16mr6773047ejx.113.1613210026276; 
 Sat, 13 Feb 2021 01:53:46 -0800 (PST)
Received: from ars3 ([2a02:908:2211:8540::16e5])
 by smtp.gmail.com with ESMTPSA id v20sm7015186edt.3.2021.02.13.01.53.45
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 13 Feb 2021 01:53:45 -0800 (PST)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
 <87im6wxw11.fsf@HIDDEN> <838s7se42b.fsf@HIDDEN>
Date: Sat, 13 Feb 2021 10:53:44 +0100
In-Reply-To: <838s7se42b.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 13 Feb
 2021 10:59:24 +0200")
Message-ID: <87eehkxphz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, 13 Feb 2021 at 10:59, Eli Zaretskii <eliz@HIDDEN> wrote:

> If we are talking about personal preferences, then I suggest to make
> your desired behavior an opt-in one by introducing a defcustom.  We
> cannot change the behavior of isearch-del-char unconditionally if the
> existing behavior is not a bug, but just something some users may not
> like.

In this case, the distinction between being buggy or just weird and not
very useful is a bit blurry.  Let me note, however (assuming here that
DEL is bound to =E2=80=98isearch-del-char=E2=80=99):

1) The patched `isearch-del-char' serves the purpose of undoing
something you typed by mistake.  The result of =E2=80=98C-s y DEL x=E2=80=
=99 is
equivalent to the result of =E2=80=98C-s x=E2=80=99.  Just like, in normal =
editing,
typing =E2=80=98x DEL y=E2=80=99 is equivalent to typing =E2=80=98y=E2=80=
=99.

2) The current `isearch-del-char' serves a different purpose altogether.
=E2=80=98C-s y DEL x=E2=80=99 is equivalent to =E2=80=98C-s y RET C-s x=E2=
=80=99, i.e., you are
searching for an =E2=80=98x=E2=80=99 occurring after an =E2=80=98y=E2=80=99.

As to this being just a personal preference: I'm sure you'll find people
attached to the current behavior if you poll the mailing list, but let
me note that, in other sensible search UIs, DEL works like the patched
=E2=80=98isearch-del-char=E2=80=99.  I've just tested Swiper, gedit and zil=
e.  They're
all like the patched version.  I see no reason for a defcustom here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 13 Feb 2021 08:59:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 13 03:59:37 2021
Received: from localhost ([127.0.0.1]:33539 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lAqm8-0003xP-WA
	for submit <at> debbugs.gnu.org; Sat, 13 Feb 2021 03:59:37 -0500
Received: from eggs.gnu.org ([209.51.188.92]:45962)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lAqm4-0003x5-Ua
 for 46469 <at> debbugs.gnu.org; Sat, 13 Feb 2021 03:59:36 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45475)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lAqlz-0007he-MI; Sat, 13 Feb 2021 03:59:27 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1723
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lAqlx-0005Ri-N8; Sat, 13 Feb 2021 03:59:26 -0500
Date: Sat, 13 Feb 2021 10:59:24 +0200
Message-Id: <838s7se42b.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
In-Reply-To: <87im6wxw11.fsf@HIDDEN> (message from Augusto Stoffel on Sat, 
 13 Feb 2021 08:32:42 +0100)
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN> <87im6wxw11.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Augusto Stoffel <arstoffel@HIDDEN>
> Cc: 46469 <at> debbugs.gnu.org
> Date: Sat, 13 Feb 2021 08:32:42 +0100
> 
> On Sat, 13 Feb 2021 at 09:04, Eli Zaretskii <eliz@HIDDEN> wrote:
> 
> > For isearch-del-char, I think what you see is the intended behavior:
> > that command doesn't undo the effect of the last character you type at
> > the I-search prompt, it just removes the last character of the search
> > string.  So it isn't supposed to move point back to where the search
> > started.  What you wanted to happen is what isearch-delete-char does.
> >
> > OK?
> 
> No, isearch-delete-char is a misnamed command.

I could agree with that, but it's a tangent.

> It undoes the last isearch command, which is typically inserting a
> character OR going to the next/previous match.  If you type ‘C-s y
> C-s DEL’ in emacs -q, the search string is still y.

That's true; you need to type DEL twice to actually remove the last
character.  But that's how that command was supposed to work, and it
does make sense to me, at least.

> I frankly think DEL should be isearch-del-char by default.  I never got
> used to isearch-delete-char in many years before finding out about
> isearch-del-char.  But that's besides the point.
> 
> As to why the patched version of isearch-delete-char is the "expected"
> or more useful one: this is to a degree a matter of taste, but I can
> give my reasons if you are still not convinced.

If we are talking about personal preferences, then I suggest to make
your desired behavior an opt-in one by introducing a defcustom.  We
cannot change the behavior of isearch-del-char unconditionally if the
existing behavior is not a bug, but just something some users may not
like.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 13 Feb 2021 07:32:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 13 02:32:54 2021
Received: from localhost ([127.0.0.1]:33468 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lApQE-0001ll-A8
	for submit <at> debbugs.gnu.org; Sat, 13 Feb 2021 02:32:54 -0500
Received: from mail-ed1-f50.google.com ([209.85.208.50]:32912)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1lApQB-0001lX-E4
 for 46469 <at> debbugs.gnu.org; Sat, 13 Feb 2021 02:32:53 -0500
Received: by mail-ed1-f50.google.com with SMTP id c6so2458487ede.0
 for <46469 <at> debbugs.gnu.org>; Fri, 12 Feb 2021 23:32:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=lzEKVBab14uC6EclgZ6DJ3DTqKffGd8AYv0oNwU3/dY=;
 b=PIcvYNKhk+FpVhFke1swphKm4iroceRxQVd2cac2bOCxmbLwC5GN6BuMPvHyEGY20P
 1YKvDL6vvLc3TYwxH7xY+HKSZ3/EM9zUwnMrM2SjNToKzNUfsAffejMh1s/FnFUJ3iJ3
 uEK9YwZtlNaVEW6ILp3GPxSB5vyYpk00DiMe2Cxg+cnkZem0fEj6KMFBHkiC7ET66qqN
 gNFeqTd1ECsDoIPWy15cyyZz+cVTn+yWjy/LuSNk580WsaKbX1M52CCOZTeTNlowoAM8
 oz5IndEMPXNFJk0I5VSY47hR0eoOGX4RorIPkXFrkGtnQoo78VPEAxLWsga/4Unjo0bM
 KBQQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=lzEKVBab14uC6EclgZ6DJ3DTqKffGd8AYv0oNwU3/dY=;
 b=EUIM5IGyRb4dFgg1BH6tfQd4istGNoxJUSl7VkdU592qWhjzajrZiro4LHTYi/f3kx
 yTG6zOGv3IVet4WQKkunP6ZWjSYYcN/GOHNhFU5obmzhHpK7rtW7r75IXo9jex7jlXq2
 ROFVnQXJ548yCKA2F/Iv5FR1dY0eDXnc8kqyEiPaLzTTk9FOykZkRGjv6bvIvYf0zuKT
 a8TNsUUu4TKpK7CgubhfdJEs1+JVzIYXjx10HqtDoQiaL9MH4jiP7TRaeXJ9zFcfGNBW
 8uOR5SbqvmHrlHMHP0ASP/GGxnU7NtT3bzdT/lsE/JvVcAWbJWX5gMI/glbDG0bKzX6h
 swMg==
X-Gm-Message-State: AOAM531PoEZwug0PRfAOW4C6ptfWWswcCkioGcAz2oFidqL1nxEPU3Zq
 ROGUQd5CdWBp8iQlSOd5rG/PqDUsnOg=
X-Google-Smtp-Source: ABdhPJyE2GQZ636Tzrb93Mt1X62ttam0q08CINH//6mJBEtK84FuuEoauX1AksNQ5/Hbs/d9zQ8hdw==
X-Received: by 2002:aa7:db16:: with SMTP id t22mr6681728eds.301.1613201565202; 
 Fri, 12 Feb 2021 23:32:45 -0800 (PST)
Received: from ars3 ([2a02:908:2211:8540::16e5])
 by smtp.gmail.com with ESMTPSA id s14sm7415201ejf.47.2021.02.12.23.32.42
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 12 Feb 2021 23:32:43 -0800 (PST)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN> <83r1lke9dc.fsf@HIDDEN>
Date: Sat, 13 Feb 2021 08:32:42 +0100
In-Reply-To: <83r1lke9dc.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 13 Feb
 2021 09:04:47 +0200")
Message-ID: <87im6wxw11.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, 13 Feb 2021 at 09:04, Eli Zaretskii <eliz@HIDDEN> wrote:

> For isearch-del-char, I think what you see is the intended behavior:
> that command doesn't undo the effect of the last character you type at
> the I-search prompt, it just removes the last character of the search
> string.  So it isn't supposed to move point back to where the search
> started.  What you wanted to happen is what isearch-delete-char does.
>
> OK?

No, isearch-delete-char is a misnamed command.  It undoes the last
isearch command, which is typically inserting a character OR going to
the next/previous match.  If you type =E2=80=98C-s y C-s DEL=E2=80=99 in em=
acs -q, the
search string is still y.

I frankly think DEL should be isearch-del-char by default.  I never got
used to isearch-delete-char in many years before finding out about
isearch-del-char.  But that's besides the point.

As to why the patched version of isearch-delete-char is the "expected"
or more useful one: this is to a degree a matter of taste, but I can
give my reasons if you are still not convinced.

Best,
Augusto




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 13 Feb 2021 07:04:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 13 02:04:59 2021
Received: from localhost ([127.0.0.1]:33436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lAozD-00013s-GP
	for submit <at> debbugs.gnu.org; Sat, 13 Feb 2021 02:04:59 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33284)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lAozB-00013d-2r
 for 46469 <at> debbugs.gnu.org; Sat, 13 Feb 2021 02:04:58 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44590)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lAoz5-00046r-Gf; Sat, 13 Feb 2021 02:04:51 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2576
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lAoz4-00088J-7e; Sat, 13 Feb 2021 02:04:51 -0500
Date: Sat, 13 Feb 2021 09:04:47 +0200
Message-Id: <83r1lke9dc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
In-Reply-To: <87mtw9xckr.fsf@HIDDEN> (message from Augusto Stoffel on Fri, 
 12 Feb 2021 21:20:36 +0100)
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
 <87mtw9xckr.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Augusto Stoffel <arstoffel@HIDDEN>
> Cc: 46469 <at> debbugs.gnu.org
> Date: Fri, 12 Feb 2021 21:20:36 +0100
> 
> On Fri, 12 Feb 2021 at 22:00, Eli Zaretskii <eliz@HIDDEN> wrote:
> 
> > I cannot reproduce this.  Do you see this in "emacs -Q"?
> 
> Could you try hitting ‘C-x C-e’ with the point at the beginning of the
> fourth line of the following text?
> 
> (progn
>   (define-key isearch-mode-map (kbd "DEL") 'isearch-del-char)
>   (execute-kbd-macro [?\C-s ?y backspace ?x ?1]))
> x1yx2
> 
> In "emacs -Q" I get the error message "Keyboard macro terminated by a
> command ringing the bell".
> 
> With my patch, there's no error and the point ends on "y", as expected.

I think I understand the issue now: you meant isearch-del-char,
whereas I thought you meant isearch-delete-char (which is bound to DEL
by default).  Sorry, I was reading the body of your report and didn't
pay attention to the Subject.

For isearch-del-char, I think what you see is the intended behavior:
that command doesn't undo the effect of the last character you type at
the I-search prompt, it just removes the last character of the search
string.  So it isn't supposed to move point back to where the search
started.  What you wanted to happen is what isearch-delete-char does.

OK?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 12 Feb 2021 20:20:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 12 15:20:47 2021
Received: from localhost ([127.0.0.1]:33052 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lAevm-0002IR-RM
	for submit <at> debbugs.gnu.org; Fri, 12 Feb 2021 15:20:47 -0500
Received: from mail-ej1-f52.google.com ([209.85.218.52]:44541)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1lAevk-0002IC-9D
 for 46469 <at> debbugs.gnu.org; Fri, 12 Feb 2021 15:20:45 -0500
Received: by mail-ej1-f52.google.com with SMTP id w1so1142592ejf.11
 for <46469 <at> debbugs.gnu.org>; Fri, 12 Feb 2021 12:20:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=IveDmDj6kJdUb1FZeLnWieHu5Gtpj+G5Qs5bzdsxazw=;
 b=NY9HeBVbw/APmtUWzqD4JbbF8kz7a+RFd451G1hjcLKEWmqBp6I2KzY734tSSLeFbC
 /zdIn6wilsNp1rG1PO3MnRmzfzvmvx+G05kW8b+AhITYtlbm/Xnbf4XHagkOmcQy5Gya
 2yvF4tW+AmHy7uDIf7DaDpO9Waa7JO/WCBdXJogUF0th1VUCQiQ3avMUbdSt7nsLMrV0
 zWH5i9HL/276V4El4d8Tnroc7dbmO2jc5+UUuNaN0+bfqFFf8JnoSn7pD8mL+rWwyM29
 bAuCudNPZ5kT+sphcmFWegEYf7O99eze4jLJ+VnNfLX9iCZilFY/ucUccFAtIAbh1Y4Z
 ACyQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=IveDmDj6kJdUb1FZeLnWieHu5Gtpj+G5Qs5bzdsxazw=;
 b=Fc4u5HKpt9BWHTz0N9tfDrs/TBS7goxSi8Dn2hmfeLWQFCTk1ZM8RU0rIYk3CIz1xL
 ub/JpMjQc+oKHO2XiElqpg18EtD+vS+amlVCS457b0mU4sB5jqAhAMcGeY7SMkXrTLu5
 GZtlqxrQoHt/QJbuODkVkLzmwfBMY0cVOU3JK+p1Dd352c6+jO3kVHQA07HUbFkonRdh
 0kGHGu7lDY+OC+Qeyi2/O9AzJIGXIJ2VgegWGWfbZ8UjJYHfS5QMSgtwa+/LZUtLMttc
 WZJRanQ7S44RgmbDlQpAbWCa42jYs3UUQ9OvSzhDwxp+9NfFJMYZ0WRSRFO4je5/eOXr
 xGjg==
X-Gm-Message-State: AOAM532PJ3qYHT+s6nCeemLUy9nRe5mS1omS0myunILwIbWKfV5H61lR
 7HVb3PyhN7XXRI1NWoPWFaBkICzgYYc=
X-Google-Smtp-Source: ABdhPJx5yROwt24tdu2S9oBllouF/+ZvgOhL6D9tsuZ9nHbMYvO9Muwc5sUEJuwKKbTeXboRE41URw==
X-Received: by 2002:a17:906:b284:: with SMTP id
 q4mr4597307ejz.507.1613161238098; 
 Fri, 12 Feb 2021 12:20:38 -0800 (PST)
Received: from ars3 ([2a02:908:2211:8540::16e5])
 by smtp.gmail.com with ESMTPSA id b2sm6441067edk.11.2021.02.12.12.20.37
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 12 Feb 2021 12:20:37 -0800 (PST)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN> <83v9axdpkm.fsf@HIDDEN>
Date: Fri, 12 Feb 2021 21:20:36 +0100
In-Reply-To: <83v9axdpkm.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 12 Feb
 2021 22:00:09 +0200")
Message-ID: <87mtw9xckr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, 12 Feb 2021 at 22:00, Eli Zaretskii <eliz@HIDDEN> wrote:

> I cannot reproduce this.  Do you see this in "emacs -Q"?

Could you try hitting =E2=80=98C-x C-e=E2=80=99 with the point at the begin=
ning of the
fourth line of the following text?

(progn
  (define-key isearch-mode-map (kbd "DEL") 'isearch-del-char)
  (execute-kbd-macro [?\C-s ?y backspace ?x ?1]))
x1yx2

In "emacs -Q" I get the error message "Keyboard macro terminated by a
command ringing the bell".

With my patch, there's no error and the point ends on "y", as expected.

Best,
Augusto




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at 46469 <at> debbugs.gnu.org:


Received: (at 46469) by debbugs.gnu.org; 12 Feb 2021 20:00:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 12 15:00:13 2021
Received: from localhost ([127.0.0.1]:33041 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lAebs-0001qa-PD
	for submit <at> debbugs.gnu.org; Fri, 12 Feb 2021 15:00:13 -0500
Received: from eggs.gnu.org ([209.51.188.92]:37010)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lAebp-0001pJ-Si
 for 46469 <at> debbugs.gnu.org; Fri, 12 Feb 2021 15:00:11 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59348)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lAebk-0005HY-Hr; Fri, 12 Feb 2021 15:00:04 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1517
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lAebi-0004pi-N0; Fri, 12 Feb 2021 15:00:03 -0500
Date: Fri, 12 Feb 2021 22:00:09 +0200
Message-Id: <83v9axdpkm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
In-Reply-To: <87zh09xggr.fsf@HIDDEN> (message from Augusto Stoffel on Fri, 
 12 Feb 2021 19:56:36 +0100)
Subject: Re: bug#46469: 27.1; `isearch-del-char' should move point further back
References: <87zh09xggr.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 46469
Cc: 46469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Augusto Stoffel <arstoffel@HIDDEN>
> Date: Fri, 12 Feb 2021 19:56:36 +0100
> 
> Suppose my buffer contains the text "x1yx2" right after point, and that
> `isearch-del-char' is bound to DEL in Isearch mode.  If I type
> 
>    C-s y DEL x1
> 
> then I would expect the search to succeed: the cursor would first go
> after "y", then return to the starting point of search after pressing
> DEL – this is how `isearch-delete-char' behaves, anyway.
> 
> Instead, the cursor remains after "y" after pressing DEL, and the search
> fails with the cursor after the second "x".  I have attached a patch to
> fix this.

I cannot reproduce this.  Do you see this in "emacs -Q"?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Feb 2021 19:22:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 12 14:22:53 2021
Received: from localhost ([127.0.0.1]:33010 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lAe1h-0000xl-PB
	for submit <at> debbugs.gnu.org; Fri, 12 Feb 2021 14:22:53 -0500
Received: from lists.gnu.org ([209.51.188.17]:60794)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1lAdcZ-0000JU-LA
 for submit <at> debbugs.gnu.org; Fri, 12 Feb 2021 13:56:52 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:41026)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1lAdcQ-0000VG-R6
 for bug-gnu-emacs@HIDDEN; Fri, 12 Feb 2021 13:56:51 -0500
Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:36495)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1lAdcO-0002R0-Ey
 for bug-gnu-emacs@HIDDEN; Fri, 12 Feb 2021 13:56:42 -0500
Received: by mail-ed1-x529.google.com with SMTP id l12so944480edt.3
 for <bug-gnu-emacs@HIDDEN>; Fri, 12 Feb 2021 10:56:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version;
 bh=q4W5umixj239FlUBKZ1GKDBhRiBmCoNnLJtH09Niv+Q=;
 b=eu3+2yjQ5hODf8rnxP2OS4Sli26ek0SSDIZpcAc7F2dHgdxeb5IdOpW1CNOLNe5Wyx
 XnoULxhi/5VYn0mYHfRXMqrCo2TLo4/05evayC+x8zeKgCP25Kqy485fsuB8OWkfyov1
 GVNG7ww5tTgn2j6W6Bs31KESHUYC3rvTtkMcRIVJsrPMFR73dRx8H1btrjl8xK/sYlI6
 ZUcwBtDbaGwz5I5efWKpU6WzkIgRVVSVCtLQlf8nNXnwyaQ24HR1C2qFpi3aAKcqSNaP
 CZ04tV8trMrdEeFMaDDYdG/cnW2xmDMIx/AHeU1gxpVpwdp2g9an29D65+mZyScvrQCe
 NKXw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=q4W5umixj239FlUBKZ1GKDBhRiBmCoNnLJtH09Niv+Q=;
 b=UgXERc5Ew7IPi/RB59oXQ9C6aZ/KiyBy7omL78jI0amdsvomXJHuLeqQ8bVmOSBRgb
 /cg3unB+5sW+H4mR3/F0DcmCV3rXbpSF+rd4V5iKbjoW8BfWYp0eJu+SauNSoBIDfPeg
 Cb5AAFUzCn9IOMBCKpvkn+ZG3/dDK0hrRzBL49FBZYI/EvPFsYVmx8HcIBc3GPkHGdx7
 nIDC9FwVIoPCLmGUuGnaxdii3e1YEkfsWB85+akI692QAm/0HVsfZNLIv0pjeZV9QRjP
 WMTSDML3jgjHyBTbLBIFzeZvbKUrFdWiAkNOKIaPyoz0hh9W7XEYxWjrmYua4Vv1SYPL
 uFNg==
X-Gm-Message-State: AOAM5315P1AMTtXR8ee3CNXqWdlBjyMdl1xGk9qAGIUYuuFTEXZdIjca
 ek9+DObjkyi00E/6d0W+hkSCohwi1ac=
X-Google-Smtp-Source: ABdhPJy3pp+ubpQKVYB3QcApIuYdz25HbLpd6Ivc+dc7tEae7Ms9Lq+/i+EddFC3q96pBplcEmh2aQ==
X-Received: by 2002:a05:6402:31a3:: with SMTP id
 dj3mr4717540edb.172.1613156197801; 
 Fri, 12 Feb 2021 10:56:37 -0800 (PST)
Received: from ars3 ([2a02:908:2211:8540::16e5])
 by smtp.gmail.com with ESMTPSA id z2sm6636335ejd.44.2021.02.12.10.56.37
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 12 Feb 2021 10:56:37 -0800 (PST)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.1; `isearch-del-char' should move point further back
Date: Fri, 12 Feb 2021 19:56:36 +0100
Message-ID: <87zh09xggr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2a00:1450:4864:20::529;
 envelope-from=arstoffel@HIDDEN; helo=mail-ed1-x529.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 12 Feb 2021 14:22:48 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Suppose my buffer contains the text "x1yx2" right after point, and that
`isearch-del-char' is bound to DEL in Isearch mode.  If I type

   C-s y DEL x1

then I would expect the search to succeed: the cursor would first go
after "y", then return to the starting point of search after pressing
DEL =E2=80=93 this is how `isearch-delete-char' behaves, anyway.

Instead, the cursor remains after "y" after pressing DEL, and the search
fails with the cursor after the second "x".  I have attached a patch to
fix this.

I have also attached a second trivial patch for an unrelated, very tiny
bug.

Best,
Augusto


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0002-Make-isearch-del-char-backtrack-the-search-more-aggr.patch

From 1b1fad0d106390d907a805c9e8c81dd9831b5e1e Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <arstoffel@HIDDEN>
Date: Fri, 12 Feb 2021 19:37:14 +0100
Subject: [PATCH 2/2] Make `isearch-del-char' backtrack the search more
 aggressively

This allows to always find the first occurrence of the search string
after the last `isearch-repeat' or the start of search.
* lisp/isearch.el (isearch-del-char): Call `isearch-fallback' before
updating the search.
---
 lisp/isearch.el | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index aae4aeb261..b9c4cd2a65 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2475,13 +2475,9 @@ isearch-del-char
                                      isearch-string "")))
   ;; Do the following before moving point.
   (funcall (or isearch-message-function #'isearch-message) nil t)
-  ;; Use the isearch-other-end as new starting point to be able
-  ;; to find the remaining part of the search string again.
-  ;; This is like what `isearch-search-and-update' does,
-  ;; but currently it doesn't support deletion of characters
-  ;; for the case where unsuccessful search may become successful
-  ;; by deletion of characters.
-  (if isearch-other-end (goto-char isearch-other-end))
+  ;; Use `isearch-fallback' to be able to find an earlier occurrence
+  ;; of the remaining part of the search string.
+  (isearch-fallback nil nil t)
   (isearch-search)
   (isearch-push-state)
   (isearch-update))
-- 
2.29.2


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Small-correction-to-isearch-lazy-highlight-buffer-up.patch

From 3707102e4a87ae31105ca1dc71f0f1c349ed806f Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <arstoffel@HIDDEN>
Date: Fri, 12 Feb 2021 19:29:54 +0100
Subject: [PATCH 1/2] Small correction to
 `isearch-lazy-highlight-buffer-update'

The value of point is now read after a potential change of buffer.
* lisp/isearch.el (isearch-lazy-highlight-buffer-update): move call
to `point' after `select-window'.
---
 lisp/isearch.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index b58ca8a6f7..aae4aeb261 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -4127,13 +4127,13 @@ isearch-lazy-highlight-buffer-update
   "Update highlighting of other matches in the full buffer."
   (let ((max lazy-highlight-buffer-max-at-a-time)
         (looping t)
-        nomore window-start window-end
-        (opoint (point)))
+        nomore window-start window-end opoint)
     (with-local-quit
       (save-selected-window
 	(if (and (window-live-p isearch-lazy-highlight-window)
 		 (not (memq (selected-window) isearch-lazy-highlight-window-group)))
 	    (select-window isearch-lazy-highlight-window))
+        (setq opoint (point))
 	(setq window-start (window-group-start))
 	(setq window-end (window-group-end))
 	(save-excursion
-- 
2.29.2


--=-=-=--




Acknowledgement sent to Augusto Stoffel <arstoffel@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#46469; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 28 Apr 2021 21:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.