help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Hinting X window position for new frames


From: Colin S. Miller
Subject: Re: Hinting X window position for new frames
Date: Sun, 31 May 2009 22:35:19 +0100
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)


Alex Bennee wrote:
"(new-frame (list 'top 0 'left 0))"
Hi,

One particularly annoying habit of using emacsclient to launch a new
window is my window manager places the new window on a different
workspace to where I launched emacsclient from. Is there any way I can
avoid it doing this?

Is this a window manager issue rather than an emacs issues?


Alex,

gnuclient -batch -eval "(new-frame (list 'top 100 'left 0) (make-x-device) )"

will create a new frame at +0+100, of a default size.
The (make-x-device) seems to be optional, but it might be a wise idea to use it.

Determining the location to place the new frame is left as an exercise to the 
interested reader.

In theory, it should be possible to ask the X server if a process (by PID) is 
attached to it,
and if so, what is its window's location(s).

A wrapper-script around emacsclient would do this for its PPID (probably bash), 
and then that's PPID
(probably the terminal emulator), until the terminal emulator or init is 
reached.


HTH,
Colin S. Miller




--
Replace the obvious in my email address with the first three letters of the 
hostname to reply.


reply via email to

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