all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Raising the Emacs frame in response to a DBUS signal
@ 2016-05-30  7:47 Tassilo Horn
  2016-05-30 11:36 ` cesar mena
  0 siblings, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2016-05-30  7:47 UTC (permalink / raw)
  To: emacs-devel

Hi all,

GNU AUCTeX supports inverse search for the Evince PDF viewer, i.e., when
you're writing a LaTeX document with Emacs/AUCTeX and view the compiled
PDF using Evince, you can Ctrl-click in Evince and Emacs jumps to the
corresponding text in your LaTeX editing buffer.  For that purpose,
Emacs is registered to handle SyncSource DBUS signals issued by Evince.

Since recently (no clue when as I normally don't use Evince but the PDF
Tools Emacs PDF viewer) in Emacs 25, the Emacs frame is not raised
anymore when the AUCTeX function handling the SyncSource signal is
called, and the problem is that I don't know how to achieve that again.

`raise-frame' seems to raise the selected frame above other Emacs frames
of the same Emacs instance but not above other applications (like
Evince).  Here in Gnome 3.20, I get at least a notification "Emacs is
ready" which I can click to switch to Emacs.  But the user who reported
the problem uses XFCE where nothing seems to happen.  Or better, point
in Emacs jumps to the right position but he has to switch to Emacs
explicitly.

Then I found `x-focus-frame' which seems to do what I want.  A simple
test case like evaluating

  (progn
    (sleep-for 5)
    (x-focus-frame (selected-frame)))

in *scratch* and then switching to another application brings Emacs to
the front again when the 5 seconds have passed.  However, when I add the
very same `x-focus-frame' call to the end of the AUCTeX SyncSource DBUS
handler function, it seems to have no effect.  The function is run and
switches to the right LaTeX editing buffer and sets point, but Emacs
the Emacs frame is not raised.

That's the actual function:

  http://git.savannah.gnu.org/cgit/auctex.git/tree/tex.el#n1849

In some previous version of the function I've called `raise-frame' at
the end but eventually removed that call.  Sadly, I'm don't know anymore
why I did that.  Either because the frame was raised anyhow or because
it didn't raise.

I checked the ChangeLogs but couldn't find some change which looks
relevant.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-04 12:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-30  7:47 Raising the Emacs frame in response to a DBUS signal Tassilo Horn
2016-05-30 11:36 ` cesar mena
2016-05-30 11:53   ` Tassilo Horn
2016-06-04  7:34     ` Eli Zaretskii
2016-06-04 12:59       ` Tassilo Horn

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.