 
 (defun +eshell--unused-buffer (&optional new-p)
   (or (unless new-p
-        (cl-loop for buf in (ring-elements +eshell-buffers)
+        (cl-loop for buf in (+eshell-buffers)
                  if (and (buffer-live-p buf)
                          (not (get-buffer-window buf t)))
                  return buf))

;;

(defun +eshell--add-buffer (buf)
  (ring-remove+insert+extend +eshell-buffers buf))

(defun +eshell--remove-buffer (buf)
  (when-let* ((idx (ring-member +eshell-buffers buf)))

  "Interactively switch to another eshell buffer."
  (interactive
   (let ((buffers (doom-buffers-in-mode
                   'eshell-mode (delq (current-buffer) (+eshell-buffers)))))
     (if (not buffers)
         (user-error "No eshell buffers are available")
       (list
