anchor.diff:      (initialize-modes buffer)
       buffer))
   
  -(declaim (ftype (function (buffer)) rpc-buffer-delete))
   @export
   (defun rpc-buffer-delete (buffer)
     "Delete BUFFER from `*interface*'.
  -Run BUFFER's `buffer-delete-hook' over BUFFER before deleting it."
  +   Run BUFFER's `buffer-delete-hook' over BUFFER before deleting it."
     (next-hooks:run-hook (buffer-delete-hook buffer) buffer)
     (let ((parent-window (find-if
                           (lambda (window) (eql (active-buffer window) buffer))
                           (alexandria:hash-table-values (windows *interface*))))
           (replacement-buffer (or (%get-inactive-buffer)
                                   (rpc-buffer-make))))
  -    (%rpc-send "buffer_delete" (id buffer))
  +    ; (%rpc-send "buffer_delete" (id buffer))
       (when parent-window
         (window-set-active-buffer parent-window replacement-buffer))
       (remhash (id buffer) (buffers *interface*))
  
positive.code:       (ensure-parent-exists (cookies-path buffer)))
      (setf (gethash (id buffer) (buffers *interface*)) buffer)
      (incf (total-buffer-count *interface*))
      (%rpc-send "buffer_make" (id buffer)
                 `(("cookies-path" ,(namestring (cookies-path buffer)))))
      (unless (last-active-buffer *interface*)
        ;; When starting from a REPL, it's possible that the window is spawned in
        ;; the background and current-buffer would then return nil.
  
negative.code:     (gir:invoke (foreign-window-object 'show-all))
      window))
  
  @export
  (defun rpc-window-set-title (window title)
    "Set the title for a given window."
    ; (%rpc-send "window_set_title" (id window) title)
    )
  
  @export
  (defun rpc-window-delete (window)
    "Delete a window object and remove it from the hash of windows.
  Once deleted, the `window-will-close' RPC endpoint will be called, running
  INTERFACE's `window-delete-hook' over WINDOW."
    ;(%rpc-send "window_delete" (id window))
    )
  
  @export
  (defun rpc-window-active ()
    "Return the window object for the currently active window."
    (let ((window (gethash "goldfish"; (%rpc-send "window_active")
                           (windows *interface*))))
      (when window
        (setf (last-active-window *interface*) window))
      (last-active-window *interface*)))
  
  @export
  (defun rpc-window-exists (window)
    "Return if a window exists."
    ;(%rpc-send "window_exists" (id window))
    )
  
  @export
  (defun rpc-window-set-active-buffer (window buffer)
    "Set INTERFACE's WINDOW buffer to BUFFER.
  Run WINDOW's `window-set-active-buffer-hook' over WINDOW and BUFFER before
  proceeding."
    (next-hooks:run-hook (window-set-active-buffer-hook window) window buffer)
    ; (%rpc-send "window_set_active_buffer" (id window) (id buffer))
    (setf (active-buffer window) buffer)
    (when (and window buffer)
      (setf (last-active-buffer *interface*) buffer))
    buffer)
  
  @export
  (defun rpc-window-set-minibuffer-height (window height)
    ; (%rpc-send "window_set_minibuffer_height" (id window) height)
    )
  
  @export
  (defun rpc-buffer-make (&key title default-modes dead-buffer)
    "Make buffer with title TITLE and modes DEFAULT-MODES.
  