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: Thu, 28 Jan 2021 08:31:54 -0800 Message-ID: <005401d6f593$1845e600$48d1b200$@net> References: <000001d6e16c$984bcb70$c8e36250$@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> <87im7ku9t2.fsf@mail.linkov.net> <000301d6f351$1275aa10$3760fe30$@net> <875z3ku75k.fsf@mail.linkov.net> <000c01d6f37b$0b1ec060$215c4120$@net> <87blda7ljp.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="29415"; 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 Thu Jan 28 17:33:13 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 1l5AEL-0007WI-Ea for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Jan 2021 17:33:13 +0100 Original-Received: from localhost ([::1]:33646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5AEK-0006Kc-5Q for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Jan 2021 11:33:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5AEA-0006IQ-Sd for bug-gnu-emacs@gnu.org; Thu, 28 Jan 2021 11:33:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38167) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5AEA-00087f-Kj for bug-gnu-emacs@gnu.org; Thu, 28 Jan 2021 11:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l5AEA-0003qT-IZ for bug-gnu-emacs@gnu.org; Thu, 28 Jan 2021 11: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: Thu, 28 Jan 2021 16: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.161185153314710 (code B ref 45617); Thu, 28 Jan 2021 16:33:02 +0000 Original-Received: (at 45617) by debbugs.gnu.org; 28 Jan 2021 16:32:13 +0000 Original-Received: from localhost ([127.0.0.1]:49709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5ADM-0003pC-Gm for submit@debbugs.gnu.org; Thu, 28 Jan 2021 11:32:13 -0500 Original-Received: from resqmta-po-11v.sys.comcast.net ([96.114.154.170]:49658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5ADJ-0003ou-NO for 45617@debbugs.gnu.org; Thu, 28 Jan 2021 11:32:11 -0500 Original-Received: from resomta-po-08v.sys.comcast.net ([96.114.154.232]) by resqmta-po-11v.sys.comcast.net with ESMTP id 59QRlnnm7Gk1l5ADElx4nh; Thu, 28 Jan 2021 16:32:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1611851524; bh=IAzx2YooPO2bbTThDqE1QRgDi8C2bQvsumqZRWuxIm0=; h=Received:Received:From:To:Subject:Date:Message-ID:MIME-Version: Content-Type; b=zjNnBN6pf3e9f6LENVueS5tkFKYXp61jAL/iNA3VExs7AENFEod9Rw7TT1EMZvwiD tPGwJ2eT2E3qWoofvCVZeHJjQQ/jZrrNgh7pgHNEVcQN9obJdP7QKeuyXfYgeO2puW 8Tt+F7K1A1c1aaOiGhp7vwuibSUnp8jxqQKtjtQIAi9mRicOwdjJ0AFkMFlw8BTfAk Gc5mzBYA/HHK6asxgyJ3sap9o7z7nWg2t/Zkv/0Nmt0q3Qb0MYF1EL6W44BG6Tctzv UbN0CU/UAlyD0EDA3HaUXzet16gnoYCetLJ+6uonXD5lHtrclPNXNVexYqwPfn1DEO PZx1WJTYloOvg== Original-Received: from Cache ([IPv6:2601:647:6100:3b1c::87]) by resomta-po-08v.sys.comcast.net with ESMTPA id 5AD7lFy3p8b6T5AD9lQJwi; Thu, 28 Jan 2021 16:31:59 +0000 X-Xfinity-VMeta: sc=-100.00;st=legit In-Reply-To: <87blda7ljp.fsf@mail.linkov.net> X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us Thread-Index: Adb0koPwnHs7jLuLT7qqviNZi7LTbQA/4RtA 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:198808 Archived-At: Good idea. I placed this query-replaceX in my .emacs: (defun query-replaceX (from-string to-string &optional delimited start end backward region-noncontiguous-p) (interactive (let ((common (query-replace-read-args (concat "Query replace" (if current-prefix-arg (if (eq current-prefix-arg '-) " backward" " word") "") (if (use-region-p) " in region" "")) nil))) (list (nth 0 common) (nth 1 common) (nth 2 common) ;; These are done separately here ;; so that command-history will record these expressions ;; rather than the values they had this time. (if (use-region-p) (region-beginning)) (if (use-region-p) (region-end)) (nth 3 common) (if (use-region-p) (region-noncontiguous-p))))) (message "region: %S %S" start end) (perform-replace from-string to-string t nil delimited nil nil start end backward region-noncontiguous-p)) 1. Select region by dragging left mouse 2. ESC-x query-replaceX to start the above 3. double-mouse click on the last _xxx in the selected region CompilationUnit::Elaborate::Setup::InitOrderKey:: Cmp( TThis const& _r ) const { int _xxx; // Primary sort is by phase to group all symbols in a phase together. if ( ( _xxx = phase - _r.phase ) != 0 ) return _cmp; <<<<------------ double mouse click on this (was _xxx) 4. keyboard enter _cmp, so the command window looks like: Query replace in region (default _cmp → _xxx): _xxx with: _cmp 5. keyboard enter. The result is the above snippet of code, it incorrectly replaced only 1 of the 3 _xxx's Here is the *Messages* buffer beginning with the (1) select region: Mark set region: 6576 6582 Mark set Replaced 1 occurrence Auto-saving...done Mark set What would you like me to do next? -----Original Message----- From: Juri Linkov [mailto:juri@linkov.net] Sent: Wednesday, January 27, 2021 1:44 AM 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 > It looks like the `replace.elc` file I've been creating isn't being loaded: > > I changed: > (message "Replaced %d occurrence%s%s" > To: > (message "Replaced XX %d occurrence%s%s" > > And the *Messages* buffer still shows: > Replaced 3 occurences > > I've verified the elc file is re-written each time I change and > byte-compile-file replace.el. > > Is there a command that shows the paths to the elc files loaded? Or, does a > new instance of emacs share elc's from an existing running copy of emacs > (that would be pretty geeky!)? I'm doing my tests with an emacs running for > several days now, assuming it would not interfere. Maybe the simplest way is that you can temporarily copy redefined functions to your .emacs file, and you can evaluate redefined functions using C-M-x.