From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#46469: 27.1; `isearch-del-char' should move point further back Date: Wed, 28 Apr 2021 23:53:14 +0300 Organization: LINKOV.NET Message-ID: <87r1iu6shx.fsf@mail.linkov.net> References: <87zh09xggr.fsf@gmail.com> <87eehjstt9.fsf@mail.linkov.net> <87a6s7nngp.fsf@gmail.com> <87sg5yekf6.fsf@mail.linkov.net> <875z074lf3.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14834"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 46469@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 28 22:56:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbrEB-0003km-1S for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Apr 2021 22:56:11 +0200 Original-Received: from localhost ([::1]:54920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbrEA-00044s-56 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Apr 2021 16:56:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbrE2-00044Z-PR for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2021 16:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42657) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbrE2-0000qj-I2 for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2021 16:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lbrE2-0000Ny-G5 for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2021 16:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Apr 2021 20:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46469 X-GNU-PR-Package: emacs Original-Received: via spool by 46469-submit@debbugs.gnu.org id=B46469.16196433411456 (code B ref 46469); Wed, 28 Apr 2021 20:56:02 +0000 Original-Received: (at 46469) by debbugs.gnu.org; 28 Apr 2021 20:55:41 +0000 Original-Received: from localhost ([127.0.0.1]:54203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbrDh-0000NQ-EL for submit@debbugs.gnu.org; Wed, 28 Apr 2021 16:55:41 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:37077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbrDf-0000N9-3R for 46469@debbugs.gnu.org; Wed, 28 Apr 2021 16:55:40 -0400 Original-Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 9D147240002; Wed, 28 Apr 2021 20:55:31 +0000 (UTC) In-Reply-To: <875z074lf3.fsf@gmail.com> (Augusto Stoffel's message of "Tue, 27 Apr 2021 20:44:32 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205141 Archived-At: > 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.