From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Bob Floyd" Newsgroups: gmane.emacs.bugs Subject: bug#45617: loses the edit region. Works in 23.3, broke in 26.3 Date: Fri, 22 Jan 2021 09:31:57 -0800 Message-ID: <009c01d6f0e4$7cdaeba0$7690c2e0$@net> References: <000001d6e16c$984bcb70$c8e36250$@net> <83turycc18.fsf@gnu.org> <87ble4ob6v.fsf@mail.linkov.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> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31648"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45617@debbugs.gnu.org To: "'Juri Linkov'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 22 18:33:21 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 1l30JE-00085o-7O for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jan 2021 18:33:20 +0100 Original-Received: from localhost ([::1]:59138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l30JC-0004zG-TH for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jan 2021 12:33:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l30Iw-0004yu-Po for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2021 12:33:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l30Iw-0007hn-Hg for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2021 12:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l30Iw-0002Uj-E1 for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2021 12:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Bob Floyd" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2021 17:33: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.16113367308200 (code B ref 45617); Fri, 22 Jan 2021 17:33:02 +0000 Original-Received: (at 45617) by debbugs.gnu.org; 22 Jan 2021 17:32:10 +0000 Original-Received: from localhost ([127.0.0.1]:32969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l30I6-00027o-2f for submit@debbugs.gnu.org; Fri, 22 Jan 2021 12:32:10 -0500 Original-Received: from resdmta-po-01v.sys.comcast.net ([96.114.154.209]:53464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l30I1-00020F-Sm for 45617@debbugs.gnu.org; Fri, 22 Jan 2021 12:32:08 -0500 Original-Received: from resqmta-po-03v.sys.comcast.net ([96.114.154.162]) by resdmta-po-01v.sys.comcast.net with ESMTP id 2zjJlAYyHHIag30HvlxF6F; Fri, 22 Jan 2021 17:31:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1611336719; bh=8yQvGTlMPTc9AbgkKq5cyjXMK2wDi+YxI3dEZ20MNl0=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=JMABLSNcuW7I59GGHmp/xAH7vFi4eeTsUagokmliKTyLKC+jvTd7aSXtDHVcH7p+M tS76FKnC/6zmVsEUFQVd0wu04ARy574xnEHz5aXYcHnmab57KUGapupuaJwyLCl5gJ 1uMelTm/43NniWh2gPTRJgPXXexz3ogBs9ZyEwsI9/85JCAsFicPkowKGNIZrbpDj1 gvOo4Dn7fzWgtbrQNR0dUIdijQb7pH05v5bSyzoVVfXVJZL8FPGsvj+cVtYnfLbNCj PBRCpztem8WuqD0X+zeCc/uE1NU/pyKg2sSnIbr4KGBpvNDlREGuC3vl6NeSN2KeUA 6WdCZfmvYD6Rw== Original-Received: from resomta-po-03v.sys.comcast.net ([96.114.154.227]) by resqmta-po-03v.sys.comcast.net with ESMTP id 2yJZlGd16YcEc30HvlG046; Fri, 22 Jan 2021 17:31:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1611336719; bh=8yQvGTlMPTc9AbgkKq5cyjXMK2wDi+YxI3dEZ20MNl0=; h=Received:Received:From:To:Subject:Date:Message-ID:MIME-Version: Content-Type; b=Ra5cPtetnaWQBMKVI/ctKhvXUQP44KYq4ZwGy2HI4kC8x6dDHLuqcvVTXyB9lbmJ3 QMxgREgS8jnjraDZBsm59OQTdveT67aXedGPe1uOylvI92Xt2aAtFhMKMKzcx8JRC4 7FKjXPBSo7yTZATDyKPziCq+rF1Ge0w0ccPix7cG0cdGK0mJw7I1VBgR1eKW2RdJuO yVawnzAPMB6mhDe+JYEOr0irGtcFiivfF2t2r7u+e0AQiKS/3aIJx4qeui0oj44ZPx pZo5oNnNLHRcVDk/nWze0A/IjgpT1/Ei9sHZNitJe1tBvj69UxwZwc79Xlf6LCgGcd 2jPM1EiKvf/Sg== Original-Received: from Cache ([IPv6:2601:647:6100:1480::a080]) by resomta-po-03v.sys.comcast.net with ESMTPA id 30HtlXwupjnlV30Hulp4sw; Fri, 22 Jan 2021 17:31:59 +0000 X-Xfinity-VMeta: sc=-100.00;st=legit In-Reply-To: <87czxyy5sz.fsf@mail.linkov.net> X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdbwQDHp50caXs+WSnaP53LNgs3wPgAosHug Content-Language: en-us 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:198381 Archived-At: Yes, I'm using the function in my test. Ah, I think I see why you do not see the issue: When I start a fresh copy of emacs and follow the steps it works correctly. When I repeat the steps a 2nd, 3rd ... time, then it breaks. After the 1st time shows this in the command window: Query replace in region (default _iDfnGoverned → _iBDHdfnGoverned): > "Notice the selection region changes to lines 1-4 and is never restored." > I don't see that the selection region changes to lines 1-4. I see only > that the selection region is deactivated after I yank the selection > using middle mouse click . I believe you will see the selection region change when repeating the steps. At least I hope so! If not, am I able to embed a jpg in a reply to one of these emails? -----Original Message----- From: Juri Linkov [mailto:juri@linkov.net] Sent: Thursday, January 21, 2021 1:51 PM To: Bob Floyd Cc: 'Eli Zaretskii'; 45617@debbugs.gnu.org Subject: Re: bug#45617: loses the edit region. Works in 23.3, broke in 26.3 > Sorry, sorry, my bad. Ignore my last email! Indeed, in your previous email the function was still messed up, but the right function is below, hope you used it in your test: > I'm now using the last version: > ---------------------------------------------------- > (defun query-replace-read-args (prompt regexp-flag &optional noerror) > (unless noerror > (barf-if-buffer-read-only)) > (save-mark-and-excursion > (let* ((from (query-replace-read-from prompt regexp-flag)) > (to (if (consp from) (prog1 (cdr from) (setq from (car from))) > (query-replace-read-to from prompt regexp-flag)))) > (list from to > (or (and current-prefix-arg (not (eq current-prefix-arg '-))) > (and (plist-member (text-properties-at 0 from) > 'isearch-regexp-function) > (get-text-property 0 'isearch-regexp-function from))) > (and current-prefix-arg (eq current-prefix-arg '-)))))) > ---------------------------------------------------- > Do this: > > 1. Select entire region by dragging left mouse down from the BOTTOM to the > TOP. > 2. Begin > In the command window: Query replace in region: > 3. Double left mouse click on "_iDfnGoverned" at line 4 to select it: > (IObj const& _iDfnGoverned <---THIS ONE , IObj > const& _iBDHparamset) > 4. middle mouse click in the command window to insert, then enter: > Query replace in region: _iDfnGoverned with: > Notice the selection region changes to lines 1-4 and is never restored. > 5. middle mouse click in the command window to insert it again and edit: > Query replace in region _iDfnGoverned with: _iBDHdfnGoverned > 6. Enter > Nothing happens! > > Middle mouse click: mouse-yank-at-click > > Hope you can reproduce this!!! Still can't reproduce this, everything works fine, all matches are replaced. But I don't understand this line: "Notice the selection region changes to lines 1-4 and is never restored." I don't see that the selection region changes to lines 1-4. I see only that the selection region is deactivated after I yank the selection using middle mouse click .