X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/f9f86b085fb5a026d76af336ad8a23bbd743182b..5842415b4a7b31d2cf292f73aeda045acdaecfd0:/init.org?ds=inline diff --git a/init.org b/init.org index cfa190d..60e319e 100644 --- a/init.org +++ b/init.org @@ -651,8 +651,12 @@ In short, my favourite way of life. (setq org-src-tab-acts-natively t org-src-preserve-indentation nil org-edit-src-content-indentation 0 + org-html-divs '((preamble "header" "preamble") + (content "main" "content") + (postamble "footer" "postamble")) org-html-doctype "html5" - org-html-html5-fancy t) + org-html-html5-fancy t + org-html-postamble nil) (add-hook 'org-mode-hook 'org-indent-mode) (use-package htmlize) #+end_src @@ -858,21 +862,21 @@ TODO: break this giant source block down into individual org sections. #+end_src * Programming modes -** Alloy +** [[http://alloytools.org][Alloy]] (with [[https://github.com/dwwmmn/alloy-mode][alloy-mode]]) #+begin_src emacs-lisp (use-package alloy-mode :config (setq alloy-basic-offset 2)) #+end_src -** Coq +** [[https://coq.inria.fr][Coq]] (with [[https://github.com/ProofGeneral/PG][Proof General]]) #+begin_src emacs-lisp (use-package proof-site ; Proof General :load-path "lib/proof-site/generic/") #+end_src -** [[https://github.com/leanprover/lean-mode][Lean]] +** [[https://leanprover.github.io][Lean]] (with [[https://github.com/leanprover/lean-mode][lean-mode]]) #+begin_src emacs-lisp (use-package lean-mode @@ -1079,7 +1083,7 @@ Emacs package that displays available keybindings in popup :config (which-key-mode)) #+end_src -** doom-modeline +** [[https://github.com/seagle0128/doom-modeline][doom-modeline]] #+begin_src emacs-lisp (use-package doom-modeline @@ -1088,7 +1092,7 @@ Emacs package that displays available keybindings in popup :hook (after-init . doom-modeline-init)) #+end_src -** tao-theme +** [[https://github.com/11111000000/tao-theme-emacs][tao-theme]] #+begin_src emacs-lisp (use-package tao-theme @@ -1097,7 +1101,7 @@ Emacs package that displays available keybindings in popup #+end_src * Email -** notmuch +** [[https://notmuchmail.org][notmuch]] #+begin_src emacs-lisp (defun ab/notmuch () @@ -1144,12 +1148,12 @@ Emacs package that displays available keybindings in popup #'flyspell-mode) ;; (add-hook 'notmuch-message-mode-hook #'+doom-modeline|set-special-modeline) ;; TODO: is there a way to only run this when replying and not composing? - (add-hook 'notmuch-message-mode-hook - (lambda () (progn - (newline) - (newline) - (forward-line -1) - (forward-line -1)))) + ;; (add-hook 'notmuch-message-mode-hook + ;; (lambda () (progn + ;; (newline) + ;; (newline) + ;; (forward-line -1) + ;; (forward-line -1)))) ;; (add-hook 'message-setup-hook ;; #'mml-secure-message-sign-pgpmime) ) @@ -1174,7 +1178,13 @@ Emacs package that displays available keybindings in popup ("abandali@uwaterloo.ca" . "\"uwaterloo/Sent Items\"") ("amin.bandali@uwaterloo.ca" . "\"uwaterloo/Sent Items\"") ("aminb@gnu.org" . "gnu/Sent") - (".*" . "sent"))) + (".*" . "sent")) + notmuch-search-result-format + '(("date" . "%12s ") + ("count" . "%-7s ") + ("authors" . "%-40s ") + ("subject" . "%s ") + ("tags" . "(%s)"))) ;; (add-hook 'visual-fill-column-mode-hook ;; (lambda () ;; (when (string= major-mode 'notmuch-message-mode) @@ -1245,6 +1255,57 @@ Emacs package that displays available keybindings in popup (add-to-list 'recentf-exclude (expand-file-name ab-maildir))) #+end_src +** supercite + +#+begin_src emacs-lisp :tangle no +(use-package supercite + :commands sc-cite-original + :init + (add-hook 'mail-citation-hook 'sc-cite-original) + + (defun sc-remove-existing-signature () + (save-excursion + (goto-char (region-beginning)) + (when (re-search-forward message-signature-separator (region-end) t) + (delete-region (match-beginning 0) (region-end))))) + + (add-hook 'mail-citation-hook 'sc-remove-existing-signature) + + (defun sc-remove-if-not-mailing-list () + (unless (assoc "list-id" sc-mail-info) + (setq attribution sc-default-attribution + citation (concat sc-citation-delimiter + sc-citation-separator)))) + + (add-hook 'sc-attribs-postselect-hook 'sc-remove-if-not-mailing-list) + + :config + (defun sc-fill-if-different (&optional prefix) + "Fill the region bounded by `sc-fill-begin' and point. +Only fill if optional PREFIX is different than +`sc-fill-line-prefix'. If `sc-auto-fill-region-p' is nil, do not +fill region. If PREFIX is not supplied, initialize fill +variables. This is useful for a regi `begin' frame-entry." + (if (not prefix) + (setq sc-fill-line-prefix "" + sc-fill-begin (line-beginning-position)) + (if (and sc-auto-fill-region-p + (not (string= prefix sc-fill-line-prefix))) + (let ((fill-prefix sc-fill-line-prefix)) + (unless (or (string= fill-prefix "") + (save-excursion + (goto-char sc-fill-begin) + (or (looking-at ">+ +") + (< (length + (buffer-substring (point) + (line-end-position))) + 65)))) + (fill-region sc-fill-begin (line-beginning-position))) + (setq sc-fill-line-prefix prefix + sc-fill-begin (line-beginning-position))))) +nil)) +#+end_src + * Post initialization :PROPERTIES: :CUSTOM_ID: post-initialization