GNU bug report logs -
#12218
24.2.50; vc-ediff: Pressing `n' moves focus away from ediff control panel
Previous Next
Reported by: Jambunathan K <kjambunathan <at> gmail.com>
Date: Fri, 17 Aug 2012 10:32:01 UTC
Severity: normal
Found in version 24.2.50
Fixed in version 24.3.50
Done: Juri Linkov <juri <at> jurta.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 12218 in the body.
You can then email your comments to 12218 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Fri, 17 Aug 2012 10:32: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
.
(Fri, 17 Aug 2012 10:32:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
My Bzr checkout is at
kjambunathan <at> debian-6:~/src/emacs/trunk/lisp$ bzr version-info
revision-id: rgm <at> gnu.org-20120817072823-0zjgqf10g1d0vcf1
date: 2012-08-17 00:28:23 -0700
build-date: 2012-08-17 15:46:53 +0530
revno: 109655
branch-nick: trunk
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Fri, 05 Oct 2012 16:15:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12218 <at> debbugs.gnu.org (full text, mbox):
> 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.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Fri, 05 Oct 2012 17:12:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 12218 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
martin rudalics <rudalics <at> gmx.at> 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.
[bug12218.png (image/png, attachment)]
[bug12389.diff (text/x-diff, attachment)]
[Message part 4 (text/plain, inline)]
> martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Fri, 05 Oct 2012 18:09:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 12218 <at> debbugs.gnu.org (full text, mbox):
> 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.
And what happens if you set it to nil (that's what I use for whatever
reason). IIRC ediff's mouse grabbing code is very convoluted and partly
dead.
> 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.
I'm afraid I can't be of much help here. I don't put the control panel
in an extra frame; I use `ediff-setup-windows-plain'.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Fri, 05 Oct 2012 18:46:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 12218 <at> debbugs.gnu.org (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
>> 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.
>
> And what happens if you set it to nil (that's what I use for whatever
> reason). IIRC ediff's mouse grabbing code is very convoluted and partly
> dead.
If I set `ediff-grab-mouse' to nil, I continue get the buggy behaviour.
>> 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.
>
> I'm afraid I can't be of much help here. I don't put the control panel
> in an extra frame; I use `ediff-setup-windows-plain'.
I don't know how to use `ediff-setup-windows-plain'. Can you give more
information?
I expect the right behaviour with `emacs -Q'. It doesn't matter what
configuration you have in your local area.
Btw, I am concerned that you might not have tried my recipe in first
place. May be you should...
> martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Fri, 05 Oct 2012 19:09:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 12218 <at> debbugs.gnu.org (full text, mbox):
> I don't know how to use `ediff-setup-windows-plain'. Can you give more
> information?
I have the following ediff-related settings in my .emacs:
(custom-set-variables
'(ediff-custom-diff-options "-c --binary")
'(ediff-grab-mouse nil)
'(ediff-merge-split-window-function (quote split-window-horizontally))
'(ediff-patch-options "-f --binary")
'(ediff-split-window-function (quote split-window-horizontally))
'(ediff-trees-file-ignore-regexp "\\`\\(\\.?#.*\\|.*,v\\|.*~\\|CVS\\|_darcs\\|.*\\.elc\\)\\'")
'(ediff-window-setup-function (quote ediff-setup-windows-plain)))
> I expect the right behaviour with `emacs -Q'. It doesn't matter what
> configuration you have in your local area.
It sometimes does. With multiple frames your window manager settings
might kick in.
> Btw, I am concerned that you might not have tried my recipe in first
> place. May be you should...
Be assured I did. With emacs -Q your scenario works without problems
here. But I remember that I had to set `ediff-grab-mouse' to nil with
my one-frame setup precisely because of the problem you described. I
suppose it's related to my `mouse-autoselect-window' settings but didn't
explore this issue any further.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Fri, 05 Oct 2012 19:42:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 12218 <at> debbugs.gnu.org (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
>> I don't know how to use `ediff-setup-windows-plain'. Can you give more
>> information?
>
> I have the following ediff-related settings in my .emacs:
>
> (custom-set-variables
> '(ediff-custom-diff-options "-c --binary")
> '(ediff-grab-mouse nil)
> '(ediff-merge-split-window-function (quote split-window-horizontally))
> '(ediff-patch-options "-f --binary")
> '(ediff-split-window-function (quote split-window-horizontally))
> '(ediff-trees-file-ignore-regexp
> "\\`\\(\\.?#.*\\|.*,v\\|.*~\\|CVS\\|_darcs\\|.*\\.elc\\)\\'")
> '(ediff-window-setup-function (quote ediff-setup-windows-plain)))
If my init file contains just the last line as below:
(custom-set-variables
'(ediff-window-setup-function (quote ediff-setup-windows-plain)))
then I get the expected behaviour.
>> I expect the right behaviour with `emacs -Q'. It doesn't matter what
>> configuration you have in your local area.
>
> It sometimes does. With multiple frames your window manager settings
> might kick in.
0. IMPORTANT: REMOVE all customizations and start with emacs -Q
1. C-x C-f lisp/register.el
2. C-x C-w register-1.el
3. Make some changes here and there in register-1.el
4. M-x ediff-files RET register.el RET register-1.el
5. Enusre that the control panel pops-up in a separate frame.
6. Keep pressing `n'
7. The focus NEVER LEAVES the control panel on my machine.
Summary: M-x vc-ediff RET is buggy while M-x ediff-files RET is NOT
buggy.
Given the above experiment/result do you still think that window manager
is at play here. My "gut" feeling says that vc-ediff is "forgetting"
some stuff. (Remember vc-ediff is fairly a new arrival)
>> Btw, I am concerned that you might not have tried my recipe in first
>> place. May be you should...
>
> Be assured I did. With emacs -Q your scenario works without problems
> here. But I remember that I had to set `ediff-grab-mouse' to nil with
> my one-frame setup precisely because of the problem you described. I
> suppose it's related to my `mouse-autoselect-window' settings but didn't
> explore this issue any further.
If multiple-frames is problematic (on some machines) shouldn't the
default be modified to be just plain.
But, in that case, people like me, who are used to seeing the control
panel float to top-right, will complain that the defaults are changed
:-).
> martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Sat, 06 Oct 2012 08:15:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 12218 <at> debbugs.gnu.org (full text, mbox):
> 0. IMPORTANT: REMOVE all customizations and start with emacs -Q
> 1. C-x C-f lisp/register.el
> 2. C-x C-w register-1.el
> 3. Make some changes here and there in register-1.el
> 4. M-x ediff-files RET register.el RET register-1.el
> 5. Enusre that the control panel pops-up in a separate frame.
> 6. Keep pressing `n'
> 7. The focus NEVER LEAVES the control panel on my machine.
>
> Summary: M-x vc-ediff RET is buggy while M-x ediff-files RET is NOT
> buggy.
`vc-ediff' ends up calling `ediff-setup' just like `ediff-files'. So
we'd have to find something that happens before these two calls that
affects the behavior of `ediff-next-difference'. Maybe in an assignment
to one of ediff's hooks. If you trace the calls to `ediff-setup' can
you see any differences?
> Given the above experiment/result do you still think that window manager
> is at play here. My "gut" feeling says that vc-ediff is "forgetting"
> some stuff. (Remember vc-ediff is fairly a new arrival)
No. What I meant was that the window manager might be at play when
comparing the behavior on your machine and mine or when comparing a
multiframe with a one-frame setup.
> If multiple-frames is problematic (on some machines) shouldn't the
> default be modified to be just plain.
If more people complained, this would probably happen. But IIUC ediff
is not very popular and largely unmaintained.
> But, in that case, people like me, who are used to seeing the control
> panel float to top-right, will complain that the defaults are changed
> :-).
Likely. I've been told on this list that my one-frame setup for ediff
is non-standard and any problems it causes "won't be a problem for most
users" ;-)
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Sat, 06 Oct 2012 17:52:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 12218 <at> debbugs.gnu.org (full text, mbox):
>> If multiple-frames is problematic (on some machines) shouldn't the
>> default be modified to be just plain.
>
> If more people complained, this would probably happen. But IIUC ediff
> is not very popular and largely unmaintained.
>
>> But, in that case, people like me, who are used to seeing the control
>> panel float to top-right, will complain that the defaults are changed
>> :-).
>
> Likely. I've been told on this list that my one-frame setup for ediff
> is non-standard and any problems it causes "won't be a problem for most
> users" ;-)
If you are collecting statistics on ediff usage on a one-frame setup,
here is what I have in ~/.emacs:
(custom-set-variables
'(ediff-split-window-function (quote split-window-horizontally))
'(ediff-window-setup-function (quote ediff-setup-windows-plain))
I guess people are not complaining about bad defaults because
they have customized them already.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Mon, 08 Oct 2012 06:58:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 12218 <at> debbugs.gnu.org (full text, mbox):
> I guess people are not complaining about bad defaults because
> they have customized them already.
While you're here - can you reproduce the OP's behavior?
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Mon, 08 Oct 2012 11:37:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 12218 <at> debbugs.gnu.org (full text, mbox):
> While you're here - can you reproduce the OP's behavior?
It seems this bug depends on the desktop environment (window manager).
I can't reproduce it on Gnome 2 (Metacity), but the screenshot shows
that OP uses Xfce (Xfwm).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Sun, 10 Feb 2013 02:53:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 12218 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov wrote:
> I can't reproduce it on Gnome 2 (Metacity), but the screenshot shows
> that OP uses Xfce (Xfwm).
Issues happens for me with XFCE and M-x ediff all the way back to at
least Emacs 22.3.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Sun, 10 Feb 2013 10:59:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 12218 <at> debbugs.gnu.org (full text, mbox):
>> I can't reproduce it on Gnome 2 (Metacity), but the screenshot shows
>> that OP uses Xfce (Xfwm).
>
> Issues happens for me with XFCE and M-x ediff all the way back to at
> least Emacs 22.3.
As I see Ediff selects the frame using `raise-frame' and
`set-mouse-position' instead of `frame-focus' as would be
more natural to do. Maybe this is the cause of this problem.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Sun, 10 Feb 2013 17:34:01 GMT)
Full text and
rfc822 format available.
Message #44 received at 12218 <at> debbugs.gnu.org (full text, mbox):
> As I see Ediff selects the frame using `raise-frame' and
> `set-mouse-position' instead of `frame-focus' as would be
> more natural to do. Maybe this is the cause of this problem.
Do you mean it should redirect frame focus?
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Mon, 11 Feb 2013 09:43:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 12218 <at> debbugs.gnu.org (full text, mbox):
> Do you mean it should redirect frame focus?
Maybe `redirect-frame-focus' is what is needed.
But unfortunately I can't reproduce this bug reliably
to try various solutions.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Mon, 11 Feb 2013 09:45:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 12218 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> jurta.org> writes:
>> Do you mean it should redirect frame focus?
>
> Maybe `redirect-frame-focus' is what is needed.
> But unfortunately I can't reproduce this bug reliably
> to try various solutions.
If you circulate a diff, I can try it out, as many times as you want.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Tue, 12 Feb 2013 18:00:02 GMT)
Full text and
rfc822 format available.
Message #53 received at 12218 <at> debbugs.gnu.org (full text, mbox):
>> But unfortunately I can't reproduce this bug reliably
>> to try various solutions.
>
> If you circulate a diff, I can try it out, as many times as you want.
Please try this patch:
=== modified file 'lisp/vc/ediff-util.el'
--- lisp/vc/ediff-util.el 2013-01-03 00:36:36 +0000
+++ lisp/vc/ediff-util.el 2013-02-12 17:47:25 +0000
@@ -786,7 +786,11 @@ (defun ediff-recenter (&optional no-rehi
(frame-live-p ediff-control-frame)
(not ediff-use-long-help-message)
(not (ediff-frame-iconified-p ediff-control-frame)))
- (raise-frame ediff-control-frame))
+ (if (fboundp 'select-frame-set-input-focus)
+ (select-frame-set-input-focus ediff-control-frame)
+ (raise-frame ediff-control-frame)
+ (select-frame ediff-control-frame)
+ (focus-frame ediff-control-frame)))
;; Redisplay whatever buffers are showing, if there is a selected difference
(let ((control-frame ediff-control-frame)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Wed, 13 Feb 2013 05:36:01 GMT)
Full text and
rfc822 format available.
Message #56 received at 12218 <at> debbugs.gnu.org (full text, mbox):
I recommend that this patch be applied. Works for me on my XFCE sytem.
Juri Linkov <juri <at> jurta.org> writes:
>>> But unfortunately I can't reproduce this bug reliably
>>> to try various solutions.
>>
>> If you circulate a diff, I can try it out, as many times as you want.
>
> Please try this patch:
>
> === modified file 'lisp/vc/ediff-util.el'
> --- lisp/vc/ediff-util.el 2013-01-03 00:36:36 +0000
> +++ lisp/vc/ediff-util.el 2013-02-12 17:47:25 +0000
> @@ -786,7 +786,11 @@ (defun ediff-recenter (&optional no-rehi
> (frame-live-p ediff-control-frame)
> (not ediff-use-long-help-message)
> (not (ediff-frame-iconified-p ediff-control-frame)))
> - (raise-frame ediff-control-frame))
> + (if (fboundp 'select-frame-set-input-focus)
> + (select-frame-set-input-focus ediff-control-frame)
> + (raise-frame ediff-control-frame)
> + (select-frame ediff-control-frame)
> + (focus-frame ediff-control-frame)))
>
> ;; Redisplay whatever buffers are showing, if there is a selected difference
> (let ((control-frame ediff-control-frame)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12218
; Package
emacs
.
(Wed, 13 Feb 2013 05:42:04 GMT)
Full text and
rfc822 format available.
Message #59 received at 12218 <at> debbugs.gnu.org (full text, mbox):
Jambunathan K <kjambunathan <at> gmail.com> writes:
> I recommend that this patch be applied. Works for me on my XFCE sytem.
Also verified with "emacs -Q".
>
>
> Juri Linkov <juri <at> jurta.org> writes:
>
>>>> But unfortunately I can't reproduce this bug reliably
>>>> to try various solutions.
>>>
>>> If you circulate a diff, I can try it out, as many times as you want.
>>
>> Please try this patch:
>>
>> === modified file 'lisp/vc/ediff-util.el'
>> --- lisp/vc/ediff-util.el 2013-01-03 00:36:36 +0000
>> +++ lisp/vc/ediff-util.el 2013-02-12 17:47:25 +0000
>> @@ -786,7 +786,11 @@ (defun ediff-recenter (&optional no-rehi
>> (frame-live-p ediff-control-frame)
>> (not ediff-use-long-help-message)
>> (not (ediff-frame-iconified-p ediff-control-frame)))
>> - (raise-frame ediff-control-frame))
>> + (if (fboundp 'select-frame-set-input-focus)
>> + (select-frame-set-input-focus ediff-control-frame)
>> + (raise-frame ediff-control-frame)
>> + (select-frame ediff-control-frame)
>> + (focus-frame ediff-control-frame)))
>>
>> ;; Redisplay whatever buffers are showing, if there is a selected difference
>> (let ((control-frame ediff-control-frame)
Reply sent
to
Juri Linkov <juri <at> jurta.org>
:
You have taken responsibility.
(Wed, 13 Feb 2013 08:46:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jambunathan K <kjambunathan <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 13 Feb 2013 08:46:02 GMT)
Full text and
rfc822 format available.
Message #64 received at 12218-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.3.50
>> I recommend that this patch be applied. Works for me on my XFCE sytem.
>
> Also verified with "emacs -Q".
Thanks for verifying. This is now installed in trunk, and the bug is closed.
PS: Note that (fboundp 'select-frame-set-input-focus) is added
for the case when Ediff is used with some other Emacs versions.
Its else-branch is like in `gnus-select-frame-set-input-focus'
in gnus-util.el.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 13 Mar 2013 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.