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#45617: loses the edit region. Works in 23.3, broke in 26.3 Date: Mon, 25 Jan 2021 20:54:17 +0200 Organization: LINKOV.NET Message-ID: <87im7ku9t2.fsf@mail.linkov.net> References: <000001d6e16c$984bcb70$c8e36250$@net> <000601d6e2ea$8f6601e0$ae3205a0$@net> <877dorkznt.fsf@mail.linkov.net> <002701d6e39b$4ac35680$e04a0380$@net> <8735ze9e09.fsf@mail.linkov.net> <83mtxm0vzd.fsf@gnu.org> <002d01d6e478$ca50cdf0$5ef269d0$@net> <87k0sgirr0.fsf@mail.linkov.net> <002101d6eadc$e816a070$b843e150$@net> <87k0sezj07.fsf@mail.linkov.net> <000c01d6eb68$f3f675f0$dbe361d0$@net> <877do8eull.fsf@mail.linkov.net> <000401d6ef83$32407e50$96c17af0$@net> <87czxyy5sz.fsf@mail.linkov.net> <009c01d6f0e4$7cdaeba0$7690c2e0$@net> <874kj7d1kd.fsf@mail.linkov.net> <002e01d6f1b2$1f2290c0$5d67b240$@net> <87eeiba4jo.fsf@mail.linkov.net> <006101d6f291$2b537dc0$81fa7940$@net> <87ft2p1fcl.fsf@mail.linkov.net> <006c01d6f345$c82aa7e0$587ff7a0$@net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38350"; 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: 45617@debbugs.gnu.org To: "Bob Floyd" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 25 20:08:01 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 1l47DV-0009rs-5e for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jan 2021 20:08:01 +0100 Original-Received: from localhost ([::1]:51346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l47DU-00041w-7Y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jan 2021 14:08:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l471u-0003eD-GR for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2021 13:56:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l471u-00062R-6k for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2021 13:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l471u-00067Z-5i for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2021 13:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jan 2021 18:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45617 X-GNU-PR-Package: emacs Original-Received: via spool by 45617-submit@debbugs.gnu.org id=B45617.161160091623472 (code B ref 45617); Mon, 25 Jan 2021 18:56:02 +0000 Original-Received: (at 45617) by debbugs.gnu.org; 25 Jan 2021 18:55:16 +0000 Original-Received: from localhost ([127.0.0.1]:39912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l471A-00066W-Eb for submit@debbugs.gnu.org; Mon, 25 Jan 2021 13:55:16 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:44061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4719-00066H-H7 for 45617@debbugs.gnu.org; Mon, 25 Jan 2021 13:55:15 -0500 X-Originating-IP: 91.129.98.64 Original-Received: from mail.gandi.net (m91-129-98-64.cust.tele2.ee [91.129.98.64]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id E4BB46000C; Mon, 25 Jan 2021 18:55:07 +0000 (UTC) In-Reply-To: <006c01d6f345$c82aa7e0$587ff7a0$@net> (Bob Floyd's message of "Mon, 25 Jan 2021 10:13:27 -0800") 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:198579 Archived-At: > It was doing the expected, correct, query replace, for the first, oh, maybe > six times, then got into the broken state and when I repeat the above > sequence it behaves as if there was no region selected and no replacements > are offered (Replaced 0 occurences). This is strange because if there is no region selected, this means that it should replace everywhere in the whole buffer (but only when point is at the beginning of the buffer). > It seems like something was not restored correctly. I cannot say I precisely > followed the above steps for the first times when it was working - I wanted > to vary the sequence a bit (sometimes entering from the keyboard, sometimes > selecting text from a lower line in the selection) to see if I could break > it. I cannot be more specific about exactly which sequence broke it, only > that now, when it's broken, it consistently does not work! It could help you to debug when you insert the following line in 'query-replace' immediately before the 'perform-replace' call: (message "region: %S %S" start end) Then after query-replace you could check in the *Messages* buffer and see the exact region boundaries used. If there are 'nil' values, this might mean there is a bug in save-mark-and-excursion.