   (pcase thing
     (`[:tab ,tab] (mesh:find-prev-tab tab lst))
     (`[:session ,session] (mesh:find-prev-session session lst))))
+
+(cl-defun mesh:find-index (index things)
+  (colle:find
+   (lambda (x)
+     (eq index (glof:get x :index)))
+   things))
 
 (cl-defun mesh:find-next-pane (curpane panes)
   (cl-letf* ((indices (mesh:sort-numbers (mesh:get-indices panes)))


(cl-defun mesh:find-next-index-rec (index maxindex lst)
  (if (or (colle:empty-p lst)
          (eq index maxindex))
      nil
    (cl-letf* ((target (1+ index))
               (next (seq-find (lambda (e) (cl-equalp e target))  lst)))

                                            maxindex
                                            indices)))
    (if nextindex
        (mesh:find-index nextindex tabs)
      (mesh:find-index minindex tabs))))

(cl-defun mesh:find-next-session (cursession sessions)
  (cl-letf* ((cursessionpos (seq-position
