GNU bug report logs - #3350
23.0.93; Deactivation of region by the insert function

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Fri, 22 May 2009 12:50:03 UTC

Severity: minor

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3350 in the body.
You can then email your comments to 3350 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3350; Package emacs. (Fri, 22 May 2009 12:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 22 May 2009 12:50:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.93; Deactivation of region by the insert function
Date: Fri, 22 May 2009 14:45:59 +0200
Start from

  emacs -Q

and enter this in the *scratch* buffer and eval it:

(defvar msgtrc-buffer
  "*Messages*"
  "Buffer or name of buffer for trace messages.
See `msgtrc'.")


(defun msgtrc (format-string &rest args)
  "Print message to `msgtrc-buffer'.
Arguments FORMAT-STRING and ARGS are like for `message'."
  (let ((trc-buffer (get-buffer-create msgtrc-buffer)))
    (with-current-buffer trc-buffer
      (goto-char (point-max))
      ;;(insert "MU:" (apply 'format format-string args) "\n")
      (insert "constant string\n")
      (when buffer-file-name (write-region nil nil buffer-file-name)))))

(defun msgtrc-post-command ()
  (msgtrc "msgtrc post-command here"))

(add-hook 'post-command-hook 'msgtrc-post-command nil t)


Then try activating the region with S-<arrow key>. This does not work.
However if the (insert ...) statement in msgtrc is commented out then
it works.

I have not tested if this is a regression from Emacs 22.


In GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600)
 of 2009-05-03
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3350; Package emacs. (Fri, 22 May 2009 20:40:14 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 22 May 2009 20:40:14 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 3350 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#3350: 23.0.93; Deactivation of region by the insert function
Date: Fri, 22 May 2009 15:10:07 -0400
> Then try activating the region with S-<arrow key>. This does not work.
> However if the (insert ...) statement in msgtrc is commented out then
> it works.

That's because deativate-mark is a global variable, so
a buffer-modification in one buffer is treated identically (w.r.t
clearing the mark) as a modification in any other buffer.

> I have not tested if this is a regression from Emacs 22.

I don't think anything has changed in this regard.
Just wrap the code in (let (deactivate-mark) ...)


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3350; Package emacs. (Fri, 22 May 2009 20:40:25 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 22 May 2009 20:40:25 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3350; Package emacs. (Fri, 22 May 2009 20:40:30 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 22 May 2009 20:40:30 GMT) Full text and rfc822 format available.

Message #20 received at 3350 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 3350 <at> debbugs.gnu.org
Subject: Re: bug#3350: 23.0.93; Deactivation of region by the insert function
Date: Fri, 22 May 2009 21:24:13 +0200
On Fri, May 22, 2009 at 9:10 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>> Then try activating the region with S-<arrow key>. This does not work.
>> However if the (insert ...) statement in msgtrc is commented out then
>> it works.
>
> That's because deativate-mark is a global variable, so
> a buffer-modification in one buffer is treated identically (w.r.t
> clearing the mark) as a modification in any other buffer.
>
>> I have not tested if this is a regression from Emacs 22.
>
> I don't think anything has changed in this regard.
> Just wrap the code in (let (deactivate-mark) ...)

Thanks, I see.  But it is pretty surprising ...

What is the reason that deactivate-mark is not buffer local?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3350; Package emacs. (Mon, 25 May 2009 02:10:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 25 May 2009 02:10:05 GMT) Full text and rfc822 format available.

Message #25 received at 3350 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 3350 <at> debbugs.gnu.org
Subject: Re: bug#3350: 23.0.93; Deactivation of region by the insert function
Date: Sun, 24 May 2009 22:06:03 -0400
> Thanks, I see.  But it is pretty surprising ...
> What is the reason that deactivate-mark is not buffer local?

There isn't any.


        Stefan



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3350; Package emacs. (Mon, 25 May 2009 02:25:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 25 May 2009 02:25:05 GMT) Full text and rfc822 format available.

Message #30 received at 3350 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 3350 <at> debbugs.gnu.org
Subject: Re: bug#3350: 23.0.93; Deactivation of region by the insert function
Date: Mon, 25 May 2009 04:20:32 +0200
On Mon, May 25, 2009 at 4:06 AM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>> Thanks, I see.  But it is pretty surprising ...
>> What is the reason that deactivate-mark is not buffer local?
>
> There isn't any.

Then please make it buffer local by default.

Also I think that visible active regions still should be visible when
they are not in the selected window though with another color
(probably grey). That would be more consisten with what other apps do.



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3350; Package emacs. (Mon, 25 May 2009 22:25:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 25 May 2009 22:25:05 GMT) Full text and rfc822 format available.

Message #35 received at 3350 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 3350 <at> debbugs.gnu.org
Subject: Re: bug#3350: 23.0.93; Deactivation of region by the insert function
Date: Mon, 25 May 2009 09:42:52 -0400
>>> Thanks, I see.  But it is pretty surprising ...
>>> What is the reason that deactivate-mark is not buffer local?
>> There isn't any.
> Then please make it buffer local by default.

Patch welcome.

> Also I think that visible active regions still should be visible when
> they are not in the selected window though with another color
> (probably grey). That would be more consisten with what other apps do.

That's a separate concern.  Please make a separate bug-report for that
feature request.


        Stefan



Severity set to `minor' from `normal' Request was from Glenn Morris <rgm+emacsbugs <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 17 Jun 2009 07:35:08 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 17 Feb 2013 02:07:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 3350 <at> debbugs.gnu.org and Lennart Borgman <lennart.borgman <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 17 Feb 2013 02:07:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 17 Mar 2013 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 92 days ago.

Previous Next


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