                  ;; to real buffers (`doom-real-buffer-p')
                  (doom/kill-this-buffer-in-all-windows buf t)
                  (doom--forget-file path)
+                 (doom--update-file path)
                  (message "Successfully deleted %s" short-path))))))))
 
 ;;;###autoload

    (when new-path
      (recentf-add-file new-path))
    (recentf-remove-if-non-kept old-path))
  (when (and projectile-mode
             (projectile-project-p)
             (projectile-file-cached-p old-path (projectile-project-root)))
    (projectile-purge-file-from-cache old-path))
  (when (bound-and-true-p save-place-mode)
    (save-place-forget-unreadable-files)))

(defun doom--copy-file (old-path new-path &optional force-p)
  (let* ((new-path (expand-file-name new-path))

  (interactive "F")
  (pcase (catch 'status
           (when-let* ((dest (doom--copy-file (buffer-file-name) new-path force-p)))
             (doom--update-file new-path)
             (message "File successfully copied to %s" dest)))
    (`overwrite-self (error "Cannot overwrite self"))
    (`aborted (message "Aborted"))
