[literate] improve structure, define TODO keywords
This commit is contained in:
parent
b133ed1f74
commit
626968a27a
|
@ -14,7 +14,7 @@
|
|||
;; end, clear a line to enter some other text on it (C-a C-k/"a k"),
|
||||
;; or delete one or more whole lines (C-1 C-k/"1 k" or C-<num>
|
||||
;; C-k/"<num> k").
|
||||
"C-y" 'whole-line-or-region-yank
|
||||
;; "C-y" 'whole-line-or-region-yank
|
||||
"C-S-k" 'whole-line-or-region-kill-region
|
||||
"C-," 'backward-paragraph
|
||||
"C-." 'forward-paragraph
|
||||
|
@ -289,7 +289,8 @@ as links into an Org or Markdown document."
|
|||
(markdown-mode . visual-fill-column-mode)
|
||||
(markdown-mode . visual-line-mode)
|
||||
(org-mode . visual-fill-column-mode)
|
||||
(message-mode . visual-fill-column-mode))
|
||||
(message-mode . visual-fill-column-mode)
|
||||
(emacs-lisp-mode . visual-fill-column-mode--disable))
|
||||
|
||||
(use-package avy
|
||||
:config
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
("P" . emms-play-dired)
|
||||
("X" . dired-do-flagged-delete)
|
||||
("M-n" . dired-next-marked-file)
|
||||
("M-p" . dired-prev-marked-file))
|
||||
("M-p" . dired-prev-marked-file)
|
||||
("I" . sxiv))
|
||||
:hook
|
||||
(dired-mode . (lambda () (dired-hide-details-mode t))))
|
||||
|
||||
|
@ -72,8 +73,8 @@
|
|||
(async-shell-command (concat cmd " \"" file-name "\""))
|
||||
(find-file file-name))))
|
||||
|
||||
(with-eval-after-load 'project-explorer
|
||||
(global-set-key (kbd "<f5> e") 'project-explorer-toggle))
|
||||
;; (with-eval-after-load 'project-explorer
|
||||
;; (global-set-key (kbd "<f5> e") 'project-explorer-toggle))
|
||||
|
||||
(use-package dired-hide-dotfiles
|
||||
:hook (dired-mode . (lambda () (dired-hide-dotfiles-mode))))
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
(use-package slime
|
||||
:commands (slime-eval-buffer slime-eval-defun)
|
||||
:bind
|
||||
|
@ -13,7 +12,11 @@
|
|||
;; "/usr/bin/ecl"
|
||||
"/home/anon/bin/sbcl"
|
||||
;; "/usr/bin/sbcl"
|
||||
slime-net-coding-system 'utf-8-unix))
|
||||
slime-net-coding-system 'utf-8-unix)
|
||||
(defun cp-slime-completion-in-region (_fn completions start end)
|
||||
(funcall completion-in-region-function start end completions))
|
||||
(advice-add 'slime-display-or-scroll-completions
|
||||
:around #'cp-slime-completion-in-region))
|
||||
|
||||
(use-package slime-tramp
|
||||
:load-path "/home/anon/.emacs.d/elpa/slime-20210202.1426/contrib/"
|
||||
|
@ -24,6 +27,9 @@
|
|||
:remote-host "tilde.team"
|
||||
:username "contrapunctus")))
|
||||
|
||||
(use-package redshank
|
||||
:hook (slime-mode . redshank-mode))
|
||||
|
||||
(defun set-cl-repl-keys ()
|
||||
(if (or (cp-buffer-name-match-p "^\*inferior-lisp\*\\(<[0-9]*>\\)?")
|
||||
(eq major-mode 'lisp-mode))
|
||||
|
@ -83,4 +89,30 @@ active, else `sp-copy-sexp'."
|
|||
(shell-mode-hook . exec-path-from-shell-initialize)
|
||||
(minibuffer-setup-hook . exec-path-from-shell-initialize))
|
||||
|
||||
(use-package skeleton
|
||||
:config
|
||||
(define-skeleton cp-ql-quickload
|
||||
"Insert a `(ql:quickload |)' form."
|
||||
nil "(ql:quickload :" _ ")"))
|
||||
|
||||
(use-package abbrev
|
||||
:hook (lisp-mode . abbrev-mode)
|
||||
(slime-repl-mode . abbrev-mode)
|
||||
:config
|
||||
;; `slime-repl-mode' is defined as a function rather than using the
|
||||
;; `define-derived-mode' macro, so there's no abbrev table created
|
||||
;; for it. This is adapted from the macro expansion of
|
||||
;; `geiser-repl-mode'.
|
||||
(defvar slime-repl-mode-abbrev-table)
|
||||
(put 'slime-repl-mode-abbrev-table 'definition-name 'slime-repl-mode)
|
||||
(defvar slime-repl-mode-abbrev-table
|
||||
(progn
|
||||
(define-abbrev-table 'slime-repl-mode-abbrev-table
|
||||
`(("qq" "" cp-ql-quickload))
|
||||
"Abbrev table for SLIME REPLs.")
|
||||
slime-repl-mode-abbrev-table))
|
||||
(put 'slime-repl-mode-abbrev-table 'variable-documentation
|
||||
(purecopy "Abbrev table for `slime-repl-mode'."))
|
||||
(define-abbrev lisp-mode-abbrev-table "qq" "" 'cp-ql-quickload))
|
||||
|
||||
(provide 'cp-lisp)
|
||||
|
|
|
@ -118,6 +118,7 @@
|
|||
(format "[%s](%s)" desc link)))))
|
||||
(org-link-set-parameters "gemini" :export #'org-link-gemini-export-link))
|
||||
|
||||
;; TODO - if `region-active-p', insert syntax at region boundaries
|
||||
(defun cp-org-insert-src (&optional lang)
|
||||
(let* ((col (- (point) (point-at-bol)))
|
||||
(indent (make-string col ?\ )))
|
||||
|
@ -151,9 +152,11 @@
|
|||
(":" org-demote-subtree "demote")
|
||||
|
||||
("m" magit-status "Magit" :color blue)
|
||||
("O" cp-prog/body "Other language" :color blue)
|
||||
("\"" cp-prog/body "Other language" :color blue)
|
||||
("G" elpher "Elpher" :color blue))
|
||||
|
||||
;; (use-package org-src-mode
|
||||
;; :hook (org-src-mode . (lambda () (when (derived-mode-p 'emacs-lisp-mode)))))
|
||||
|
||||
;; (defun cp-org-expand-all ()
|
||||
;; (interactive)
|
||||
|
|
|
@ -20,6 +20,24 @@
|
|||
:init (shackle-mode)
|
||||
:config (setq shackle-rules '((Info-mode :same t))))
|
||||
|
||||
;; nicked from https://github.com/tarsius/moody
|
||||
;; (use-package solarized-theme
|
||||
;; :config
|
||||
;; (load-theme 'solarized-light t)
|
||||
;; (let ((line (face-attribute 'mode-line :underline)))
|
||||
;; (set-face-attribute 'mode-line nil :overline line)
|
||||
;; (set-face-attribute 'mode-line-inactive nil :overline line)
|
||||
;; (set-face-attribute 'mode-line-inactive nil :underline line)
|
||||
;; (set-face-attribute 'mode-line nil :box nil)
|
||||
;; (set-face-attribute 'mode-line-inactive nil :box nil)
|
||||
;; (set-face-attribute 'mode-line-inactive nil :background "#f9f2d9")))
|
||||
|
||||
(use-package moody
|
||||
:config
|
||||
(setq x-underline-at-descent-line t)
|
||||
(moody-replace-mode-line-buffer-identification)
|
||||
(moody-replace-vc-mode))
|
||||
|
||||
;;;; Set theme
|
||||
;(load-theme 'distinguished t)
|
||||
|
||||
|
@ -34,9 +52,6 @@
|
|||
;; (require 'molokai-theme)
|
||||
;; (enable-theme 'molokai)
|
||||
|
||||
(require 'doom-themes)
|
||||
(load-theme 'doom-acario-dark)
|
||||
|
||||
;; (require 'fullscreen-mode)
|
||||
;; (fullscreen-mode 1)
|
||||
|
||||
|
|
189
init.org
189
init.org
|
@ -1,3 +1,4 @@
|
|||
#+TODO: TODO WIP WISH CLEANUP FIXME REVIEW |
|
||||
#+PROPERTY: header-args :tangle yes :load yes
|
||||
|
||||
* init.org
|
||||
|
@ -545,7 +546,7 @@ Return nil (and run `magit-status') if the user answers no."
|
|||
(use-package hydra
|
||||
:commands defhydra)
|
||||
#+END_SRC
|
||||
** TODO emms :application:
|
||||
** WISH emms :application:
|
||||
1. [ ] make toggle command for emms-start/emms-stop
|
||||
2. [ ] change mode line display - don't show the whole file path, just the name
|
||||
|
||||
|
@ -915,74 +916,24 @@ Ask for confirmation before saving cookies. I'd rather just disallow them all th
|
|||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'next-error-hook 'recenter)
|
||||
|
||||
;;;; ...and to magit-toggle-section
|
||||
;;; It'd be really cool to (recenter 3) when you /open/ a section,
|
||||
;;; and (recenter) when you close a section
|
||||
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defadvice magit-section-toggle
|
||||
(after magit-section-toggle-recenter activate) (recenter 3))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(ad-activate 'magit-section-toggle)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defadvice magit-unstage-item
|
||||
(after magit-unstage-item-move) (next-line))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(ad-activate 'magit-unstage-item)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defadvice magit-goto-next-section
|
||||
(after magit-next-section-recenter activate) (recenter 3))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(ad-activate 'magit-goto-next-section)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defadvice magit-goto-previous-section
|
||||
(after magit-previous-section-recenter activate) (recenter 3))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(ad-activate 'magit-goto-previous-section)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** date and time
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun cp-insert-timestamp ()
|
||||
(interactive)
|
||||
(insert (format-time-string "%FT%T%z")))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun cp-insert-date ()
|
||||
(interactive)
|
||||
(insert (format-time-string "%F")))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package fin)
|
||||
(use-package time
|
||||
:config
|
||||
(setq display-time-next-load-average t)
|
||||
(add-to-list 'zoneinfo-style-world-list '("Europe/Berlin" "Berlin")))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun cp/eval-sexp (arg)
|
||||
|
@ -1003,8 +954,7 @@ and eval it."
|
|||
(eval-last-sexp arg)))
|
||||
(t nil))))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** helpful
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package helpful
|
||||
:bind (("<f1> <f1>" . #'helpful-at-point)
|
||||
|
@ -1013,16 +963,17 @@ and eval it."
|
|||
("<f1> k" . #'helpful-key)
|
||||
("<f1> v" . #'helpful-variable)))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** ibuffer
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package ibuffer
|
||||
:bind
|
||||
(:map ibuffer-mode-map
|
||||
#+END_SRC
|
||||
This is basically here because Boon hijacks the x key.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
("X" . 'ibuffer-do-kill-on-deletion-marks)))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** info
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package info
|
||||
:config
|
||||
|
@ -1123,25 +1074,17 @@ and eval it."
|
|||
;; (kbd "s-<mouse-9>") 'helm-mini
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** help-mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package help-mode
|
||||
:bind
|
||||
(:map help-mode-map
|
||||
("b" . help-go-back)
|
||||
("f" . help-go-forward)))
|
||||
|
||||
;; More convenient Unicode keys
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** Unicode keys
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(global-unset-key (kbd "M-["))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(general-def
|
||||
"C-' r" (kbd "₹")
|
||||
"C-' C-r" (kbd "₹")
|
||||
|
@ -1152,14 +1095,9 @@ and eval it."
|
|||
"C-' n" (kbd "↓")
|
||||
"C-' l" (kbd "λ")
|
||||
"C-' F" (kbd "ƒ"))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq default-input-method "devanagari-itrans")
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** backup configuration
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq backup-by-copying t
|
||||
backup-directory-alist '(("." . "~/.emacs.d/saves/"))
|
||||
|
@ -1168,13 +1106,10 @@ and eval it."
|
|||
kept-old-versions 2
|
||||
version-control t)
|
||||
|
||||
;; SLIME opens CLHS links in Firefox, but I'd rather open them in Tor
|
||||
;; Browser; Tor Browser, however, does not permit other applications
|
||||
;; to open tabs in a running instance. So I wrote this to copy the
|
||||
;; links automatically instead.
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** browse-url
|
||||
SLIME opens CLHS links in Firefox, but I'd rather open them in Tor Browser; Tor Browser, however, does not permit other applications to open tabs in a running instance. So I wrote this to copy the links automatically instead.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package browse-url
|
||||
:config
|
||||
|
@ -1185,8 +1120,7 @@ and eval it."
|
|||
(message "Copied %s to kill ring" url))
|
||||
(setq browse-url-browser-function #'cp-copy-url))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** Ivy
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package ivy
|
||||
:commands ivy-mode
|
||||
|
@ -1195,8 +1129,7 @@ and eval it."
|
|||
(setq ivy-re-builders-alist
|
||||
'((t . ivy--regex-ignore-order))))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** jabber :disabled:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package jabber
|
||||
:disabled
|
||||
|
@ -1207,8 +1140,8 @@ and eval it."
|
|||
jabber-history-muc-enabled t
|
||||
jabber-alert-presence-message-function nil))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** WISH magit
|
||||
It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) when you close a section
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package magit
|
||||
:bind (("<f5> m" . #'magit-status)
|
||||
|
@ -1225,16 +1158,27 @@ and eval it."
|
|||
([up-mouse-3] . 'magit-section-toggle))
|
||||
:commands magit-status
|
||||
:hook
|
||||
(magit-post-stage . (lambda () (recenter))))
|
||||
(magit-post-stage . (lambda () (recenter)))
|
||||
:config
|
||||
(defadvice magit-section-toggle
|
||||
(after magit-section-toggle-recenter activate) (recenter 3))
|
||||
(ad-activate 'magit-section-toggle)
|
||||
(defadvice magit-unstage-item
|
||||
(after magit-unstage-item-move) (next-line))
|
||||
(ad-activate 'magit-unstage-item)
|
||||
(defadvice magit-goto-next-section
|
||||
(after magit-next-section-recenter activate) (recenter 3))
|
||||
(ad-activate 'magit-goto-next-section)
|
||||
(defadvice magit-goto-previous-section
|
||||
(after magit-previous-section-recenter activate) (recenter 3))
|
||||
(ad-activate 'magit-goto-previous-section))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** mediawiki-mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package mediawiki
|
||||
:commands mediawiki-mode)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** midnight-mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package midnight
|
||||
:init
|
||||
|
@ -1246,21 +1190,18 @@ and eval it."
|
|||
:hook
|
||||
(midnight . clean-buffer-list))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** nodejs-repl :disabled:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package nodejs-repl
|
||||
:disabled
|
||||
:config (setq nodejs-repl-command "nodejs"))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** nov.el
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package nov
|
||||
:mode ("\\.epub\\'" . nov-mode))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** package
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package package
|
||||
:bind
|
||||
|
@ -1271,15 +1212,13 @@ and eval it."
|
|||
(general-def package-menu-mode-map
|
||||
"X" 'package-menu-execute)))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** feather
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package feather
|
||||
:diminish
|
||||
:hook (package-menu-mode . feather-mode)
|
||||
:bind ("<f5> p " . list-packages))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package powerline)
|
||||
|
@ -1301,7 +1240,7 @@ and eval it."
|
|||
(setq swiper-action-recenter t))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** sxiv :application:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package sxiv
|
||||
:config (setq sxiv-exclude-strings '("meh" "\\.NEF$")))
|
||||
|
@ -1309,10 +1248,7 @@ and eval it."
|
|||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package time
|
||||
:config
|
||||
(setq display-time-next-load-average t)
|
||||
(add-to-list 'zoneinfo-style-world-list '("Europe/Berlin" "Berlin")))
|
||||
|
||||
|
||||
;; (load "cp-adb")
|
||||
#+END_SRC
|
||||
|
@ -1321,35 +1257,11 @@ and eval it."
|
|||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-editing)
|
||||
;; (load "cp-evil")
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-fm)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-lily)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-sfz)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-prog)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-lisp)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-nav)
|
||||
|
||||
;; (ispell-change-dictionary "en")
|
||||
|
@ -1360,7 +1272,7 @@ and eval it."
|
|||
(setq ispell-dictionary "en")
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
** undo-tree
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package undo-tree
|
||||
:commands global-undo-tree-mode
|
||||
|
@ -1426,10 +1338,7 @@ and eval it."
|
|||
(file-name-base))
|
||||
" "
|
||||
file-path-shell))))))
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'after-save-hook 'cp/after-save)
|
||||
#+END_SRC
|
||||
|
||||
|
@ -1446,10 +1355,6 @@ and eval it."
|
|||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-hindi)
|
||||
#+END_SRC
|
||||
|
||||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-parens)
|
||||
#+END_SRC
|
||||
|
||||
|
@ -1571,7 +1476,7 @@ and eval it."
|
|||
#+BEGIN_SRC emacs-lisp
|
||||
(put 'list-timers 'disabled nil)
|
||||
#+END_SRC
|
||||
** GC reset
|
||||
** GC reset, file local variables
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq gc-cons-threshold 400000)
|
||||
|
||||
|
|
Loading…
Reference in New Issue