auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Bring back the focus to emacs from viewer (was Re: [P


From: Mosè Giordano
Subject: Re: [AUCTeX-devel] Bring back the focus to emacs from viewer (was Re: [PATCH] When using SyncTeX with Evince, do not switch focus after syncing.)
Date: Fri, 29 Sep 2017 15:30:09 +0200

2017-09-29 15:05 GMT+02:00 Ikumi Keita <address@hidden>:
> Hmm...then, it might be necessary to wait a little before trying to
> bring back the focus.  Unlike Evince, Okular is called with normal
> `TeX-run-discard' hook and runs asynchoronously, so the function
> `select-frame-set-input-focus' in question might run too early, when
> okular is not yet ready.
>
> If this speculation is right, this kind of treatment is valid for okular?
>     (when (and TeX-view-keep-focus
>                (string= name "View"))
>       (sit-for 0.3)
>       (cond ((fboundp #'select-frame-set-input-focus)
>              (select-frame-set-input-focus (selected-frame)))
>             ((fboundp #'x-focus-frame)
>              (x-focus-frame (selected-frame)))
>             ((fboundp #'focus-frame)
>              (focus-frame (selected-frame)))))))

No, doesn't help.  Not even stretching the waiting time.

Bye,
Mosè



reply via email to

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