GNU bug report logs - #25992
perform-replace leaves mark-active when not transient-mark-mode

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Mon, 6 Mar 2017 02:03:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 25992 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 25992 <at> debbugs.gnu.org
Subject: Re: bug#25992: perform-replace leaves mark-active when not
 transient-mark-mode
Date: Mon, 06 Mar 2017 18:26:53 +0200
> Date: Sun, 05 Mar 2017 18:02:23 -0800
> From: Keith David Bershatsky <esq <at> lawlist.com>
> 
> 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.




This bug report was last modified 8 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.