<commit_before>
;;; EMACS --- jdw's emacs config file
;;; 
;;; This is my emacs config. Hack away at it to your liking! I've copied
;;; bits and pieces of it from other smart folks and added my own flavour
;;; to it. Here's a list of my sources. 
;;;
;;; INSPIRATION:
;;; - <NAME>: http://steve.yegge.googlepages.com/my-dot-emacs-file
;;; - <NAME>: http://aaronbedra.com/emacs.d/
;;;

;;; Code:

;; User details
(setq user-full-name "<NAME>")
(setq user-mail-address "<EMAIL>")

;; Package Management
(require 'package)
(package-initialize "no-activate")

;; Additonal repositories
(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
             '("elpa" . "http://tromey.com/elpa/"))

(setq package-archive-enable-alist '(("melpa" deft magit)))

(let ((default-directory "~/.emacs.d/elpa/"))
  (normal-top-level-add-subdirs-to-load-path))

(when (not (package-installed-p 'cl-lib))
  (package-install 'cl-lib))

(add-to-list 'load-path "~/.emacs.d/cl-lib/")
(require 'cl-lib)

(defvar default-packages
  '(auto-complete
    coffee-mode 
    dash
    flycheck 
    flymake-easy
    flymake-jshint 
    flymake-jslint
    flymake-php
    flymake-ruby
    inf-ruby
    key-chord
    less-css-mode
    list-utils
    yasnippet
    markdown-mode
    markdown-toc
    multiple-cursors
    paredit
    php-mode
    pkg-info
    popup
    projectile
    ruby-block
    ruby-electric
    rw-hunspell
    s
    scss-mode
    smartparens
    web-mode
    yaml-mode
    yari)
  "A list of packages to ensure are installed at launch.")

(defun default-packages-installed-p ()
  (loop for p in default-packages
        when (not (package-installed-p p)) do (return nil)
        finally (return t)))

(unless (default-packages-installed-p)
  ;; check for new packages (package versions)
  (message "%s" "Emacs is now refreshing its package database...")
  (package-refresh-contents)
  (message "%s" " done.")
  ;; install the missing packages
  (dolist (p default-packages)
    (when (not (package-installed-p p))
      (package-install p))))


;;;;;;;;;;;;;;;;;;;
;; PACKAGE SETUP ;;
;;;;;;;;;;;;;;;;;;;

(require 'auto-complete)
(require 'smartparens-config)
(require 'yasnippet)
(require 'multiple-cursors)
(require 'auto-complete-config)

(add-to-list 'ac-dictionary-directories "~/.emacs.d/dict")
(ac-config-default)
(ac-complete-yasnippet)
;;(payas/ac-setup)
(put 'downcase-region 'disabled nil)
(autoload 'inf-ruby-minor-mode "inf-ruby" "Run an inferior Ruby process" t)

;;;;;;;;;;;;;;;;;;;;;;;;
;; USER CONFIGURABLES ;;
;;;;;;;;;;;;;;;;;;;;;;;;

(setq rcirc-server-alist
      '(("irc.freenode.net" :port 6697 :encryption tls
	 :channels ("#rcirc" "#emacs" "#emacswiki"))))
(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-number
        gnus-thread-sort-by-date))
(setq yas-global-mode 1)
(setq ac-sources '(ac-source-semantic ac-source-yasnippet))
;; set autosaves to temp dir
(setq backup-directory-alist
      `((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
      `((".*" ,temporary-file-directory t)))
(setq org-agenda-include-diary t)
(setq diary-file "~/Organiser/Diary")
(setq org-agenda-files '("~/Organiser/agendas") )
(setq ruby-insert-encoding-magic-comment nil)
(setq flyspell-issue-welcome-flag nil)
(setq inhibit-splash-screen t
      initial-scratch-message nil
      initial-major-mode 'org-mode)
(setq tab-width 4
      indent-tabs-mode nil)
(setq ring-bell-function 'ignore)
(setq column-number-mode t)
(tool-bar-mode -1)
(auto-compression-mode 1)

;; ispell setup
(if (eq system-type 'darwin)
    (setq-default ispell-program-name "/usr/local/bin/aspell")
  (setq-default ispell-program-name "/usr/bin/aspell"))
(setq-default ispell-list-command "list")

;;;;;;;;;;;
;; LOOKS ;;
;;;;;;;;;;;

;; set a theme for GUI and terminal modes
(if window-system
    (load-theme 'evenhold t)
  (load-theme 'wombat t))

(add-to-list 'default-frame-alist '(fullscreen . maximized))

;;;;;;;;;;;;;;;;;;;;
;; USER FUNCTIONS ;;
;;;;;;;;;;;;;;;;;;;;

;; Go fullscreen on current frame
(defun toggle-fullscreen (&optional f)<commit_msg>fox config for terminal mode<commit_after>
;;; EMACS --- jdw's emacs config file
;;; 
;;; This is my emacs config. Hack away at it to your liking! I've copied
;;; bits and pieces of it from other smart folks and added my own flavour
;;; to it. Here's a list of my sources. 
;;;
;;; INSPIRATION:
;;; - <NAME>: http://steve.yegge.googlepages.com/my-dot-emacs-file
;;; - <NAME>: http://aaronbedra.com/emacs.d/
;;;

;;; Code:

;; User details
(setq user-full-name "<NAME>")
(setq user-mail-address "<EMAIL>")

;; Package Management
(require 'package)
(package-initialize "no-activate")

;; Additonal repositories
(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
             '("elpa" . "http://tromey.com/elpa/"))

(setq package-archive-enable-alist '(("melpa" deft magit)))

(let ((default-directory "~/.emacs.d/elpa/"))
  (normal-top-level-add-subdirs-to-load-path))

(when (not (package-installed-p 'cl-lib))
  (package-install 'cl-lib))

(add-to-list 'load-path "~/.emacs.d/cl-lib/")
(require 'cl-lib)

(defvar default-packages
  '(auto-complete
    coffee-mode 
    dash
    flycheck 
    flymake-easy
    flymake-jshint 
    flymake-jslint
    flymake-php
    flymake-ruby
    inf-ruby
    key-chord
    less-css-mode
    list-utils
    yasnippet
    markdown-mode
    markdown-toc
    multiple-cursors
    paredit
    php-mode
    pkg-info
    popup
    projectile
    ruby-block
    ruby-electric
    rw-hunspell
    s
    scss-mode
    smartparens
    web-mode
    yaml-mode
    yari)
  "A list of packages to ensure are installed at launch.")

(defun default-packages-installed-p ()
  (loop for p in default-packages
        when (not (package-installed-p p)) do (return nil)
        finally (return t)))

(unless (default-packages-installed-p)
  ;; check for new packages (package versions)
  (message "%s" "Emacs is now refreshing its package database...")
  (package-refresh-contents)
  (message "%s" " done.")
  ;; install the missing packages
  (dolist (p default-packages)
    (when (not (package-installed-p p))
      (package-install p))))


;;;;;;;;;;;;;;;;;;;
;; PACKAGE SETUP ;;
;;;;;;;;;;;;;;;;;;;

(require 'auto-complete)
(require 'smartparens-config)
(require 'yasnippet)
(require 'multiple-cursors)
(require 'auto-complete-config)

(add-to-list 'ac-dictionary-directories "~/.emacs.d/dict")
(ac-config-default)
(ac-complete-yasnippet)
;;(payas/ac-setup)
(put 'downcase-region 'disabled nil)
(autoload 'inf-ruby-minor-mode "inf-ruby" "Run an inferior Ruby process" t)

;;;;;;;;;;;;;;;;;;;;;;;;
;; USER CONFIGURABLES ;;
;;;;;;;;;;;;;;;;;;;;;;;;

(setq rcirc-server-alist
      '(("irc.freenode.net" :port 6697 :encryption tls
	 :channels ("#rcirc" "#emacs" "#emacswiki"))))
(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-number
        gnus-thread-sort-by-date))
(setq yas-global-mode 1)
(setq ac-sources '(ac-source-semantic ac-source-yasnippet))
;; set autosaves to temp dir
(setq backup-directory-alist
      `((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
      `((".*" ,temporary-file-directory t)))
(setq org-agenda-include-diary t)
(setq diary-file "~/Organiser/Diary")
(setq org-agenda-files '("~/Organiser/agendas") )
(setq ruby-insert-encoding-magic-comment nil)
(setq flyspell-issue-welcome-flag nil)
(setq inhibit-splash-screen t
      initial-scratch-message nil
      initial-major-mode 'org-mode)
(setq tab-width 4
      indent-tabs-mode nil)
(setq ring-bell-function 'ignore)
(setq column-number-mode t)
(auto-compression-mode 1)

;; ispell setup
(if (eq system-type 'darwin)
    (setq-default ispell-program-name "/usr/local/bin/aspell")
  (setq-default ispell-program-name "/usr/bin/aspell"))
(setq-default ispell-list-command "list")

;;;;;;;;;;;
;; LOOKS ;;
;;;;;;;;;;;

;; set a theme for GUI and terminal modes
(if window-system
    (load-theme 'evenhold t)
  (load-theme 'wombat t))

(if window-system
    (tool-bar-mode -1)
  nil)

(add-to-list 'default-frame-alist '(fullscreen . maximized))

;;;;;;;;;;;;;;;;;;;;
;; USER FUNCTIONS ;;
;;;;;;;;;;;;;;;;;;;;

;; Go fullscreen on current frame
(defun toggle-fullscreen (&optional f)
{'fraction_non_alphanumeric': 0.1862052448808526, 'fraction_numerical': 0.0019159382109926954, 'mean_word_length': 3.529284164859002, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '6144870', 'n_tokens_mistral': 3199, 'n_tokens_neox': 2999, 'n_words': 680}