emacs-devel
[Top][All Lists]
Advanced

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

Re: How do I position a child-frame below the point?


From: martin rudalics
Subject: Re: How do I position a child-frame below the point?
Date: Sun, 07 Jan 2018 17:09:04 +0100

> Question #1: I'm trying to create a new child-frame and position it
> below the point in the parent frame. If I don't use a child-frame, this
> isn't hard:
>
> (defun make-peek-frame ()
>    (interactive)
>    (let* ((current-frame (selected-frame))
>           (abs-pixel-pos (save-excursion
>                            (beginning-of-thing 'symbol)
>                            (window-absolute-pixel-position)))

`window-absolute-pixel-position' is a function I wrote so on systems
where child frames are not available (or do not behave well) normal
frames can be used instead.  If you look at its code you will see that
`pos-visible-in-window-p' does all the work, so that's the function to
use.  Thereafter you have to translate window coordinates to native
frame coordinates using `window-inside-pixel-edges' IIRC.  Our
documentation of this is still unsatisfactory.

> Question #3:
>
> How do I hide the point? I've tried (cursor-type . nil) as above, but it
> shows up as a block nonetheless. I do wonder if evil is doing that,
> however...

Which "evil"?  The window manager?

martin



reply via email to

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