[ESS-bugs] select-window (C-c M-j) doesn't give input focus to target (*R*) [Carbon GNU Emacs]
Stephen Eglen
S.J.Eglen at damtp.cam.ac.uk
Sun Apr 2 20:01:00 CEST 2006
hi David,
>
> I am still getting that bug with a CVS Emacs and ESS 5.2.8.
>
> What system have you tried it on?
Scientific Linux.
> Mine is OS X (Carbon port essentially) and from the code in frame.el
> it looks like Windows might behave differently. I can't tell for sure
> - haven't tried.
> `eval-*-and-go' seem to evaluate and then call `ess-switch-to-ESS'.
> This function displays the buffer but doesn't select it according to
> the comment:
>
> ;; Display the buffer, but don't select it yet.
> (ess-show-buffer
> (buffer-name (process-buffer (get-process ess-current-process-name)))
> t)
>
> select-frame and select-window may be called, but this doesn't give
> input focus to the appropriate window. One must use `select-frame-set-
> input-focus' to achieve that.
ok. Have you gone through the logic in ess-show-buffer? IN
particular, see part 2:
;; 2. Maybe BUF visible in another frame.
(setq frame (ess-buffer-visible-other-frame buf))
(if frame
;; BUF is visible in frame, so just check frame is raised.
(if (not (eq (frame-visible-p frame) t))
;; frame is not yet visible, so raise it.
(raise-frame frame))
I'm not able to test this right now, but my memory the other day was
that the code at the end of ess-show-buffer was able to select-frame
and then put the mouse in that frame to make the frame active. I
wonder if that is the problem? (Maybe there is an interaction with
the O/s here, with mac requiring click of the window to grab the
focus?
> Note that the bug only occurs when you have two frames, one with a
> single window displaying the R source file, one with a single window
> displaying the *R* process buffer.
Can I clarify? If the frame containing *R* is currently split to show
more than one window, you do not see the bug?
> No, and I'm sorry, it wasn't actually `display-buffer' that saw the
> change, but raise-frame (e-mail by Yamamoto Mitsuharu, 9 Feb 2006, to
> emacs-pretest-bug). This only affects the OS X port, and I'm not sure
> if it really relates to this problem.
Okay. That makes sense.
More information about the ESS-bugs
mailing list