I want to get a list of all the windows and their frames, so I can jump directly to the frame and window.
If a buffer is not open in a window then the command should still jump to the last frame in which that buffer was displayed and open a window on the buffer in that frame, else it should open it in a frame designated as the default for opening existing buffers, or the current one if none has been set.
(mapcar (lambda (frame) (cons frame (list (window-list frame)))) (frame-list))
That will produce a list with elements consisting(FRAME (WINDOWS ....))
– lawlist Nov 1 '20 at 7:21