           (package-install p))
         (setq eless-missing-packages '())))
   (error "The environment variable ELESS_ELPA needs to be set"))
-
-;; Remove Org that ships with Emacs from the `load-path' if installing
-;; it from Elpa.
-(when eless-install-org-from-elpa
-  (let* ((bin-dir (when (and invocation-directory
-                             (file-exists-p invocation-directory))
-                    (file-truename invocation-directory)))
-         (prefix-dir (when bin-dir
-                       (replace-regexp-in-string "bin/\\'" "" bin-dir)))
-         (share-dir (when prefix-dir
-                      (concat prefix-dir "share/")))
-         (lisp-dir-1 (when share-dir ;Possibility where the lisp dir is something like ../emacs/26.0.50/lisp/
-                       (concat share-dir "emacs/"
-                               ;; If `emacs-version' is x.y.z.w, remove the ".w" portion
-                               ;; Though, this is not needed and also will do nothing in emacs 26+
-                               ;; http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=22b2207471807bda86534b4faf1a29b3a6447536
-                               (replace-regexp-in-string "\\([0-9]+\\.[0-9]+\\.[0-9]+\\).*" "\\1" emacs-version)
-                               "/lisp/")))
-         (lisp-dir-2 (when share-dir ;Possibility where the lisp dir is something like ../emacs/25.2/lisp/
-                       (concat share-dir "emacs/"
-                               (replace-regexp-in-string "\\([0-9]+\\.[0-9]+\\).*" "\\1" emacs-version)
-                               "/lisp/"))))
-    (when eless-test-setup-verbose
-      (message "emacs bin-dir: %s" bin-dir)
-      (message "emacs prefix-dir: %s" prefix-dir)
-      (message "emacs share-dir: %s" share-dir)
-      (message "emacs lisp-dir-1: %s" lisp-dir-1)
-      (message "emacs lisp-dir-2: %s" lisp-dir-2))
-    (defvar eless-default-lisp-directory (cond
-                                          ((file-exists-p lisp-dir-1)
-                                           lisp-dir-1)
-                                          ((file-exists-p lisp-dir-2)
-                                           lisp-dir-2)
-                                          (t
-                                           nil))
-      "Directory containing lisp files for the Emacs installation.
-
-This value must match the path to the lisp/ directory of the
-Emacs installation.  If Emacs is installed using
---prefix=\"${PREFIX_DIR}\" this value would typically be
-\"${PREFIX_DIR}/share/emacs/<VERSION>/lisp/\"."))
-  (when eless-test-setup-verbose
-    (message "eless-default-lisp-directory: %S" eless-default-lisp-directory))
-
-  (with-eval-after-load 'package
-    ;; Remove Org that ships with Emacs from the `load-path'.
-    (when (stringp eless-default-lisp-directory)
-      (dolist (path load-path)
-        (when (string-match-p (expand-file-name "org" eless-default-lisp-directory) path)
-          (setq load-path (delete path load-path))))))
-
-  ;; (message "`load-path': %S" load-path)
-  ;; (message "`load-path' Shadows:")
-  ;; (message (list-load-path-shadows :stringp))
-  )
 
 ;;; Miscellaneous helper functions
 

                          (not (gnutls-available-p))))
             (url (concat (if no-ssl "http" "https") "://melpa.org/packages/")))
        (add-to-list 'package-archives (cons "melpa" url))) ;For `htmlize', `rainbow-delimiters'

      ;; Even if we don't need to install Org from Elpa, we need to
      ;; add Org Elpa in `package-archives' to prevent the "Package
      ;; ‘org-9.0’ is unavailable" error.
      (add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/")) ;For latest stable `org'

      ;; Load emacs packages and activate them.
      ;; Don't delete this line.


(defvar eless-packages '(htmlize rainbow-delimiters))
(when eless-install-org-from-elpa
  ;; Tue Feb 15 21:15:07 EST 2022 - kmodi
  ;; Put `org' at the beginning of `eless-packages' so that it
  ;; gets installed before any other package can `require' it.
  (add-to-list 'eless-packages 'org))

(defvar eless-git-root (progn
                         (require 'vc-git)
