[Top][All Lists]

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

emacsclient/server finished, documentation, raising frames

From: Juanma Barranquero
Subject: emacsclient/server finished, documentation, raising frames
Date: Tue, 7 Nov 2006 13:00:47 +0100

Except for the little question discussed below, all work on
emacsclient/server is now complete. No changes will be commited by me
unless something breaks. In the next few days I expect to commit
patches to documentation (FAQ and the Emacs manual), though I hope
somebody will check it afterwards: my writing skills in English are

[All the following is Windows-specific; please skip it if you're not

I've just checked in a patch to emacsclient that allows it to bring
Emacs to front just before passing it a file. "Allows" is the
operative word: Emacs won't be the foreground app unless it does
something to be, that is, call `raise-frame'.

As I see it, there are four ways to do it:

1) Modify `server-switch-buffer' to raise the frame. Hairy.
`server-switch-buffer' already does quite a lot of things to try to
determine the right buffer/window/frame (and in some cases it already
calls `raise-frame'), so I don't think it is wise to mess with it.

 2) Modify `server-process-filter' to call `raise-frame' just after
calling `server-switch-buffer' and before running the
`server-switch-hook'. Easy. On the other hand, I'm not sure we want to
always raise the frame, after all (or even, what is the *right* frame
to raise, on multi-frame setups).

3) Add `raise-frame' to `server-switch-hook' (which could be done
conditionally, just on Windows). Easier still; same problems that
previous way.

 4) Do nothing, and document the issue, so users can just do 3) on
their .emacs. Easiest of all; OTOH, I'm a bit reluctant because
server/emacsclient should work "right" just out of the box.

I'm partial to 3), i.e., adding `raise-frame' to `server-switch-hook'
on Windows, which works well with the default value of

Now, the real question: could people with non-nil `server-window', or
multi-frame setups, try adding `raise-frame' to `server-switch-hook'
and see whether it works as expected? My setup is strictly one-frame,
so I don't know really what to expect from emacsclient/server on
multi-frame configurations.


reply via email to

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