unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12389: 24.2.50; mark, transient-mark-mode and registers
@ 2012-09-08 19:10 Jambunathan K
  2012-09-08 20:17 ` Stefan Monnier
  2013-11-15  5:10 ` Jambunathan K
  0 siblings, 2 replies; 5+ messages in thread
From: Jambunathan K @ 2012-09-08 19:10 UTC (permalink / raw)
  To: 12389


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@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






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#12389: 24.2.50; mark, transient-mark-mode and registers
  2012-09-08 19:10 bug#12389: 24.2.50; mark, transient-mark-mode and registers Jambunathan K
@ 2012-09-08 20:17 ` Stefan Monnier
  2012-10-03 14:31   ` Jambunathan K
  2013-11-15  5:10 ` Jambunathan K
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2012-09-08 20:17 UTC (permalink / raw)
  To: Jambunathan K; +Cc: 12389

> 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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#12389: 24.2.50; mark, transient-mark-mode and registers
  2012-09-08 20:17 ` Stefan Monnier
@ 2012-10-03 14:31   ` Jambunathan K
  2012-10-06 17:16     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Jambunathan K @ 2012-10-03 14:31 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 12389

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Stefan Monnier <monnier@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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bug12389.diff --]
[-- Type: text/x-diff, Size: 1224 bytes --]

=== 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@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@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)


[-- Attachment #3: Type: text/plain, Size: 515 bytes --]



>> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#12389: 24.2.50; mark, transient-mark-mode and registers
  2012-10-03 14:31   ` Jambunathan K
@ 2012-10-06 17:16     ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2012-10-06 17:16 UTC (permalink / raw)
  To: Jambunathan K; +Cc: 12389

> I am attaching a patch.

Thanks, installed,


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#12389: 24.2.50; mark, transient-mark-mode and registers
  2012-09-08 19:10 bug#12389: 24.2.50; mark, transient-mark-mode and registers Jambunathan K
  2012-09-08 20:17 ` Stefan Monnier
@ 2013-11-15  5:10 ` Jambunathan K
  1 sibling, 0 replies; 5+ messages in thread
From: Jambunathan K @ 2013-11-15  5:10 UTC (permalink / raw)
  To: 12389-done


OP here. Closed.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-15  5:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-08 19:10 bug#12389: 24.2.50; mark, transient-mark-mode and registers Jambunathan K
2012-09-08 20:17 ` Stefan Monnier
2012-10-03 14:31   ` Jambunathan K
2012-10-06 17:16     ` Stefan Monnier
2013-11-15  5:10 ` Jambunathan K

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).