From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25992: perform-replace leaves mark-active when not transient-mark-mode Date: Mon, 06 Mar 2017 18:26:53 +0200 Message-ID: <83innmid6a.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1488817767 25504 195.159.176.226 (6 Mar 2017 16:29:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Mar 2017 16:29:27 +0000 (UTC) Cc: 25992@debbugs.gnu.org To: Keith David Bershatsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 06 17:29:22 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckvVh-0005vD-6Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Mar 2017 17:29:21 +0100 Original-Received: from localhost ([::1]:44835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckvVn-0008LQ-CV for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Mar 2017 11:29:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckvUV-0007NW-KX for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2017 11:28:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckvUQ-0002nC-1l for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2017 11:28:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckvUP-0002n6-VR for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2017 11:28:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ckvUP-0007vw-NQ for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2017 11:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Mar 2017 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25992 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25992-submit@debbugs.gnu.org id=B25992.148881763330441 (code B ref 25992); Mon, 06 Mar 2017 16:28:01 +0000 Original-Received: (at 25992) by debbugs.gnu.org; 6 Mar 2017 16:27:13 +0000 Original-Received: from localhost ([127.0.0.1]:42988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckvTd-0007uu-FT for submit@debbugs.gnu.org; Mon, 06 Mar 2017 11:27:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckvTb-0007uh-4s for 25992@debbugs.gnu.org; Mon, 06 Mar 2017 11:27:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckvTT-0002aH-0J for 25992@debbugs.gnu.org; Mon, 06 Mar 2017 11:27:06 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckvTS-0002aD-TA; Mon, 06 Mar 2017 11:27:02 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2245 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ckvTS-0005zc-6Y; Mon, 06 Mar 2017 11:27:02 -0500 In-reply-to: (message from Keith David Bershatsky on Sun, 05 Mar 2017 18:02:23 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130262 Archived-At: > Date: Sun, 05 Mar 2017 18:02:23 -0800 > From: Keith David Bershatsky > > When transient-mark-mode is turned off, perform-replace leaves mark-active set to `t`. > > Step 1: Launch emacs -q > > Step 2: Turn off transient-mark-mode. (transient-mark-mode -1) > > Step 3: Evaluate mark-active and verify it is `nil`. > > Step 4: Run a simple perform-replace such as: (replace-regexp ";" "@" nil 1 2) > > Step 5: Evaluate mark-active and see that it is now set `t`. > > The desired behavior is to leave `mark-active` set to `nil` if it was previously set to `nil`. I'm not sure why you worry about mark-active when transient-mark-mode is off: AFAIK that flag is only meaningful when transient-mark-mode is on. Can you describe your use case? Anyway, the reason for activating the mark is that replace-regexp calls push-mark, which always activates the mark when transient-mark-mode is turned off. Not sure why we do that, but the code which does that has been doing it for the last 24 years, so I don't think we should change that now, unless we have a _very_ good reason. Thanks.