Subject: bug#12218: 24.2.50; vc-ediff: Pressing `n' moves focus away from ediff control panel

From: Jambunathan K <[email-masked]>
Date: Fri, 05 Oct 2012 22:42:51 +0530

martin rudalics <[email-masked]> writes:

>> 1. C-x C-f <some modified file>
>> 2. M-x vc-ediff
>> 3. Press `n' in the control panel
>> 4. Note that the one of the src buffer - buffer B specifically - becomes
>>    receives focus (or whatever you call it)
>> 5. Pressing another `n' and it modifies the src buffer.
>>
>> I would expect that focus never leave the ediff control panel.
>>
>> Seems like a recent regression to me.
>
> I can't reproduce that here.  But maybe you should try customizing the
> variable `ediff-grab-mouse' to t.

I am debian squeeze running Emacs from trunk (bzr version is visible in
the attached screenshot). Emacs is launched like this:

   ~/src/emacs/trunk/src/emacs  --debug-init -Q

`ediff-grab-mouse' is at it's default value of t.

I am attaching a screenshot of my desktop.  

I don't know whether the diff file has any bearing on the behaviour.
The register.el on display is the one obtained by applying the
bug12389.diff.

This bug is bit of an annoyance.  I am happy you are lookng in to it.

=== 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  <[email-masked]>
+
+	* 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  <[email-masked]>
 
 	* 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)

> martin