<commit_before>(require 'package)
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)

(use-package use-package-ensure-system-package)

(defvar dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
(defvar dotfiles-lib-dir (concat dotfiles-dir "lib/"))
(defvar dotfiles-etc-dir (concat dotfiles-dir "etc/"))

(add-to-list 'load-path dotfiles-lib-dir)

(setq gc-cons-threshold 20000000)

;;; utf8
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(setq-default buffer-file-coding-system 'utf-8)

;; Treat clipboard input as UTF-8 string first; compound text next, etc.
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))

;;; built-in

;; better display for buffers with the same name
(require 'uniquify)
(setq uniquify-buffer-name-style 'forward)

;; colorise ansi codes
(require 'ansi-color)
(defun display-ansi-colors ()
  (interactive)
  (ansi-color-apply-on-region (point-min) (point-max)))

(setq
 ;; Put autosave files (ie #foo#) and backup files (ie foo~) in the tmp dir
 ;; store all backup and autosave files in the tmp dir
 backup-directory-alist `((".*" . ,temporary-file-directory))
 auto-save-file-name-transforms `((".*" ,temporary-file-directory t))
 auto-save-list-file-name (concat temporary-file-directory "emacs-autosave-list")

 ;; Remove scratch buffer message<commit_msg>Colorize compilation buffer (node tests)<commit_after>(require 'package)
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)

(use-package use-package-ensure-system-package)

(defvar dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
(defvar dotfiles-lib-dir (concat dotfiles-dir "lib/"))
(defvar dotfiles-etc-dir (concat dotfiles-dir "etc/"))

(add-to-list 'load-path dotfiles-lib-dir)

(setq gc-cons-threshold 20000000)

;;; utf8
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(setq-default buffer-file-coding-system 'utf-8)

;; Treat clipboard input as UTF-8 string first; compound text next, etc.
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))

;;; built-in

;; better display for buffers with the same name
(require 'uniquify)
(setq uniquify-buffer-name-style 'forward)

;; colorise ansi codes
(require 'ansi-color)
(defun display-ansi-colors ()
  (interactive)
  (ansi-color-apply-on-region (point-min) (point-max)))

(defun colorize-compilation-buffer ()
  (read-only-mode -1)
  (ansi-color-apply-on-region compilation-filter-start (point))
  (read-only-mode +1))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)

(setq
 ;; Put autosave files (ie #foo#) and backup files (ie foo~) in the tmp dir
 ;; store all backup and autosave files in the tmp dir
 backup-directory-alist `((".*" . ,temporary-file-directory))
 auto-save-file-name-transforms `((".*" ,temporary-file-directory t))
 auto-save-list-file-name (concat temporary-file-directory "emacs-autosave-list")

 ;; Remove scratch buffer message
{'fraction_non_alphanumeric': 0.16769388803287108, 'fraction_numerical': 0.009244992295839754, 'mean_word_length': 4.787518573551263, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '5249120', 'n_tokens_mistral': 1425, 'n_tokens_neox': 1375, 'n_words': 303}