bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-AUCTeX] Interactive mode is not really interactive


From: David Reitter
Subject: Re: [Bug-AUCTeX] Interactive mode is not really interactive
Date: Thu, 6 Apr 2006 10:51:31 +0100

On 6 Apr 2006, at 08:32, David Kastrup wrote:

When, auctex's "Run interactive" is on, the window showing the
tex-compiler output does not become active, i.e. does not get
focus. So this window is not ready to receive keyboard input. This
is counter to the very meaning of "interactive."

Uh, no it isn't.  It is TeX which is started interactively.  The
semantics of AUCTeX are not changed.

P.S.: which is not to say that one might think about such a change.
But it would not be isolated to configurations where a separate frame
is used for everything and the kitchen sink.

No. The problem Konrad described is not just related to the fact that he likes to have separate frames for things, which can be done with `special-display-buffer-names' and friends, or, as in his case, very thoroughly with `one-buffer-one-frame-mode'.

However, the same issue occurs when you don't use that mode, but display the output in a separate window. Even then, input focus is not changed. This is because you open the output buffer via `with- output-to-temp-buffer', which is defined not to select the target window.

In my patch, which is just 3 lines of code and shouldn't need a signature from me (even though you can have that if you want), I just ensure that the input focus is changed:

    (let ((w (get-buffer-window buffer 'visible)))
(select-frame-set-input-focus (window-frame w)) ;; set input focus
      (select-window w))

Of course one can conceive of other ways to achieve the same result.

The problem with changing focus to an interactive session is that you
can no longer start AUCTeX commands without changing the focus back
again.  So it is probably advisable to only change focus at C-c C-l.
And even then, making the behavior different in interactive mode might
be surprising to some.

Well, I mean if you say it's "interactive", then I'd expect that you can interact with LaTeX compiler. Having the cursor there is something I'd actually expect.

The major mode in this buffer is comint-mode, so I don't know if you would want to make C-c ... keys do something from latex-mode. A compromise here might be to automatically remove the window (i.e. bury-buffer or so) as soon as the command that is run has finished.

We could use C-u C-c C-l for popping up a separate window _and_
changing focus in general.  And a customization option that makes C-c
C-l change focus when in interactive mode might also be possible.
And/or one that will automatically "C-c C-l" when an interactive
compilation is started.

Is that really necessary?
What use cases are there for interactive mode in a window that hasn't input focus?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]