* Re: How to get a window Lisp_Object from struct window *w?
@ 2018-09-18 16:29 Keith David Bershatsky
0 siblings, 0 replies; 4+ messages in thread
From: Keith David Bershatsky @ 2018-09-18 16:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Thank you, Eli. Greatly appreciated!
Keith
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> Date: [09-18-2018 01:24:14] <18 Sep 2018 11:24:14 +0300>
> From: Eli Zaretskii <eliz@gnu.org>
> To: Keith David Bershatsky <esq@lawlist.com>
> CC: emacs-devel@gnu.org
> Subject: Re: How to get a window Lisp_Object from struct window *w?
>
> > Date: Mon, 17 Sep 2018 17:57:45 -0700
> > From: Keith David Bershatsky <esq@lawlist.com>
> >
> > I was wondering if there is a more efficient way to derive window from a struct window *w?
>
> Like this:
>
> struct window *w;
> Lisp_Object window;
> XSETWINDOW (window, w);
^ permalink raw reply [flat|nested] 4+ messages in thread
* How to get a window Lisp_Object from struct window *w?
@ 2018-09-18 0:57 Keith David Bershatsky
2018-09-18 2:19 ` Stefan Monnier
2018-09-18 8:24 ` Eli Zaretskii
0 siblings, 2 replies; 4+ messages in thread
From: Keith David Bershatsky @ 2018-09-18 0:57 UTC (permalink / raw)
To: Emacs Devel
I am chiseling away at feature requests #17684 (crosshairs) and #22873 (multiple fake cursors).
In this particular example, redisplay gives us the w (struct window *w) as it goes through each window. I am recording the window Lisp_Object in a cache (also a Lisp_Object) and am later checking that cache to see if w == XWINDOW (window). There is no guarantee that the window that I am interested in is the selected_window, and the functions giving me the w do not provide the window as an incoming argument. I see that I can use:
Lisp_Object window = window_from_coordinates (f, opoint_x, opoint_y, &part, true);
get-buffer-window/w->contents is not helpful because there may be more than one window on the frame displaying the same buffer.
I was wondering if there is a more efficient way to derive window from a struct window *w?
Thanks,
Keith
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-18 16:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18 16:29 How to get a window Lisp_Object from struct window *w? Keith David Bershatsky
-- strict thread matches above, loose matches on Subject: below --
2018-09-18 0:57 Keith David Bershatsky
2018-09-18 2:19 ` Stefan Monnier
2018-09-18 8:24 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).