GNU bug report logs - #12389
24.2.50; mark, transient-mark-mode and registers

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Sat, 8 Sep 2012 19:10:01 UTC

Severity: minor

Tags: moreinfo

Found in version 24.2.50

Done: Jambunathan K <kjambunathan <at> gmail.com>

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 12389 in the body.
You can then email your comments to 12389 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-gnu-emacs <at> gnu.org:
bug#12389; Package emacs. (Sat, 08 Sep 2012 19:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jambunathan K <kjambunathan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 08 Sep 2012 19:10:01 GMT) Full text and rfc822 format available.

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

From: Jambunathan K <kjambunathan <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2.50; mark, transient-mark-mode and registers
Date: Sun, 09 Sep 2012 00:40:04 +0530
Full disclosure: I use transient-mark-mode.

Item-1
======

My upvotes for de-activating mark after `prepend-to-register' and
`append-to-register.  

I always use C-g after append-to-register.  If I don't, I find the
highlighted region expanding with cursor motion annoying.  


Discussions on Bug#10056 seem to suggest that the current position is
ambivalent.  The discussion seems to favor status quo rather than
provide a use case that will support the status quo.

    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10056#26

Item-2
======

1. Enable transient-mark-mode
2. C-SPC
3. <down> <down>
4. C-g
5. C-u C-x r s a

Now as a transient mark user, I find disappearance of a non-highlighted
text in (5) surprising.  Comments?





In GNU Emacs 24.2.50.19 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-09-09 on debian-6.05
Bzr revision: 109935 eliz <at> gnu.org-20120908112032-bpwxcs4nm9livigz
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Important settings:
  value of $LANG: en_IN
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12389; Package emacs. (Sat, 08 Sep 2012 20:18:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 12389 <at> debbugs.gnu.org
Subject: Re: bug#12389: 24.2.50; mark, transient-mark-mode and registers
Date: Sat, 08 Sep 2012 16:17:32 -0400
> Item-1
> ======
> My upvotes for de-activating mark after `prepend-to-register' and
> `append-to-register.

Fine by me.

> Item-2
> ======
> 1. Enable transient-mark-mode
> 2. C-SPC
> 3. <down> <down>
> 4. C-g
> 5. C-u C-x r s a

That's normal: the same happens with C-w instead of C-u C-x r s a.

> Now as a transient mark user, I find disappearance of a non-highlighted
> text in (5) surprising.  Comments?

What did you expect to happen?  That the text is copied but not deleted?
Or that neither happens and you get an error.
If you want an error, you can set mark-even-if-inactive to nil.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12389; Package emacs. (Wed, 03 Oct 2012 14:31:02 GMT) Full text and rfc822 format available.

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

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 12389 <at> debbugs.gnu.org
Subject: Re: bug#12389: 24.2.50; mark, transient-mark-mode and registers
Date: Wed, 03 Oct 2012 20:01:04 +0530
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Item-1
>> ======
>> My upvotes for de-activating mark after `prepend-to-register' and
>> `append-to-register.
>
> Fine by me.

I am attaching a patch.

Please leave the bug open.  I will continue my discussion on Item-2
sometime later.

[bug12389.diff (text/x-diff, inline)]
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-10-03 08:50:49 +0000
+++ lisp/ChangeLog	2012-10-03 14:26:48 +0000
@@ -1,3 +1,9 @@
+2012-10-03  Jambunathan K  <kjambunathan <at> gmail.com>
+
+	* register.el (append-to-register, prepend-to-register):
+	Deactivate mark.  This accords with current behaviour of
+	`copy-to-register'.  See (Bug#12389).
+
 2012-10-03  Martin Rudalics  <rudalics <at> gmx.at>
 
 	* menu-bar.el (kill-this-buffer): Don't do anything when

=== modified file 'lisp/register.el'
--- lisp/register.el	2012-09-09 08:10:56 +0000
+++ lisp/register.el	2012-10-03 13:21:46 +0000
@@ -382,6 +382,7 @@
      register (cond ((not reg) text)
                     ((stringp reg) (concat reg separator text))
                     (t (error "Register does not contain text")))))
+  (setq deactivate-mark t)
   (cond (delete-flag
 	 (delete-region start end))
 	((called-interactively-p 'interactive)
@@ -400,6 +401,7 @@
      register (cond ((not reg) text)
                     ((stringp reg) (concat text separator reg))
                     (t (error "Register does not contain text")))))
+  (setq deactivate-mark t)
   (cond (delete-flag
 	 (delete-region start end))
 	((called-interactively-p 'interactive)

[Message part 3 (text/plain, inline)]

>> Item-2
>> ======
>> 1. Enable transient-mark-mode
>> 2. C-SPC
>> 3. <down> <down>
>> 4. C-g
>> 5. C-u C-x r s a
>
> That's normal: the same happens with C-w instead of C-u C-x r s a.
>
>> Now as a transient mark user, I find disappearance of a non-highlighted
>> text in (5) surprising.  Comments?
>
> What did you expect to happen?  That the text is copied but not deleted?
> Or that neither happens and you get an error.
> If you want an error, you can set mark-even-if-inactive to nil.
>
>
>         Stefan

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12389; Package emacs. (Sat, 06 Oct 2012 17:18:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 12389 <at> debbugs.gnu.org
Subject: Re: bug#12389: 24.2.50; mark, transient-mark-mode and registers
Date: Sat, 06 Oct 2012 13:16:43 -0400
> I am attaching a patch.

Thanks, installed,


        Stefan




Reply sent to Jambunathan K <kjambunathan <at> gmail.com>:
You have taken responsibility. (Fri, 15 Nov 2013 05:11:03 GMT) Full text and rfc822 format available.

Notification sent to Jambunathan K <kjambunathan <at> gmail.com>:
bug acknowledged by developer. (Fri, 15 Nov 2013 05:11:03 GMT) Full text and rfc822 format available.

Message #19 received at 12389-done <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: 12389-done <at> debbugs.gnu.org
Subject: Re: bug#12389: 24.2.50; mark, transient-mark-mode and registers
Date: Fri, 15 Nov 2013 10:40:32 +0530
OP here. Closed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Dec 2013 12:24:29 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 249 days ago.

Previous Next


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