<commit_before>;;; init.el --- Emacs Configuration                  -*- lexical-binding: t; -*-
;;
;;; Code:

;;; Require
(require 'cl-lib)

;;; Setup specific direcotry of loading emacs config
(when load-file-name
  (setq user-emacs-directory (file-name-directory load-file-name)))

;;; Add load path
(defvar my/inits-dir    (locate-user-emacs-file "inits/"))
(defvar my/packages-dir (locate-user-emacs-file (concat "packages/" emacs-version)))
(dolist (path (list my/inits-dir my/packages-dir))
  (let ((default-directory path))
    (add-to-list 'load-path default-directory)
    (if (and (file-directory-p default-directory)
             (fboundp 'normal-top-level-add-subdirs-to-load-path))
        (normal-top-level-add-subdirs-to-load-path))))

;;; Setup package manager
;; ELPA
(defvar package-user-dir my/packages-dir)
(package-initialize)
;; El-get
(defvar el-get-dir my/packages-dir)
(unless (require 'el-get nil 'noerror)
  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el")
    (goto-char (point-max))
    (eval-print-last-sexp)))

;;; El-get plugins
;; Lock package version by installed el-get
(el-get-bundle tarao/el-get-lock
  (el-get-lock))
;; Avoid warnings during the compilation to access a variable defined in the feature
(el-get-bundle tarao/with-eval-after-load-feature-el)

;;; Setup advanced require package macro
(el-get-bundle use-package)

;;; Load init files
(el-get-bundle! init-loader
  (setq init-loader-show-log-after-init 'error-only)
  (init-loader-load my/inits-dir))

;;; init.el ends here<commit_msg>refactor init.el<commit_after>;;; init.el --- Emacs Configuration                  -*- lexical-binding: t; -*-

;;; For isolation environment
(when load-file-name
  (setq user-emacs-directory (file-name-directory load-file-name)))

;;; Add to load path
(defvar my/inits-dir    (locate-user-emacs-file "inits/"))
(defvar my/packages-dir (locate-user-emacs-file (concat "packages/" emacs-version)))
(dolist (path (list my/inits-dir my/packages-dir))
  (let ((default-directory path))
    (add-to-list 'load-path default-directory)
    (if (and (file-directory-p default-directory)
             (fboundp 'normal-top-level-add-subdirs-to-load-path))
        (normal-top-level-add-subdirs-to-load-path))))

;;; Setup package namager
;; ELPA
(defvar package-user-dir my/packages-dir)
(package-initialize)
;; El-get
(defvar el-get-dir my/packages-dir)
(unless (require 'el-get nil 'noerror)
  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el")
    (goto-char (point-max))
    (eval-print-last-sexp)))
;; El-get plugins
(el-get-bundle tarao/el-get-lock
  (el-get-lock))

;;; Setup advanced require package macro
(el-get-bundle use-package)

;;; Load init files
(el-get-bundle! init-loader
  (setq init-loader-show-log-after-init 'error-only)
  (init-loader-load my/inits-dir))

;;; init.el ends here
{'fraction_non_alphanumeric': 0.1644474034620506, 'fraction_numerical': 0.0, 'mean_word_length': 3.539274924471299, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '709212', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1063, 'n_words': 218}