summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/work_inits/01-basic.elcbin0 -> 4329 bytes
-rw-r--r--emacs/work_inits/02-modeline.el36
-rw-r--r--emacs/work_inits/02-modeline.elcbin0 -> 1571 bytes
-rw-r--r--emacs/work_inits/03-miscload.el8
-rw-r--r--emacs/work_inits/03-miscload.elcbin0 -> 886 bytes
-rw-r--r--emacs/work_inits/05-helpful.el17
-rw-r--r--emacs/work_inits/05-helpful.elcbin0 -> 3194 bytes
-rw-r--r--emacs/work_inits/11-completion.elcbin0 -> 18175 bytes
-rw-r--r--emacs/work_inits/13-ibuffer.elcbin0 -> 2843 bytes
-rw-r--r--emacs/work_inits/14-movement.el110
-rw-r--r--emacs/work_inits/14-movement.elcbin0 -> 12399 bytes
-rw-r--r--emacs/work_inits/15-project-mgmt.elcbin0 -> 2944 bytes
-rw-r--r--emacs/work_inits/20-programming.elcbin0 -> 11057 bytes
-rw-r--r--emacs/work_inits/21-functional.el42
-rw-r--r--emacs/work_inits/21-functional.elcbin0 -> 8861 bytes
-rw-r--r--emacs/work_inits/22-lisp.el104
-rw-r--r--emacs/work_inits/22-lisp.elcbin0 -> 4126 bytes
-rw-r--r--emacs/work_inits/23-text-related.el175
-rw-r--r--emacs/work_inits/23-text-related.elcbin0 -> 5013 bytes
-rw-r--r--emacs/work_inits/27-gemini.el61
-rw-r--r--emacs/work_inits/27-gemini.elcbin0 -> 3855 bytes
-rw-r--r--emacs/work_inits/50-file-assocs.el20
-rw-r--r--emacs/work_inits/50-file-assocs.elcbin0 -> 1512 bytes
-rw-r--r--emacs/work_inits/60-misc-configs.el22
-rw-r--r--emacs/work_inits/60-misc-configs.elcbin0 -> 1590 bytes
-rw-r--r--emacs/work_inits/70-global-keybinds.el49
-rw-r--r--emacs/work_inits/70-global-keybinds.elcbin0 -> 2019 bytes
-rw-r--r--emacs/work_inits/99-last.el8
-rw-r--r--emacs/work_inits/99-last.elcbin0 -> 680 bytes
29 files changed, 652 insertions, 0 deletions
diff --git a/emacs/work_inits/01-basic.elc b/emacs/work_inits/01-basic.elc
new file mode 100644
index 0000000..7e9830b
--- /dev/null
+++ b/emacs/work_inits/01-basic.elc
Binary files differ
diff --git a/emacs/work_inits/02-modeline.el b/emacs/work_inits/02-modeline.el
new file mode 100644
index 0000000..6ea2b07
--- /dev/null
+++ b/emacs/work_inits/02-modeline.el
@@ -0,0 +1,36 @@
+;; Time-stamp: <2021-09-27 08h47 EDT (hobbies)>
+
+;; -----------------------------------------------------------------------------
+;; Mode-line
+;;
+;; The mode-line is set to eliminate duplicate information between buffers.
+;; Everything else is intended to be displayed in another, centralised location.
+
+(defun abbreviate-left-trim-path (p len)
+ (let ((pa (abbreviate-file-name p)))
+ (if (> (length pa) (+ 3 len))
+ (format "...%s" (substring pa (- (length pa) len)))
+ pa)))
+
+(setq display-time-format "%d/%H.%M"
+ display-time-default-load-average nil)
+(display-time-mode 1)
+
+(setq global-mode-string nil)
+(setq-default mode-line-format
+ '("" mode-line-front-space
+ mode-line-modified "%@"
+ " %l:%c %[" mode-line-buffer-identification "%] %I"
+ " " mode-line-modes ;; (vc-mode vc-mode)
+ (:eval (abbreviate-left-trim-path default-directory 20))
+ mode-line-misc-info mode-line-end-spaces))
+
+;; -----------------------------------------------------------------------------
+;; Minions to clean mode-line
+
+(use-package minions
+ :ensure t
+ :config
+ (setq minions-mode-line-lighter ":"
+ minions-direct '(god-local-mode))
+ (minions-mode 1))
diff --git a/emacs/work_inits/02-modeline.elc b/emacs/work_inits/02-modeline.elc
new file mode 100644
index 0000000..e0dc4dc
--- /dev/null
+++ b/emacs/work_inits/02-modeline.elc
Binary files differ
diff --git a/emacs/work_inits/03-miscload.el b/emacs/work_inits/03-miscload.el
new file mode 100644
index 0000000..6f4ffbf
--- /dev/null
+++ b/emacs/work_inits/03-miscload.el
@@ -0,0 +1,8 @@
+;; Time-stamp: <2020-08-12 22:25:58 (user@hobbies)>
+
+(use-package siege-mode
+ :load-path "~/.emacs.d/scripts/siege-mode/")
+
+;; (use-package maxima
+;; :defer t
+;; :config (setq imaxima-use-maxima-mode-flag t))
diff --git a/emacs/work_inits/03-miscload.elc b/emacs/work_inits/03-miscload.elc
new file mode 100644
index 0000000..741b5be
--- /dev/null
+++ b/emacs/work_inits/03-miscload.elc
Binary files differ
diff --git a/emacs/work_inits/05-helpful.el b/emacs/work_inits/05-helpful.el
new file mode 100644
index 0000000..f8ac203
--- /dev/null
+++ b/emacs/work_inits/05-helpful.el
@@ -0,0 +1,17 @@
+;; Time-stamp: <2019-01-26 12:49:57 (tslil@winslow)>
+
+(use-package helpful
+ :ensure t
+ :bind (("C-h f" . helpful-callable)
+ ("C-h v" . helpful-variable)
+ ("C-h k" . helpful-key)
+ ("C-h F" . helpful-function)
+ ("C-c h" . heplful-at-point))
+ :config
+ (advice-add #'describe-key :override #'helpful-key)
+ (advice-add #'describe-function :override #'helpful-callable)
+ (advice-add #'describe-variable :override #'helpful-variable)
+ (advice-add #'describe-symbol :override #'helpful-symbol))
+
+(use-package apropos
+ :config (setq apropos-do-all t))
diff --git a/emacs/work_inits/05-helpful.elc b/emacs/work_inits/05-helpful.elc
new file mode 100644
index 0000000..783abef
--- /dev/null
+++ b/emacs/work_inits/05-helpful.elc
Binary files differ
diff --git a/emacs/work_inits/11-completion.elc b/emacs/work_inits/11-completion.elc
new file mode 100644
index 0000000..b88cc25
--- /dev/null
+++ b/emacs/work_inits/11-completion.elc
Binary files differ
diff --git a/emacs/work_inits/13-ibuffer.elc b/emacs/work_inits/13-ibuffer.elc
new file mode 100644
index 0000000..077c67e
--- /dev/null
+++ b/emacs/work_inits/13-ibuffer.elc
Binary files differ
diff --git a/emacs/work_inits/14-movement.el b/emacs/work_inits/14-movement.el
new file mode 100644
index 0000000..a411277
--- /dev/null
+++ b/emacs/work_inits/14-movement.el
@@ -0,0 +1,110 @@
+;; Time-stamp: <2021-09-27 08h47 EDT (hobbies)>
+
+;; -------------------------------------------------------------------
+;; Repeated key presses for region
+
+(use-package expand-region :ensure t
+ :bind (("M-r" . er/expand-region))
+ :config
+ (setq expand-region-fast-keys-enabled t
+ expand-region-contract-fast-key "c"
+ expand-region-reset-fast-key "e"
+ expand-region-autocopy-register "i"))
+
+;; -------------------------------------------------------------------
+;; Window switching
+
+(use-package switch-window :ensure t
+ :bind (("C-x o" . switch-window)
+ ("C-x C-o" . other-frame)
+ ("C-c o" . switch-window)
+ ("C-c n" . switch-window-then-maximize)
+ :map switch-window-extra-map
+ ("u" . switch-window-mvborder-up)
+ ("e" . switch-window-mvborder-down)
+ ("n" . switch-window-mvborder-left)
+ ("o" . switch-window-mvborder-right)
+ ("i" . nil)
+ ("j" . nil)
+ ("k" . nil)
+ ("l" . nil))
+ :config
+ (setq switch-window-input-style 'minibuffer
+ switch-window-shortcut-style 'qwerty
+ switch-window-multiple-frames nil
+ switch-window-qwerty-shortcuts
+ '("a" "r" "s" "t" "n" "e" "i" "o")))
+
+;; -------------------------------------------------------------------
+;; Character jumping
+
+(use-package avy
+ :ensure t
+ :demand
+ :bind (("C-," . avy-goto-char-timer)
+ ("C-." . avy-goto-char-in-line)
+ ("M-g s" . avy-goto-word-or-subword-1)
+ ("M-g w" . avy-goto-word-1)
+ ("M-g a" . avy-goto-word-0)
+ ("M-g C-g" . avy-goto-line))
+ :config
+ (setq avy-keys '(?a ?r ?s ?t ?g ?k ?n ?e ?i ?o ?q ?w ?f ?p)
+ avy-dispatch-alist '((?w . avy-action-kill-move)
+ (?W . avy-action-kill-stay)
+ (?j . avy-action-teleport)
+ (?m . avy-action-mark)
+ (?c . avy-action-copy)
+ (?y . avy-action-yank)
+ (?i . avy-action-ispell)
+ (?z . avy-action-zap-to-char))))
+
+;; -------------------------------------------------------------------
+;; General stuff
+
+;; (global-set-key (kbd "C-b") 'recenter-top-bottom)
+;; (global-set-key (kbd "M-b") 'downcase-word)
+;; (global-set-key (kbd "C-l") 'backward-char)
+;; (global-set-key (kbd "M-l") 'backward-word)
+
+(global-set-key (kbd "C-M-e") 'end-of-buffer)
+(global-set-key (kbd "C-M-a") 'beginning-of-buffer)
+
+(global-set-key (kbd "M-h") 'backward-kill-word)
+
+(global-set-key (kbd "M-z") 'zap-up-to-char)
+
+;; Fast movement
+(global-set-key (kbd "M-n") 'scroll-up-command)
+(global-set-key (kbd "M-p") 'scroll-down-command)
+
+(global-set-key (kbd "C-S-n")
+ (lambda () (interactive) (ignore-errors (forward-line 5))))
+
+(global-set-key (kbd "C-S-p")
+ (lambda () (interactive) (ignore-errors (forward-line -5))))
+
+(global-set-key (kbd "C-S-f")
+ (lambda () (interactive) (ignore-errors (forward-char 5))))
+
+(global-set-key (kbd "C-S-b")
+ (lambda () (interactive) (ignore-errors (backward-char 5))))
+
+;; Hardcore mode
+(defconst hardcore-nav-mode nil)
+(when hardcore-nav-mode
+ (global-set-key (kbd "<XF86Back>") nil)
+ (global-set-key (kbd "<XF86Forward>") nil)
+ (global-set-key (kbd "<right>") nil)
+ (global-set-key (kbd "<left>") nil)
+ (global-set-key (kbd "<up>") nil)
+ (global-set-key (kbd "<down>") nil)
+ (global-set-key (kbd "S-<right>") nil)
+ (global-set-key (kbd "S-<left>") nil)
+ (global-set-key (kbd "S-<up>") nil)
+ (global-set-key (kbd "C-<down>") nil)
+ (global-set-key (kbd "C-<right>") nil)
+ (global-set-key (kbd "C-<left>") nil)
+ (global-set-key (kbd "C-<up>") nil)
+ (global-set-key (kbd "C-<down>") nil)
+ (global-set-key (kbd "<Home>") nil)
+ (global-set-key (kbd "<End>") nil))
diff --git a/emacs/work_inits/14-movement.elc b/emacs/work_inits/14-movement.elc
new file mode 100644
index 0000000..26dec51
--- /dev/null
+++ b/emacs/work_inits/14-movement.elc
Binary files differ
diff --git a/emacs/work_inits/15-project-mgmt.elc b/emacs/work_inits/15-project-mgmt.elc
new file mode 100644
index 0000000..c7940d8
--- /dev/null
+++ b/emacs/work_inits/15-project-mgmt.elc
Binary files differ
diff --git a/emacs/work_inits/20-programming.elc b/emacs/work_inits/20-programming.elc
new file mode 100644
index 0000000..14d096a
--- /dev/null
+++ b/emacs/work_inits/20-programming.elc
Binary files differ
diff --git a/emacs/work_inits/21-functional.el b/emacs/work_inits/21-functional.el
new file mode 100644
index 0000000..d9e4214
--- /dev/null
+++ b/emacs/work_inits/21-functional.el
@@ -0,0 +1,42 @@
+;; Time-stamp: <2021-09-27 08h48 EDT (hobbies)>
+
+;; -----------------------------------------------------------------------------
+;; Haskell
+
+(use-package lsp-haskell :ensure t :defer)
+
+(use-package haskell-mode
+ :ensure t
+ :bind (:map haskell-mode-map
+ ("C-c C-p". haskell-navigate-imports)
+ ("C-c C-c" . haskell-compile)
+ ("C-c C-z" . haskell-interactive-switch)
+ ("C-c C-l" . haskell-process-load-file)
+ ("C-c C-b" . haskell-interactive-switch)
+ ("C-c C-t" . haskell-process-do-type)
+ ("C-c C-i" . haskell-process-do-info)
+ ("C-x C-d" . nil)
+ ("C-c M-." . nil)
+ ("C-c C-d" . nil))
+ :hook ((haskell-interactive-mode . visual-line-mode)
+ (haskell-mode . (lambda ()
+ (subword-mode 1)
+ (aggressive-indent-mode -1)
+ (haskell-indentation-mode)
+ (interactive-haskell-mode)
+ (turn-on-haskell-doc-mode)
+ (turn-on-haskell-decl-scan)
+ (lsp)
+ (haskell-mode-stylish-buffer))))
+ :config
+ (setq haskell-doc-show-global-types t
+ haskell-doc-show-prelude t
+ haskell-doc-show-user-defined t
+ haskell-doc-show-reserved t
+ haskell-interactive-mode-eval-pretty t
+ haskell-process-type 'auto
+ haskell-stylish-on-save t
+ haskell-process-use-presentation-mode t
+ haskell-process-suggest-imports t
+ haskell-process-suggest-hoogle-imports t
+ haskell-process-show-debug-tips nil))
diff --git a/emacs/work_inits/21-functional.elc b/emacs/work_inits/21-functional.elc
new file mode 100644
index 0000000..de7f119
--- /dev/null
+++ b/emacs/work_inits/21-functional.elc
Binary files differ
diff --git a/emacs/work_inits/22-lisp.el b/emacs/work_inits/22-lisp.el
new file mode 100644
index 0000000..1a7e33d
--- /dev/null
+++ b/emacs/work_inits/22-lisp.el
@@ -0,0 +1,104 @@
+;; Time-stamp: <2022-06-03 09h28 CDT (radix)>
+
+;; ----------------------------------------------------------------------------
+;; Lisp helpers
+
+(defvar lh-pairs '(("(" . ")")
+ ("[" . "]")
+ ("{" . "}")
+ ("<" . ">")
+ ("\"" . "\"")))
+
+(defun lh-forward-delim ()
+ (interactive)
+ (save-match-data
+ (re-search-forward
+ (regexp-opt (mapcar #'cdr lh-pairs)))))
+
+(defun lh-backward-delim ()
+ (interactive)
+ (save-match-data
+ (re-search-backward
+ (regexp-opt (mapcar #'car lh-pairs)))))
+
+(defun lh-matching-delim ()
+ (interactive)
+ (cond
+ ((looking-at (regexp-opt (mapcar #'car lh-pairs)))
+ (forward-sexp))
+ ((looking-back (regexp-opt (mapcar #'cdr lh-pairs)) nil)
+ (backward-sexp))
+ (t (backward-up-list 1 t t))))
+
+(defun lh-slurp-forward ()
+ (interactive)
+ (corral-shift-forward ?\( ?\)))
+
+(defun lh-slurp-backward ()
+ (interactive)
+ (corral-shift-backward ?\( ?\)))
+
+(defun lh-open-parentheses-dwim (arg)
+ (interactive "P")
+ (if (or (= (line-beginning-position) (point))
+ (looking-at "\\Sw")) (insert-parentheses arg)
+ (backward-sexp)
+ (insert-parentheses 1)))
+
+(defun lh-end-of-defun (arg)
+ (interactive "P")
+ (end-of-defun arg)
+ (re-search-backward ")")
+ (forward-char))
+
+(defun lh-avy-open-paren ()
+ (interactive)
+ (avy-goto-char ?\( ))
+
+(defun lh-avy-close-paren ()
+ (interactive)
+ (avy-goto-char ?\) ))
+
+(use-package corral :ensure t)
+(defun make-lisp-bindings ()
+ (let ((map (eval (read (format "%s-map" major-mode)))))
+ (progn
+ (require 'corral)
+ (define-key map (kbd "M-e") 'forward-sexp)
+ (define-key map (kbd "M-a") 'backward-sexp)
+ (define-key map (kbd "M-,") 'lh-backward-delim)
+ (define-key map (kbd "M-.") 'lh-forward-delim)
+ (define-key map (kbd "M-/") 'lh-matching-delim)
+ (define-key map (kbd "C-c (") 'lh-avy-open-paren)
+ (define-key map (kbd "C-c )") 'lh-avy-close-paren)
+ (define-key map (kbd "(") 'lh-open-parentheses-dwim)
+ (define-key map (kbd "C-c r") 'raise-sexp)
+ (define-key map (kbd "C-k") 'kill-sexp)
+ (define-key map (kbd "M-(") 'corral-parentheses-forward)
+ (define-key map (kbd "M-)") 'corral-parentheses-backward)
+ (define-key map (kbd "M-{") 'corral-braces-forward)
+ (define-key map (kbd "M-}") 'corral-braces-backward)
+ (define-key map (kbd "M-[") 'corral-brackets-forward)
+ (define-key map (kbd "M-]") 'corral-brackets-backward)
+ (define-key map (kbd "C-)") 'lh-slurp-forward)
+ (define-key map (kbd "C-(") 'lh-slurp-backward)
+ (define-key map (kbd "M-p") 'beginning-of-defun)
+ (define-key map (kbd "M-n") 'lh-end-of-defun)
+ t)))
+
+;; ----------------------------------------------------------------------------
+;; Mode configurations
+
+;; (use-package rainbow-blocks :ensure t)
+
+(add-hook 'emacs-lisp-mode-hook
+ (lambda ()
+ (eldoc-mode)
+ (aggressive-indent-mode)
+ (make-lisp-bindings)))
+
+(use-package caps-lock-mode
+ :load-path "~/.emacs.d/scripts/")
+
+;; (use-package slime-company
+;; :ensure t :defer t)
diff --git a/emacs/work_inits/22-lisp.elc b/emacs/work_inits/22-lisp.elc
new file mode 100644
index 0000000..cc0294b
--- /dev/null
+++ b/emacs/work_inits/22-lisp.elc
Binary files differ
diff --git a/emacs/work_inits/23-text-related.el b/emacs/work_inits/23-text-related.el
new file mode 100644
index 0000000..8aac63e
--- /dev/null
+++ b/emacs/work_inits/23-text-related.el
@@ -0,0 +1,175 @@
+;; Time-stamp: <2020-05-17 15:35:55 (tslil@bison)>
+
+;; -----------------------------------------------------------------------------
+;; Spelling
+
+(use-package spell-fu
+ :ensure t
+ :config
+ (setq ispell-dictionary "en_GB-ise-w_accents"
+ ispell-personal-dictionary "~/.aspell.en.pws")
+
+ ;; The default was this "\\b\\([[:alpha:]][[:alpha:]']*\\)\\b", but that
+ ;; didn't play well with ``LaTeX's quoting system''.
+ (setq-default spell-fu-word-regexp "\\([[:alpha:]]+\\('[[:alpha:]]+\\)*\\)"
+ spell-fu-faces-exclude '(font-latex-math-face
+ font-latex-sedate-face
+ font-lock-keyword-face
+ font-lock-function-name-face
+ font-lock-variable-name-face)))
+
+;; (defun flyspell-correct-selectrum (candidates word)
+;; (let* ((save "[SAVE]")
+;; (accept-session "[ACCEPT (session)]")
+;; (accept-buffer "[ACCEPT (buffer)]")
+;; (skip "[SKIP]")
+;; (selectrucm-should-sort nil)
+;; (result (selectrum-completing-read
+;; (format "Correcting '%s': " word)
+;; (append candidates
+;; (list save accept-session accept-buffer skip)))))
+;; (cond
+;; ((string= result save)
+;; (cons 'save word))
+;; ((string= result accept-session)
+;; (cons 'session word))
+;; ((string= result accept-buffer)
+;; (cons 'buffer word))
+;; ((string= result skip)
+;; (cons 'skip word))
+;; (t
+;; result))))
+
+;; (use-package flyspell-correct
+;; :ensure t
+;; :defer t
+;; :config
+;; (setq flyspell-correct-interface #'flyspell-correct-selectrum))
+
+;; (use-package flyspell
+;; :ensure t
+;; :bind (:map flyspell-mode-map
+;; ("M-$" . flyspell-correct-wrapper)
+;; ("C-," . nil)
+;; ("C-." . nil)
+;; ("C-\"" . nil))
+;; :init
+;; (setq ispell-dictionary "british"
+;; flyspell-default-dictionary "british"))
+
+(setq sentence-end-double-space nil)
+
+(add-hook 'mail-mode-hook (lambda ()
+ (electric-pair-local-mode 1)
+ (turn-on-auto-fill)
+ (spell-fu-mode 1)
+ ;; (flyspell-mode 1)
+ (company-mode 1)))
+
+(add-hook 'text-mode-hook (lambda ()
+ ;; (set-input-method "Adga")
+ (subword-mode 1)
+ (electric-pair-local-mode 1)
+ (turn-on-auto-fill)
+ (siege-mode 1)
+ (spell-fu-mode 1)
+ ;; (flyspell-mode 1)
+ ))
+
+(use-package dictionary :ensure t :defer t)
+
+;; -----------------------------------------------------------------------------
+;; Org
+
+(use-package org
+ :defer t
+ :bind (:map org-mode-map
+ ("M-h" . nil))
+ ;; :hook (org-mode . (lambda ()
+ ;; (activate-input-method default-input-method)))
+ :config
+ (setq org-use-sub-superscripts (quote {})
+ org-modules nil))
+
+
+;; -----------------------------------------------------------------------------
+;; Deft
+
+(use-package deft
+ :ensure t
+ :defer t
+ :commands (deft)
+ :bind (("C-c C-z" . deft))
+ :config
+ (setq deft-default-extension "org"
+ deft-directory "~/store/notes"
+ deft-use-filename-as-title nil
+ deft-use-filter-string-for-filename t
+ deft-file-naming-rules '((noslash . "_")
+ (nospace . "_")
+ (case-fn . downcase))
+ deft-org-mode-title-prefix t)
+
+ ;; (defvar deft-take-note-pre-grab
+ ;; '((region-thing . (let ((r (if (region-active-p)
+ ;; (buffer-substring (region-beginning) (region-end))
+ ;; (thing-at-point 'line))))
+ ;; (if r (concat r "\n") "")))
+ ;; (bfn . (let ((f (buffer-file-name))
+ ;; (b (buffer-name))) (if f f (concat b " (no file associated)")))))
+ ;; "List of pairs of symbol names and (functions evaluating to)
+ ;; strings evaluated before the buffer is created, and made
+ ;; available for deft-take-note-default-contents.")
+
+ ;; (defvar deft-take-note-post-grab '()
+ ;; "List of pairs of symbol names and (functions evaluating to)
+ ;; strings evaluated after the buffer is created, and made
+ ;; available for deft-take-note-default-contents.")
+
+ ;; (defvar deft-take-note-default-contents '(region-thing bfn "\n")
+ ;; "List with string literals and symbols defined in the pre and
+ ;; post grab lists to be inserted into the buffer.")
+
+ ;; (defun deft-take-note ()
+ ;; (interactive)
+ ;; (let ((pre-alist (mapcar #'(lambda (elt) `(,(car elt) . ,(eval (cdr elt))))
+ ;; deft-take-note-pre-grab)))
+ ;; (let ((bn (concat (format-time-string "%Y%m%d-%H:%M:%S.%N-%Z") "."
+ ;; deft-default-extension)))
+ ;; (switch-to-buffer bn)
+ ;; (set-visited-file-name (expand-file-name
+ ;; (concat deft-directory "/" bn)))
+ ;; (let ((complete-alist
+ ;; (append pre-alist
+ ;; (mapcar #'(lambda (elt) `(,(car elt) . ,(eval (cdr elt))))
+ ;; deft-take-note-post-grab))))
+ ;; (mapc #'(lambda (elt) (if (eq (type-of elt) 'string)
+ ;; (insert elt)
+ ;; (insert (cdr (assoc elt complete-alist)))))
+ ;; deft-take-note-default-contents)))))
+ )
+
+;; -----------------------------------------------------------------------------
+;; Useful keybinds
+
+(defun vi-open-line-above ()
+ "Insert a newline above the current line and put point at beginning."
+ (interactive)
+ (unless (bolp)
+ (beginning-of-line))
+ (newline)
+ (forward-line -1)
+ (indent-according-to-mode))
+
+(defun vi-open-line-below ()
+ "Insert a newline below the current line and put point at beginning."
+ (interactive)
+ (unless (eolp)
+ (end-of-line))
+ (newline-and-indent))
+
+(global-set-key (kbd "M-o") 'vi-open-line-below)
+(global-set-key (kbd "C-o") 'vi-open-line-above)
+
+(global-set-key (kbd "M-C-+") 'text-scale-increase)
+(global-set-key (kbd "M-C--") 'text-scale-decrease)
diff --git a/emacs/work_inits/23-text-related.elc b/emacs/work_inits/23-text-related.elc
new file mode 100644
index 0000000..9d6b3a1
--- /dev/null
+++ b/emacs/work_inits/23-text-related.elc
Binary files differ
diff --git a/emacs/work_inits/27-gemini.el b/emacs/work_inits/27-gemini.el
new file mode 100644
index 0000000..65a499d
--- /dev/null
+++ b/emacs/work_inits/27-gemini.el
@@ -0,0 +1,61 @@
+;; Time-stamp: <2021-09-27 08h48 EDT (hobbies)>
+
+(use-package elpher
+ :ensure t
+ :defer)
+
+(use-package visual-fill-column
+ :ensure t
+ :defer)
+
+(defvar gemlog-directory (expand-file-name "~/hobbies/l-3.space/"))
+(defvar gemlog-file-name "%y%02m%02d")
+(defvar gemlog-time-string "%Y-%02m-%02d %02Hh%02M %Z")
+(defvar gemlog-time-zone "UTC")
+
+(defun gemlog-new-entry ()
+ (interactive)
+ (let* ((title (read-string "Title: "))
+ (number 1)
+ (file (format "%s/log-%s-%d.gmi"
+ gemlog-directory
+ (format-time-string gemlog-file-name nil t)
+ number)))
+ (while (file-exists-p file)
+ (setq number (+ 1 number))
+ (setq file (format "%s/log-%s-%d.gmi"
+ gemlog-directory
+ (format-time-string gemlog-file-name nil t)
+ number)))
+ (find-file file)
+ (setq-local time-stamp-time-zone gemlog-time-zone
+ time-stamp-format gemlog-time-string)
+ (insert "Time-stamp: <>") (newline) (newline)
+ (insert "# " title) (newline) (newline)
+ (time-stamp)))
+
+(defvar gemini-footnote-symbols '("⁰" "¹" "²" "³" "⁴" "⁵" "⁶" "⁷" "⁸" "⁹" "ᵃ" "ᵇ" "ᶜ" "ᵈ" "ᵉ" "ᶠ"))
+
+(defun gemini-insert-footnote ()
+ (interactive)
+ (let ((symb (car gemini-footnote-symbols))
+ (n 0))
+ (while (and symb (save-excursion (beginning-of-buffer) (search-forward symb nil t)))
+ (setq n (1+ n)
+ symb (nth n gemini-footnote-symbols)))
+ (if (not symb) (message "Ran out of footnote symbols. Customise `gemini-footnote-symbols'.")
+ (insert symb)
+ (end-of-buffer)
+ (unless (= (point) (point-at-bol)) (newline))
+ (insert symb " "))))
+
+(use-package gemini-mode
+ :ensure t
+ :bind (:map gemini-mode-map
+ ("C-c C-f" . gemini-insert-footnote))
+ :hook (gemini-mode . (lambda ()
+ (setq time-stamp-time-zone gemlog-time-zone
+ time-stamp-format gemlog-time-string)
+ (setq-local indent-tabs-mode nil)
+ (auto-fill-mode -1)
+ (set-fill-column 80))))
diff --git a/emacs/work_inits/27-gemini.elc b/emacs/work_inits/27-gemini.elc
new file mode 100644
index 0000000..49bc88d
--- /dev/null
+++ b/emacs/work_inits/27-gemini.elc
Binary files differ
diff --git a/emacs/work_inits/50-file-assocs.el b/emacs/work_inits/50-file-assocs.el
new file mode 100644
index 0000000..0024f1a
--- /dev/null
+++ b/emacs/work_inits/50-file-assocs.el
@@ -0,0 +1,20 @@
+;; Time-stamp: <2019-09-11 11:29:16 (tslil@basingstoke)>
+
+(use-package gnuplot-mode
+ :ensure t
+ :mode "\\.gnp$")
+
+(use-package scad-mode
+ :ensure t
+ :mode "\\.scad$")
+
+(setq auto-mode-alist
+ (append
+ '(("\\.emacs$" . emacs-lisp-mode)
+ ("\\.scm$" . scheme-mode)
+ ("\\.sch$" . scheme-mode)
+ ("\\.sc$" . scheme-mode)
+ ("\\.cl$" . lisp-mode)
+ ("\\.py$" . python-mode)
+ ("\\.pg$" . perl-mode)
+ ) auto-mode-alist))
diff --git a/emacs/work_inits/50-file-assocs.elc b/emacs/work_inits/50-file-assocs.elc
new file mode 100644
index 0000000..a69a3a7
--- /dev/null
+++ b/emacs/work_inits/50-file-assocs.elc
Binary files differ
diff --git a/emacs/work_inits/60-misc-configs.el b/emacs/work_inits/60-misc-configs.el
new file mode 100644
index 0000000..4df81e0
--- /dev/null
+++ b/emacs/work_inits/60-misc-configs.el
@@ -0,0 +1,22 @@
+;; Time-stamp: <2021-09-27 08h49 EDT (hobbies)>
+
+(use-package dired
+ :defer t
+ :config
+ (setq dired-listing-switches "--group-directories-first -alh"
+ dired-auto-revert-buffer t
+ dired-dwim-target t
+ ;; ???
+ ;; dired-guess-shell-alist-user '(("\\.djvu\\'" "zathura")
+ ;; ("\\.pdf\\'" "zathura")
+ ;; ("\\.ps\\'" "zathura"))
+ ))
+
+(use-package browse-url
+ :defer t
+ :config
+ (setq browse-url-generic-program "firefox"
+ browse-url-browser-function 'browse-url-default-browser))
+
+(setq backup-directory-alist `((".*" . ,temporary-file-directory))
+ auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
diff --git a/emacs/work_inits/60-misc-configs.elc b/emacs/work_inits/60-misc-configs.elc
new file mode 100644
index 0000000..05db8fe
--- /dev/null
+++ b/emacs/work_inits/60-misc-configs.elc
Binary files differ
diff --git a/emacs/work_inits/70-global-keybinds.el b/emacs/work_inits/70-global-keybinds.el
new file mode 100644
index 0000000..816998f
--- /dev/null
+++ b/emacs/work_inits/70-global-keybinds.el
@@ -0,0 +1,49 @@
+;; Time-stamp: <2020-10-26 17h12 EDT (hobbies)>
+
+(setq time-stamp-active t
+ time-stamp-line-limit 3
+ time-stamp-format "%Y-%02m-%02d %02Hh%02M %Z (%s)")
+
+(add-hook 'before-save-hook #'time-stamp)
+
+(defun insert-timestamp ()
+ (interactive)
+ (save-excursion
+ (goto-char (point-min))
+ (unless (search-forward "Time-stamp: "
+ (line-beginning-position (1+ time-stamp-line-limit))
+ t)
+ (goto-char (point-min))
+ (newline)
+ (beginning-of-line 0)
+ (comment-dwim nil)
+ (insert (concat "Time-stamp: " "<>"))
+ (newline))
+ (time-stamp)))
+(global-set-key (kbd "C-x t") 'insert-timestamp)
+
+(global-set-key (kbd "C-z") 'nil)
+
+(use-package eterm-256color
+ :ensure t
+ :config
+ (add-hook 'term-mode-hook #'eterm-256color-mode)
+ (global-set-key (kbd "C-c c") 'ansi-term))
+
+(global-set-key (kbd "C-x e") 'eval-expression)
+
+(global-set-key (kbd "M-i") 'indent-region)
+
+(global-set-key (kbd "C-v") 'delete-indentation)
+
+;; -----------------------------------------------------------------------------
+;; Killing
+(global-set-key (kbd "C-c C-k") 'kill-whole-line)
+(global-set-key (kbd "M-z") 'zap-up-to-char)
+
+(defun kill-region-or-backward-kill-word (arg)
+ (interactive "p")
+ (if (region-active-p) (kill-region 0 0 t)
+ (backward-kill-word arg)))
+
+(global-set-key (kbd "C-w") 'kill-region-or-backward-kill-word)
diff --git a/emacs/work_inits/70-global-keybinds.elc b/emacs/work_inits/70-global-keybinds.elc
new file mode 100644
index 0000000..b794297
--- /dev/null
+++ b/emacs/work_inits/70-global-keybinds.elc
Binary files differ
diff --git a/emacs/work_inits/99-last.el b/emacs/work_inits/99-last.el
new file mode 100644
index 0000000..1bcec66
--- /dev/null
+++ b/emacs/work_inits/99-last.el
@@ -0,0 +1,8 @@
+;; Time-stamp: <2020-08-12 22:05:48 (user@hobbies)>
+
+(add-hook 'after-init-hook
+ (lambda ()
+ (run-with-idle-timer 20 nil (lambda () (setq gc-cons-threshold 80000000)))))
+
+(setq read-process-output-max (* 1024 1024))
+(setq file-name-handler-alist old-file-name-handler-alist)
diff --git a/emacs/work_inits/99-last.elc b/emacs/work_inits/99-last.elc
new file mode 100644
index 0000000..fb76db6
--- /dev/null
+++ b/emacs/work_inits/99-last.elc
Binary files differ