1 ;;; init.el --- Amin Bandali's Emacs config -*- lexical-binding: t -*-
3 ;; Copyright (C) 2018-2019 Amin Bandali <bandali@gnu.org>
5 ;; This program is free software: you can redistribute it and/or modify
6 ;; it under the terms of the GNU General Public License as published by
7 ;; the Free Software Foundation, either version 3 of the License, or
8 ;; (at your option) any later version.
10 ;; This program is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;; GNU General Public License for more details.
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
20 ;; Emacs configuration of Amin Bandali, computer scientist, functional
21 ;; programmer, and free software advocate.
23 ;; THIS FILE IS AUTO-GENERATED FROM `init.org'.
27 (defvar a
/before-user-init-time
(current-time)
28 "Value of `current-time' when Emacs begins loading `user-init-file'.")
29 (message "Loading Emacs...done (%.3fs)"
30 (float-time (time-subtract a
/before-user-init-time
33 (defvar a
/gc-cons-threshold gc-cons-threshold
)
34 (defvar a
/gc-cons-percentage gc-cons-percentage
)
35 (defvar a
/file-name-handler-alist file-name-handler-alist
)
36 (setq gc-cons-threshold
(* 400 1024 1024) ; 400 MiB
37 gc-cons-percentage
0.6
38 file-name-handler-alist nil
39 ;; sidesteps a bug when profiling with esup
40 esup-child-profile-require-level
0)
45 (setq gc-cons-threshold a
/gc-cons-threshold
46 gc-cons-percentage a
/gc-cons-percentage
47 file-name-handler-alist a
/file-name-handler-alist
)))
49 (setq message-log-max
20000)
51 ;; (setq byte-compile-warnings
52 ;; '(not free-vars unresolved noruntime lexical make-local))
54 (setq user-full-name
"Amin Bandali"
55 user-mail-address
"amin@bndl.org")
57 ;; Main engine start...
59 (setq straight-repository-branch
"develop"
60 straight-check-for-modifications
'(check-on-save find-when-checking
))
62 (defun a/bootstrap-straight
()
63 (defvar bootstrap-version
)
65 (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory
))
66 (bootstrap-version 5))
67 (unless (file-exists-p bootstrap-file
)
69 (url-retrieve-synchronously
70 "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
71 'silent
'inhibit-cookies
)
72 (goto-char (point-max))
73 (eval-print-last-sexp)))
74 (load bootstrap-file nil
'nomessage
)))
76 ;; Solid rocket booster ignition...
78 (a/bootstrap-straight
)
82 (setq straight-use-package-by-default t
)
84 (defmacro use-feature
(name &rest args
)
85 "Like `use-package', but with `straight-use-package-by-default' disabled."
86 (declare (indent defun
))
91 (with-eval-after-load 'recentf
92 (add-to-list 'recentf-exclude
93 (expand-file-name "~/.emacs.d/straight/build/")))
95 (defun a/reload-init
()
99 (straight-mark-transaction-as-init)
100 (load user-init-file
)))
102 (straight-use-package 'use-package
)
103 (if nil
; set to t when need to debug init
105 (setq use-package-verbose t
106 use-package-expand-minimally nil
107 use-package-compute-statistics t
109 (require 'use-package
))
110 (setq use-package-verbose nil
111 use-package-expand-minimally t
))
113 (setq use-package-always-defer t
)
116 ;; comment macro, useful for commenting out multiple sexps at a time
117 (defmacro comment
(&rest _
)
118 "Comment out one or more s-expressions."
119 (declare (indent defun
))
122 (use-package no-littering
126 (add-to-list 'savehist-additional-variables
'kill-ring
)
128 (setq auto-save-file-name-transforms
129 `((".*" ,(no-littering-expand-var-file-name "auto-save/") t
))))
134 (setq custom-file
(no-littering-expand-etc-file-name "custom.el"))
135 (when (file-exists-p custom-file
)
137 (setf custom-safe-themes t
))
140 (load (no-littering-expand-etc-file-name "secrets")))
142 (use-package exec-path-from-shell
145 (setq exec-path-from-shell-arguments nil
146 exec-path-from-shell-check-startup-files nil
)
148 (exec-path-from-shell-initialize)
149 ;; while we're at it, let's fix access to our running ssh-agent
150 (exec-path-from-shell-copy-env "SSH_AGENT_PID")
151 (exec-path-from-shell-copy-env "SSH_AUTH_SOCK"))
155 :config
(or (server-running-p) (server-mode)))
157 (setq text-scale-mode-step
1.05)
159 (setq mouse-autoselect-window t
)
161 (defun a/no-mouse-autoselect-window
()
162 (make-local-variable 'mouse-autoselect-window
)
163 (setq mouse-autoselect-window nil
))
165 (setq ;; scroll-margin 1
166 ;; scroll-conservatively 10000
168 scroll-conservatively
10
169 scroll-preserve-screen-position
1)
174 (setq mouse-wheel-scroll-amount
'(1 ((shift) .
1)) ; one line at a time
175 mouse-wheel-progressive-speed nil
; don't accelerate scrolling
176 mouse-wheel-follow-mouse t
)) ; scroll window under mouse
178 (use-feature pixel-scroll
180 :config
(pixel-scroll-mode 1))
182 (setq epg-pinentry-mode
'loopback
)
187 (defmacro a
/setq-every
(value &rest vars
)
188 "Set all the variables from VARS to value VALUE."
189 (declare (indent defun
) (debug t
))
190 `(progn ,@(mapcar (lambda (x) (list 'setq x value
)) vars
)))
192 (defun a/start-process
(program &rest args
)
193 "Same as `start-process', but doesn't bother about name and buffer."
194 (let ((process-name (concat program
"_process"))
195 (buffer-name (generate-new-buffer-name
196 (concat program
"_output"))))
197 (apply #'start-process
198 process-name buffer-name program args
)))
200 (defun a/dired-start-process
(program &optional args
)
201 "Open current file with a PROGRAM."
202 ;; Shell command looks like this: "program [ARGS]... FILE" (ARGS can
203 ;; be nil, so remove it).
204 (apply #'a
/start-process
206 (remove nil
(list args
(dired-get-file-for-visit)))))
208 ;; (fringe-mode '(3 . 1))
211 (setq disabled-command-function nil
)
213 (setq save-interprogram-paste-before-kill t
)
215 (setq enable-recursive-minibuffers t
216 resize-mini-windows t
)
218 (defalias 'yes-or-no-p
#'y-or-n-p
)
220 (setq initial-buffer-choice t
)
222 (setq initial-scratch-message nil
)
224 (setq initial-major-mode
'text-mode
)
226 (setq inhibit-startup-buffer-menu t
)
228 (advice-add #'display-startup-echo-area-message
:override
#'ignore
)
229 (setq inhibit-startup-screen t
230 inhibit-startup-echo-area-message user-login-name
)
232 (setq frame-title-format
233 '("" invocation-name
" - "
234 (:eval
(if (buffer-file-name)
235 (abbreviate-file-name (buffer-file-name))
238 (setq backup-by-copying t
240 delete-old-versions t
)
242 (global-auto-revert-mode 1)
243 (setq auto-revert-verbose nil
244 global-auto-revert-non-file-buffers nil
)
248 require-final-newline t
253 (with-eval-after-load 'compile
254 (defun a/compilation-finish-function
(buffer outstr
)
255 (unless (string-match "finished" outstr
)
256 (switch-to-buffer-other-window buffer
))
259 (setq compilation-finish-functions
#'a
/compilation-finish-function
)
263 (defadvice compilation-start
264 (around inhibit-display
265 (command &optional mode name-function highlight-regexp
))
266 (if (not (string-match "^\\(find\\|grep\\)" command
))
267 (cl-letf (((symbol-function 'display-buffer
) #'ignore
))
268 (save-window-excursion ad-do-it
))
270 (ad-activate 'compilation-start
))
272 (setq search-default-mode
#'char-fold-to-regexp
)
274 ;; uncomment to extend this behaviour to query-replace
275 ;; (setq replace-char-fold t)
277 (setq-default cursor-type
'bar
)
279 (setq isearch-allow-scroll t
)
284 ("C-c e b" . eval-buffer
)
285 ("C-c e r" . eval-region
)
287 ("C-c e i" . emacs-init-time
)
288 ("C-c e u" . emacs-uptime
)
290 ("C-c F m" . make-frame-command
)
291 ("C-c F d" . delete-frame
)
292 ("C-c F D" . delete-other-frames
)
294 ("C-c o" . other-window
)
296 ("C-S-h C" . describe-char
)
297 ("C-S-h F" . describe-face
)
299 ("C-x k" . kill-this-buffer
)
300 ("C-x K" . kill-buffer
)
302 ("s-p" . beginning-of-buffer
)
303 ("s-n" . end-of-buffer
))
305 (when (display-graphic-p)
306 (unbind-key "C-z" global-map
))
309 :prefix-map a
/straight-prefix-map
311 ("u" . straight-use-package
)
312 ("f" . straight-freeze-versions
)
313 ("t" . straight-thaw-versions
)
314 ("P" . straight-prune-build
)
315 ("g" . straight-get-recipe
)
316 ("r" . a
/reload-init
)
317 ;; M-x ^straight-.*-all$
318 ("a c" . straight-check-all
)
319 ("a f" . straight-fetch-all
)
320 ("a m" . straight-merge-all
)
321 ("a n" . straight-normalize-all
)
322 ("a F" . straight-pull-all
)
323 ("a P" . straight-push-all
)
324 ("a r" . straight-rebuild-all
)
325 ;; M-x ^straight-.*-package$
326 ("p c" . straight-check-package
)
327 ("p f" . straight-fetch-package
)
328 ("p m" . straight-merge-package
)
329 ("p n" . straight-normalize-package
)
330 ("p F" . straight-pull-package
)
331 ("p P" . straight-push-package
)
332 ("p r" . straight-rebuild-package
))
334 (use-package auto-compile
337 (auto-compile-on-load-mode)
338 (auto-compile-on-save-mode)
339 (setq auto-compile-display-buffer nil
340 auto-compile-mode-line-counter t
341 auto-compile-source-recreate-deletes-dest t
342 auto-compile-toggle-deletes-nonlib-dest t
343 auto-compile-update-autoloads t
)
344 (add-hook 'auto-compile-inhibit-compile-hook
345 'auto-compile-inhibit-compile-detached-git-head
))
347 (straight-use-package 'org-plus-contrib
)
352 (setq org-src-tab-acts-natively t
353 org-src-preserve-indentation nil
354 org-edit-src-content-indentation
0
355 org-link-email-description-format
"Email %c: %s" ; %.30s
356 org-highlight-latex-and-related
'(entities)
357 org-use-speed-commands t
358 org-startup-folded
'content
359 org-catch-invisible-edits
'show-and-error
361 (add-to-list 'org-structure-template-alist
'("L" .
"src emacs-lisp") t
)
363 (("C-c a o a" . org-agenda
)
365 ("M-L" . org-insert-last-stored-link
)
367 :hook
((org-mode . org-indent-mode
)
368 (org-mode . auto-fill-mode
)
369 (org-mode . flyspell-mode
))
371 (org-agenda-files '("~/usr/org/todos/personal.org"
372 "~/usr/org/todos/masters.org"))
373 (org-agenda-start-on-weekday 0)
374 (org-latex-packages-alist '(("" "listings") ("" "color")))
376 '(org-block-begin-line ((t (:foreground
"#5a5b5a" :background
"#1d1f21"))))
377 '(org-block ((t (:background
"#1d1f21"))))
378 '(org-latex-and-related ((t (:foreground
"#b294bb")))))
380 (use-feature ox-latex
383 (setq org-latex-listings
'listings
384 ;; org-latex-prefer-user-labels t
386 (add-to-list 'org-latex-classes
387 '("IEEEtran" "\\documentclass[11pt]{IEEEtran}"
388 ("\\section{%s}" .
"\\section*{%s}")
389 ("\\subsection{%s}" .
"\\subsection*{%s}")
390 ("\\subsubsection{%s}" .
"\\subsubsection*{%s}")
391 ("\\paragraph{%s}" .
"\\paragraph*{%s}")
392 ("\\subparagraph{%s}" .
"\\subparagraph*{%s}"))
394 (require 'ox-beamer
))
396 (use-feature ox-extra
398 (ox-extras-activate '(latex-header-blocks ignore-headlines
)))
400 (with-eval-after-load 'org
401 (defvar a
/show-async-tangle-results nil
402 "Keep *emacs* async buffers around for later inspection.")
404 (defvar a
/show-async-tangle-time nil
405 "Show the time spent tangling the file.")
407 (defun a/async-babel-tangle
()
408 "Tangle org file asynchronously."
410 (let* ((file-tangle-start-time (current-time))
411 (file (buffer-file-name))
412 (file-nodir (file-name-nondirectory file
))
413 ;; (async-quiet-switch "-q")
414 (file-noext (file-name-sans-extension file
)))
418 (org-babel-tangle-file ,file
))
419 (unless a
/show-async-tangle-results
422 (message "Tangled %s%s"
424 (if a
/show-async-tangle-time
426 (float-time (time-subtract (current-time)
427 ',file-tangle-start-time
)))
429 (message "Tangling %s failed" ,file-nodir
))))))))
432 'safe-local-variable-values
433 '(eval add-hook
'after-save-hook
#'a
/async-babel-tangle
'append
'local
))
437 :bind
(("C-x g" . magit-status
)
438 ("s-g s" . magit-status
)
439 ("s-g l" . magit-log-buffer-file
))
441 (magit-add-section-hook 'magit-status-sections-hook
442 'magit-insert-modules
443 'magit-insert-stashes
445 (setq magit-repository-directories
'(("~/" .
0)
447 (nconc magit-section-initial-visibility-alist
448 '(([unpulled status
] . show
)
449 ([unpushed status
] . show
)))
450 :custom-face
(magit-diff-file-heading ((t (:weight normal
)))))
455 (add-to-list 'recentf-exclude
"^/\\(?:ssh\\|su\\|sudo\\)?:")
456 (setq recentf-max-saved-items
40))
463 (:map ivy-minibuffer-map
464 ([escape] . keyboard-escape-quit)
465 ([S-up] . ivy-previous-history-element)
466 ([S-down] . ivy-next-history-element)
467 ("DEL" . ivy-backward-delete-char))
471 ivy-use-virtual-buffers t
472 ivy-virtual-abbreviate 'abbreviate
473 ivy-count-format "%d/%d ")
476 ;; (ivy-minibuffer-match-face-2 ((t (:background "#e99ce8" :weight semi-bold))))
477 ;; (ivy-minibuffer-match-face-3 ((t (:background "#bbbbff" :weight semi-bold))))
478 ;; (ivy-minibuffer-match-face-4 ((t (:background "#ffbbff" :weight semi-bold))))
483 :bind (("C-s" . swiper-isearch)
485 ("C-S-s" . isearch-forward)))
489 :bind (([remap execute-extended-command] . counsel-M-x)
490 ([remap find-file] . counsel-find-file)
491 ("C-c x" . counsel-M-x)
492 ("C-c f ." . counsel-find-file)
493 ("C-c f l" . counsel-find-library)
494 :map minibuffer-local-map
495 ("C-r" . counsel-minibuffer-history))
498 (defalias 'locate #'counsel-locate))
503 :bind ("C-c a s e" . eshell)
505 (eval-when-compile (defvar eshell-prompt-regexp))
506 (defun a/eshell-quit-or-delete-char (arg)
508 (if (and (eolp) (looking-back eshell-prompt-regexp nil))
509 (eshell-life-is-too-much)
512 (defun a/eshell-clear ()
514 (let ((inhibit-read-only t))
518 (defun a/eshell-setup ()
519 (make-local-variable 'company-idle-delay)
520 (defvar company-idle-delay)
521 (setq company-idle-delay nil)
522 (bind-keys :map eshell-mode-map
523 ("C-d" . a/eshell-quit-or-delete-char)
524 ("C-S-l" . a/eshell-clear)
525 ("M-r" . counsel-esh-history)
526 ([tab] . company-complete)))
528 :hook (eshell-mode . a/eshell-setup)
530 (eshell-hist-ignoredups t)
531 (eshell-input-filter 'eshell-input-filter-initial-space))
535 (("C-x C-b" . ibuffer-other-window)
536 :map ibuffer-mode-map
537 ("P" . ibuffer-backward-filter-group)
538 ("N" . ibuffer-forward-filter-group)
539 ("M-p" . ibuffer-do-print)
540 ("M-n" . ibuffer-do-shell-command-pipe-replace))
542 ;; Use human readable Size column instead of original one
543 (define-ibuffer-column size-h
544 (:name "Size" :inline t)
546 ((> (buffer-size) 1000000) (format "%7.1fM" (/ (buffer-size) 1000000.0)))
547 ((> (buffer-size) 100000) (format "%7.0fk" (/ (buffer-size) 1000.0)))
548 ((> (buffer-size) 1000) (format "%7.1fk" (/ (buffer-size) 1000.0)))
549 (t (format "%8d" (buffer-size)))))
551 (ibuffer-saved-filter-groups
553 ("dired" (mode . dired-mode))
554 ("org" (mode . org-mode))
557 (mode . gnus-group-mode)
558 (mode . gnus-summary-mode)
559 (mode . gnus-article-mode)
560 ;; not really, but...
561 (mode . message-mode)))
579 (mode . emacs-lisp-mode)
581 (mode . haskell-mode)
583 (mode . alloy-mode)))
587 (mode . latex-mode)))
590 (name . "^\\*scratch\\*$")
591 (name . "^\\*Messages\\*$")))
592 ("erc" (mode . erc-mode)))))
594 '((mark modified read-only locked " "
595 (name 18 18 :left :elide)
599 (mode 16 16 :left :elide)
600 " " filename-and-process)
604 :hook (ibuffer . (lambda () (ibuffer-switch-to-saved-filter-groups "default"))))
607 :hook (prog-mode . outline-minor-mode)
610 outline-minor-mode-map
611 ("<s-tab>" . outline-toggle-children)
612 ("M-p" . outline-previous-visible-heading)
613 ("M-n" . outline-next-visible-heading)
614 :prefix-map a/outline-prefix-map
616 ("TAB" . outline-toggle-children)
617 ("a" . outline-hide-body)
618 ("H" . outline-hide-body)
619 ("S" . outline-show-all)
620 ("h" . outline-hide-subtree)
621 ("s" . outline-show-subtree)))
624 :custom (ls-lisp-dirs-first t))
628 (setq dired-listing-switches "-alh"
629 ls-lisp-use-insert-directory-program nil)
631 ;; easily diff 2 marked files
632 ;; https://oremacs.com/2017/03/18/dired-ediff/
633 (defun dired-ediff-files ()
636 (defvar ediff-after-quit-hook-internal)
637 (let ((files (dired-get-marked-files))
638 (wnd (current-window-configuration)))
639 (if (<= (length files) 2)
640 (let ((file1 (car files))
641 (file2 (if (cdr files)
645 (dired-dwim-target-directory)))))
646 (if (file-newer-than-file-p file1 file2)
647 (ediff-files file2 file1)
648 (ediff-files file1 file2))
649 (add-hook 'ediff-after-quit-hook-internal
651 (setq ediff-after-quit-hook-internal nil)
652 (set-window-configuration wnd))))
653 (error "no more than 2 files should be marked"))))
654 :bind (:map dired-mode-map
655 ("b" . dired-up-directory)
656 ("e" . dired-ediff-files)
657 ("E" . dired-toggle-read-only)
658 ("\\" . dired-hide-details-mode)
661 (a/dired-start-process "zathura"))))
662 :hook (dired-mode . dired-hide-details-mode))
666 (temp-buffer-resize-mode)
667 (setq help-window-select t))
671 (add-to-list 'tramp-default-proxies-alist '(nil "\\`root\\'" "/ssh:%h:"))
672 (add-to-list 'tramp-default-proxies-alist '("localhost" nil nil))
673 (add-to-list 'tramp-default-proxies-alist
674 (list (regexp-quote (system-name)) nil nil)))
677 :config (dash-enable-font-lock))
679 (use-package doc-view
680 :bind (:map doc-view-mode-map
681 ("M-RET" . image-previous-line)))
685 (setq diff-hl-draw-borders nil)
686 (global-diff-hl-mode)
687 :hook (magit-post-refresh . diff-hl-magit-post-refresh))
690 :when (version< "25" emacs-version)
691 :config (global-eldoc-mode))
695 :config (show-paren-mode))
698 :config (column-number-mode))
700 (use-feature savehist
701 :config (savehist-mode))
703 (use-feature saveplace
704 :when (version< "25" emacs-version)
705 :config (save-place-mode))
707 (use-feature prog-mode
708 :config (global-prettify-symbols-mode)
709 (defun indicate-buffer-boundaries-left ()
710 (setq indicate-buffer-boundaries 'left))
711 (add-hook 'prog-mode-hook #'indicate-buffer-boundaries-left))
713 (use-feature text-mode
714 :hook ((text-mode . indicate-buffer-boundaries-left)
715 (text-mode . abbrev-mode)))
720 (:map company-active-map
721 ([tab] . company-complete-common-or-cycle)
722 ([escape] . company-abort
))
724 (company-minimum-prefix-length 1)
725 (company-selection-wrap-around t
)
726 (company-dabbrev-char-regexp "\\sw\\|\\s_\\|[-_]")
727 (company-dabbrev-downcase nil
)
728 (company-dabbrev-ignore-case nil
)
730 (global-company-mode t
))
732 (use-package flycheck
734 :hook
(prog-mode . flycheck-mode
)
736 (:map flycheck-mode-map
737 ("M-P" . flycheck-previous-error
)
738 ("M-N" . flycheck-next-error
))
740 ;; Use the load-path from running Emacs when checking elisp files
741 (setq flycheck-emacs-lisp-load-path
'inherit
)
743 ;; Only flycheck when I actually save the buffer
744 (setq flycheck-check-syntax-automatically
'(mode-enabled save
)))
746 ;; http://endlessparentheses.com/ispell-and-apostrophes.html
750 ;; ’ can be part of a word
751 (setq ispell-local-dictionary-alist
752 `((nil "[[:alpha:]]" "[^[:alpha:]]"
753 "['\x2019]" nil
("-B") nil utf-8
)))
754 ;; don't send ’ to the subprocess
755 (defun endless/replace-apostrophe
(args)
756 (cons (replace-regexp-in-string
757 "’" "'" (car args
))
759 (advice-add #'ispell-send-string
:filter-args
760 #'endless
/replace-apostrophe
)
762 ;; convert ' back to ’ from the subprocess
763 (defun endless/replace-quote
(args)
764 (if (not (derived-mode-p 'org-mode
))
766 (cons (replace-regexp-in-string
767 "'" "’" (car args
))
769 (advice-add #'ispell-parse-output
:filter-args
770 #'endless
/replace-quote
))
772 (use-feature lisp-mode
774 (add-hook 'emacs-lisp-mode-hook
'outline-minor-mode
)
775 (add-hook 'emacs-lisp-mode-hook
'reveal-mode
)
776 (defun indent-spaces-mode ()
777 (setq indent-tabs-mode nil
))
778 (add-hook 'lisp-interaction-mode-hook
#'indent-spaces-mode
))
780 (use-package alloy-mode
781 :straight
(:host github
:repo
"dwwmmn/alloy-mode")
783 :config
(setq alloy-basic-offset
2))
785 (use-package proof-site
; Proof General
786 :straight proof-general
)
788 (eval-when-compile (defvar lean-mode-map
))
789 (use-package lean-mode
791 :bind
(:map lean-mode-map
792 ("S-SPC" . company-complete
))
794 (require 'lean-input
)
795 (setq default-input-method
"Lean"
796 lean-input-tweak-all
'(lean-input-compose
797 (lean-input-prepend "/")
798 (lean-input-nonempty))
799 lean-input-user-translations
'(("/" "/")))
802 (use-package haskell-mode
804 (setq haskell-indentation-layout-offset
4
805 haskell-indentation-left-offset
4
806 flycheck-checker
'haskell-hlint
807 flycheck-disabled-checkers
'(haskell-stack-ghc haskell-ghc
)))
812 :hook
(haskell-mode . dante-mode
))
814 (use-package hlint-refactor
816 :bind
(:map hlint-refactor-mode-map
817 ("C-c l b" . hlint-refactor-refactor-buffer
)
818 ("C-c l r" . hlint-refactor-refactor-at-point
))
819 :hook
(haskell-mode . hlint-refactor-mode
))
821 (use-package flycheck-haskell
824 (use-package sgml-mode
826 (setq sgml-basic-offset
2))
828 (use-package css-mode
830 (setq css-indent-offset
2))
832 (use-package web-mode
836 web-mode-code-indent-offset
837 web-mode-css-indent-offset
838 web-mode-markup-indent-offset
))
840 (use-package emmet-mode
841 :after
(:any web-mode css-mode sgml-mode
)
842 :bind
* (("C-)" . emmet-next-edit-point
)
843 ("C-(" . emmet-prev-edit-point
))
845 (unbind-key "C-j" emmet-mode-keymap
)
846 (setq emmet-move-cursor-between-quotes t
)
847 :hook
(web-mode css-mode html-mode sgml-mode
))
851 (use-feature geiser-guile
853 (setq geiser-guile-load-path
"~/src/git/guix"))
858 :config
(setq Man-width
80))
860 (use-package which-key
863 (which-key-add-key-based-replacements
864 ;; prefixes for global prefixes and minor modes
868 "C-c 8 -" "typo/dashes"
869 "C-c 8 <" "typo/left-brackets"
870 "C-c 8 >" "typo/right-brackets"
872 "C-x a" "abbrev/expand"
873 "C-x r" "rectangle/register/bookmark"
874 "C-x v" "version control"
875 ;; prefixes for my personal bindings
876 "C-c a" "applications"
880 "C-c p" "package-management"
881 ;; "C-c p e" "package-management/epkg"
882 "C-c p s" "straight.el"
885 "C-c c" "compile-and-comments"
890 "C-c m" "multiple-cursors"
892 "C-c P s" "projectile/search"
893 "C-c P x" "projectile/execute"
894 "C-c P 4" "projectile/other-window"
900 ;; prefixes for major modes
901 (which-key-add-major-mode-key-based-replacements 'message-mode
903 (which-key-add-major-mode-key-based-replacements 'org-mode
904 "C-c C-v" "org-babel")
905 (which-key-add-major-mode-key-based-replacements 'web-mode
906 "C-c C-a" "web/attributes"
907 "C-c C-b" "web/blocks"
909 "C-c C-e" "web/element"
910 "C-c C-t" "web/tags")
914 (which-key-add-column-padding 5)
915 (which-key-max-description-length 32))
917 (add-to-list 'custom-theme-load-path
"~/.emacs.d/lisp")
918 (load-theme 'tangomod t
)
920 (use-package smart-mode-line
921 :commands
(sml/apply-theme
)
926 (use-package doom-themes
)
928 (defvar a
/org-mode-font-lock-keywords
929 '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)"
930 (1 '(:foreground
"#5a5b5a" :background
"#292b2b") t
) ; directive
931 (3 '(:foreground
"#81a2be" :background
"#292b2b") t
) ; kind
932 (4 '(:foreground
"#c5c8c6") t
)))) ; title
934 (defun a/lights-on
()
935 "Enable my favourite light theme."
937 (mapc #'disable-theme custom-enabled-themes
)
938 (load-theme 'tangomod t
)
939 (sml/apply-theme
'automatic
)
940 (font-lock-remove-keywords
941 'org-mode a
/org-mode-font-lock-keywords
))
943 (defun a/lights-off
()
946 (mapc #'disable-theme custom-enabled-themes
)
947 (load-theme 'doom-tomorrow-night t
)
948 (sml/apply-theme
'automatic
)
949 (font-lock-add-keywords
950 'org-mode a
/org-mode-font-lock-keywords t
))
953 ("s-t d" . a
/lights-off
)
954 ("s-t l" . a
/lights-on
))
956 (use-package crux
; results in Waiting for git... [2 times]
958 :bind
(("C-c b k" . crux-kill-other-buffers
)
959 ("C-c d" . crux-duplicate-current-line-or-region
)
960 ("C-c D" . crux-duplicate-and-comment-current-line-or-region
)
961 ("C-c f c" . crux-copy-file-preserve-attributes
)
962 ("C-c f d" . crux-delete-file-and-buffer
)
963 ("C-c f r" . crux-rename-file-and-buffer
)
964 ("C-c j" . crux-top-join-line
)
965 ("C-S-j" . crux-top-join-line
)))
968 :bind
(("C-a" . mwim-beginning-of-code-or-line
)
969 ("C-e" . mwim-end-of-code-or-line
)
970 ("<home>" . mwim-beginning-of-line-or-code
)
971 ("<end>" . mwim-end-of-line-or-code
)))
973 (use-package projectile
974 :bind-keymap
("C-c P" . projectile-command-map
)
978 (defun my-projectile-invalidate-cache (&rest _args
)
979 ;; ignore the args to `magit-checkout'
980 (projectile-invalidate-cache nil
))
982 (eval-after-load 'magit-branch
984 (advice-add 'magit-checkout
985 :after
#'my-projectile-invalidate-cache
)
986 (advice-add 'magit-branch-and-checkout
987 :after
#'my-projectile-invalidate-cache
)))
988 :custom
(projectile-completion-system 'ivy
))
993 (("C-S-h c" . helpful-command
)
994 ("C-S-h f" . helpful-callable
) ; helpful-function
995 ("C-S-h v" . helpful-variable
)
996 ("C-S-h k" . helpful-key
)
997 ("C-S-h p" . helpful-at-point
)))
999 (use-package unkillable-scratch
1002 (unkillable-scratch 1)
1004 (unkillable-buffers '("^\\*scratch\\*$" "^\\*Messages\\*$")))
1006 (use-package boxquote
1009 (:prefix-map a
/boxquote-prefix-map
1011 ("b" . boxquote-buffer
)
1012 ("B" . boxquote-insert-buffer
)
1013 ("d" . boxquote-defun
)
1014 ("F" . boxquote-insert-file
)
1015 ("hf" . boxquote-describe-function
)
1016 ("hk" . boxquote-describe-key
)
1017 ("hv" . boxquote-describe-variable
)
1018 ("hw" . boxquote-where-is
)
1019 ("k" . boxquote-kill
)
1020 ("p" . boxquote-paragraph
)
1021 ("q" . boxquote-boxquote
)
1022 ("r" . boxquote-region
)
1023 ("s" . boxquote-shell-command
)
1024 ("t" . boxquote-text
)
1025 ("T" . boxquote-title
)
1026 ("u" . boxquote-unbox
)
1027 ("U" . boxquote-unbox-region
)
1028 ("y" . boxquote-yank
)
1029 ("M-q" . boxquote-fill-paragraph
)
1030 ("M-w" . boxquote-kill-ring-save
)))
1032 (use-package orgalist
1035 :hook
(message-mode . orgalist-mode
))
1040 (typo-global-mode 1)
1041 :hook
(text-mode . typo-mode
))
1043 (use-package hl-todo
1046 (global-hl-todo-mode))
1048 (use-package shrink-path
1052 (defvar user-
@-host
(concat (user-login-name) "@" (system-name) " "))
1053 (defun +eshell
/prompt
()
1054 (let ((base/dir
(shrink-path-prompt default-directory
)))
1055 (concat (propertize user-
@-host
'face
'default
)
1056 (propertize (car base
/dir
)
1057 'face
'font-lock-comment-face
)
1058 (propertize (cdr base
/dir
)
1059 'face
'font-lock-constant-face
)
1060 (propertize "> " 'face
'default
))))
1061 (setq eshell-prompt-regexp
(concat user-
@-host
".*> ")
1062 eshell-prompt-function
#'+eshell
/prompt
))
1064 (use-package eshell-up
1066 :commands eshell-up
)
1068 (use-package multi-term
1070 :bind
(("C-c a s m" . multi-term-dedicated-toggle
)
1072 ("C-c C-j" . term-char-mode
)
1074 ("C-c C-j" . term-line-mode
))
1076 (setq multi-term-program
"/bin/screen"
1077 ;; TODO: add separate bindings for connecting to existing
1078 ;; session vs. always creating a new one
1079 multi-term-dedicated-select-after-open-p t
1080 multi-term-dedicated-window-height
20
1081 multi-term-dedicated-max-window-height
30
1083 '(("C-c C-c" . term-interrupt-subjob
)
1084 ("C-c C-e" . term-send-esc
)
1086 ("C-y" . term-paste
)
1087 ("M-f" . term-send-forward-word
)
1088 ("M-b" . term-send-backward-word
)
1089 ("M-p" . term-send-up
)
1090 ("M-n" . term-send-down
)
1091 ("<C-backspace>" . term-send-backward-kill-word
)
1092 ("<M-DEL>" . term-send-backward-kill-word
)
1093 ("M-d" . term-send-delete-word
)
1094 ("M-," . term-send-raw
)
1095 ("M-." . comint-dynamic-complete
))
1096 term-unbind-key-alist
1097 '("C-z" "C-x" "C-c" "C-h" "C-y" "<ESC>")))
1099 (use-package page-break-lines
1101 (global-page-break-lines-mode))
1103 (use-package expand-region
1104 :bind
("C-=" . er
/expand-region
))
1106 (use-package multiple-cursors
1108 (("C-S-<mouse-1>" . mc
/add-cursor-on-click
)
1109 (:prefix-map a
/mc-prefix-map
1111 ("c" . mc
/edit-lines
)
1112 ("n" . mc
/mark-next-like-this
)
1113 ("p" . mc
/mark-previous-like-this
)
1114 ("a" . mc
/mark-all-like-this
))))
1120 (use-package yasnippet
1123 (defconst yas-verbosity-cur yas-verbosity
)
1124 (setq yas-verbosity
2)
1125 (add-to-list 'yas-snippet-dirs
"~/src/git/guix/etc/snippets")
1127 (setq yas-verbosity yas-verbosity-cur
)
1129 (text-mode . yas-minor-mode
))
1131 (use-package debbugs
1134 :repo
"emacs-straight/debbugs"
1135 :files
(:defaults
"Debbugs.wsdl")))
1137 (use-package org-ref
1139 (a/setq-every
'("~/usr/org/references.bib")
1140 reftex-default-bibliography
1141 org-ref-default-bibliography
)
1143 org-ref-bibliography-notes
"~/usr/org/notes.org"
1144 org-ref-pdf-directory
"~/usr/org/bibtex-pdfs/"))
1147 :commands
(slack-start)
1149 (eval-when-compile ; silence the byte-compiler
1150 (defvar url-http-data nil
)
1151 (defvar url-http-extra-headers nil
)
1152 (defvar url-http-method nil
)
1153 (defvar url-callback-function nil
)
1154 (defvar url-callback-arguments nil
)
1155 (defvar oauth--token-data nil
))
1156 (setq slack-buffer-emojify t
1157 slack-prefer-current-team t
)
1159 (slack-register-team
1160 :name
"nday-students"
1162 :token nday-students-token
1163 :subscribed-channels
'(general)
1164 :full-and-display-names t
)
1165 (add-to-list 'swiper-font-lock-exclude
'slack-message-buffer-mode t
)
1166 (setq lui-time-stamp-format
"[%Y-%m-%d %H:%M:%S]"
1167 lui-time-stamp-only-when-changed-p t
1168 lui-time-stamp-position
'right
)
1170 (("C-c s s" . slack-start
)
1171 ("C-c s u" . slack-select-unread-rooms
)
1172 ("C-c s b" . slack-select-rooms
)
1173 ("C-c s t" . slack-change-current-team
)
1174 ("C-c s c" . slack-ws-close
)
1176 ("M-p" . slack-buffer-goto-prev-message
)
1177 ("M-n" . slack-buffer-goto-next-message
)
1178 ("C-c e" . slack-message-edit
)
1179 ("C-c k" . slack-message-delete
)
1180 ("C-c C-k" . slack-channel-leave
)
1181 ("C-c r a" . slack-message-add-reaction
)
1182 ("C-c r r" . slack-message-remove-reaction
)
1183 ("C-c r s" . slack-message-show-reaction-users
)
1184 ("C-c p l" . slack-room-pins-list
)
1185 ("C-c p a" . slack-message-pins-add
)
1186 ("C-c p r" . slack-message-pins-remove
)
1187 ("@" . slack-message-embed-mention
)
1188 ("#" . slack-message-embed-channel
)))
1193 (setq alert-default-style
'notifier
))
1195 (defvar a
/maildir
(expand-file-name "~/mail/"))
1196 (with-eval-after-load 'recentf
1197 (add-to-list 'recentf-exclude a
/maildir
))
1200 a
/gnus-init-file
(no-littering-expand-etc-file-name "gnus")
1201 mail-user-agent
'gnus-user-agent
1202 read-mail-command
'gnus
)
1205 :bind
(("s-m" . gnus
)
1206 ("s-M" . gnus-unplugged
))
1209 gnus-select-method
'(nnnil "")
1210 gnus-secondary-select-methods
1212 (nnimap-stream plain
)
1213 (nnimap-address "127.0.0.1")
1214 (nnimap-server-port 143)
1215 (nnimap-authenticator plain
)
1216 (nnimap-user "amin@bndl.org"))
1218 (nnimap-stream plain
)
1219 (nnimap-address "127.0.0.1")
1220 (nnimap-server-port 143)
1221 (nnimap-authenticator plain
)
1222 (nnimap-user "abandali@uwaterloo.ca"))
1224 (nnimap-stream plain
)
1225 (nnimap-address "127.0.0.1")
1226 (nnimap-server-port 143)
1227 (nnimap-authenticator plain
)
1228 (nnimap-user "abandali@csclub.uw")))
1229 gnus-message-archive-group
"nnimap+amin:Sent"
1232 (to-address .
"deepspec@lists.cs.princeton.edu")
1233 (to-list .
"deepspec@lists.cs.princeton.edu"))
1234 ("gnu\\.emacs-devel"
1235 (to-address .
"emacs-devel@gnu.org")
1236 (to-list .
"emacs-devel@gnu.org"))
1237 ("gnu\\.emacs-orgmode"
1238 (to-address .
"emacs-orgmode@gnu.org")
1239 (to-list .
"emacs-orgmode@gnu.org"))
1240 ("gnu\\.emacsconf-discuss"
1241 (to-address .
"emacsconf-discuss@gnu.org")
1242 (to-list .
"emacsconf-discuss@gnu.org"))
1243 ("gnu\\.fencepost-users"
1244 (to-address .
"fencepost-users@gnu.org")
1245 (to-list .
"fencepost-users@gnu.org"))
1246 ("gnu\\.gnunet-developers"
1247 (to-address .
"gnunet-developers@gnu.org")
1248 (to-list .
"gnunet-developers@gnu.org"))
1249 ("gnu\\.guile-devel"
1250 (to-address .
"guile-devel@gnu.org")
1251 (to-list .
"guile-devel@gnu.org"))
1253 (to-address .
"guix-devel@gnu.org")
1254 (to-list .
"guix-devel@gnu.org"))
1255 ("gnu\\.haskell-art"
1256 (to-address .
"haskell-art@we.lurk.org")
1257 (to-list .
"haskell-art@we.lurk.org"))
1258 ("gnu\\.haskell-cafe"
1259 (to-address .
"haskell-cafe@haskell.org")
1260 (to-list .
"haskell-cafe@haskell.org"))
1261 ("gnu\\.help-gnu-emacs"
1262 (to-address .
"help-gnu-emacs@gnu.org")
1263 (to-list .
"help-gnu-emacs@gnu.org"))
1264 ("gnu\\.info-gnu-emacs"
1265 (to-address .
"info-gnu-emacs@gnu.org")
1266 (to-list .
"info-gnu-emacs@gnu.org"))
1268 (to-address .
"info-guix@gnu.org")
1269 (to-list .
"info-guix@gnu.org"))
1271 (to-address .
"notmuch@notmuchmail.org")
1272 (to-list .
"notmuch@notmuchmail.org"))
1273 ("gnu\\.parabola-dev"
1274 (to-address .
"dev@lists.parabola.nu")
1275 (to-list .
"dev@lists.parabola.nu"))
1277 (to-address .
"webmasters@gnu.org")
1278 (to-list .
"webmasters@gnu.org"))
1279 ("gnu\\.www-commits"
1280 (to-address .
"www-commits@gnu.org")
1281 (to-list .
"www-commits@gnu.org"))
1282 ("gnu\\.www-discuss"
1283 (to-address .
"www-discuss@gnu.org")
1284 (to-list .
"www-discuss@gnu.org"))
1285 ("gnu\\.~bandali\\.public-inbox"
1286 (to-address .
"~bandali/public-inbox@lists.sr.ht")
1287 (to-list .
"~bandali/public-inbox@lists.sr.ht"))
1288 ("gnu\\.~sircmpwn\\.srht-admins"
1289 (to-address .
"~sircmpwn/sr.ht-admins@lists.sr.ht")
1290 (to-list .
"~sircmpwn/sr.ht-admins@lists.sr.ht"))
1291 ("gnu\\.~sircmpwn\\.srht-announce"
1292 (to-address .
"~sircmpwn/sr.ht-announce@lists.sr.ht")
1293 (to-list .
"~sircmpwn/sr.ht-announce@lists.sr.ht"))
1294 ("gnu\\.~sircmpwn\\.srht-dev"
1295 (to-address .
"~sircmpwn/sr.ht-dev@lists.sr.ht")
1296 (to-list .
"~sircmpwn/sr.ht-dev@lists.sr.ht"))
1297 ("gnu\\.~sircmpwn\\.srht-discuss"
1298 (to-address .
"~sircmpwn/sr.ht-discuss@lists.sr.ht")
1299 (to-list .
"~sircmpwn/sr.ht-discuss@lists.sr.ht"))
1304 gnus-large-newsgroup
50
1305 gnus-home-directory
(no-littering-expand-var-file-name "gnus/")
1306 gnus-directory
(concat gnus-home-directory
"news/")
1307 message-directory
(concat gnus-home-directory
"mail/")
1308 nndraft-directory
(concat gnus-home-directory
"drafts/")
1309 gnus-save-newsrc-file nil
1310 gnus-read-newsrc-file nil
1311 gnus-interactive-exit nil
1312 gnus-gcc-mark-as-read t
)
1316 (require 'ebdb-gnus
)
1318 (with-eval-after-load 'recentf
1319 (add-to-list 'recentf-exclude gnus-home-directory
)))
1321 (use-feature gnus-art
1324 gnus-visible-headers
1325 (concat gnus-visible-headers
"\\|^List-Id:\\|^X-RT-Originator:\\|^User-Agent:")
1326 gnus-sorted-header-list
1327 '("^From:" "^Subject:" "^Summary:" "^Keywords:"
1328 "^Followup-To:" "^To:" "^Cc:" "X-RT-Originator"
1329 "^Newsgroups:" "List-Id:" "^Organization:"
1330 "^User-Agent:" "^Date:")
1331 ;; local-lapsed article dates
1332 ;; from https://www.emacswiki.org/emacs/GnusFormatting#toc11
1333 gnus-article-date-headers
'(user-defined)
1334 gnus-article-time-format
1336 (let* ((date (format-time-string "%a, %d %b %Y %T %z" time
))
1337 (local (article-make-date-line date
'local
))
1338 (combined-lapsed (article-make-date-line date
1341 (string-match " (.+" combined-lapsed
)
1342 (match-string 0 combined-lapsed
))))
1343 (concat local lapsed
))))
1345 :map gnus-article-mode-map
1346 ("M-L" . org-store-link
)))
1348 (use-feature gnus-sum
1349 :bind
(:map gnus-summary-mode-map
1350 :prefix-map a
/gnus-summary-prefix-map
1352 ("r" . gnus-summary-reply
)
1353 ("w" . gnus-summary-wide-reply
)
1354 ("v" . gnus-summary-show-raw-article
))
1357 :map gnus-summary-mode-map
1358 ("M-L" . org-store-link
))
1359 :hook
(gnus-summary-mode . a
/no-mouse-autoselect-window
))
1361 (use-feature gnus-msg
1363 (setq gnus-posting-styles
1365 (address "amin@bndl.org")
1367 (eval (setq a
/message-cite-say-hi t
)))
1369 (address "bandali@gnu.org")
1370 (eval (set (make-local-variable 'message-user-fqdn
) "fencepost.gnu.org")))
1371 ((header "subject" "ThankCRM")
1372 (to "webmasters-comment@gnu.org")
1373 (body "Added to 2019supporters.html.\n\nMoving to campaigns.\n\n-amin\n")
1374 (eval (setq a
/message-cite-say-hi nil
)))
1375 ("nnimap\\+uwaterloo:.*"
1376 (address "abandali@uwaterloo.ca")
1377 (gcc "\"nnimap+uwaterloo:Sent Items\""))
1378 ("nnimap\\+csclub:.*"
1379 (address "abandali@csclub.uwaterloo.ca")
1380 (gcc "nnimap+csclub:Sent")))))
1382 (use-feature gnus-topic
1383 :hook
(gnus-group-mode . gnus-topic-mode
)
1384 :config
(setq gnus-topic-line-format
"%i[ %A: %(%{%n%}%) ]%v\n"))
1386 (use-feature gnus-agent
1388 (setq gnus-agent-synchronize-flags
'ask
)
1389 :hook
(gnus-group-mode . gnus-agent-mode
))
1391 (use-feature gnus-group
1393 (setq gnus-permanently-visible-groups
"\\(:INBOX$\\|:gnu$\\)"))
1395 (use-feature mm-decode
1397 (setq mm-discouraged-alternatives
'("text/html" "text/richtext")))
1399 (use-feature sendmail
1401 (setq sendmail-program
"/usr/bin/msmtp"
1402 ;; message-sendmail-extra-arguments '("-v" "-d")
1403 mail-specify-envelope-from t
1404 mail-envelope-from
'header
))
1406 (use-feature message
1408 ;; redefine for a simplified In-Reply-To header
1409 ;; (see https://todo.sr.ht/~sircmpwn/lists.sr.ht/67)
1410 (defun message-make-in-reply-to ()
1411 "Return the In-Reply-To header for this message."
1412 (when message-reply-headers
1413 (let ((from (mail-header-from message-reply-headers
))
1414 (msg-id (mail-header-id message-reply-headers
)))
1418 (defconst a
/message-cite-style-format
"On %Y-%m-%d %l:%M %p, %N wrote:")
1419 (defconst message-cite-style-bandali
1420 '((message-cite-function 'message-cite-original
)
1421 (message-citation-line-function 'message-insert-formatted-citation-line
)
1422 (message-cite-reply-position 'traditional
)
1423 (message-yank-prefix "> ")
1424 (message-yank-cited-prefix ">")
1425 (message-yank-empty-prefix ">")
1426 (message-citation-line-format
1427 (if a
/message-cite-say-hi
1428 (concat "Hi %F,\n\n" a
/message-cite-style-format
)
1429 a
/message-cite-style-format
)))
1430 "Citation style based on Mozilla Thunderbird's. Use with message-cite-style.")
1431 (setq ;; message-cite-style 'message-cite-style-bandali
1432 message-kill-buffer-on-exit t
1433 message-send-mail-function
'message-send-mail-with-sendmail
1434 message-sendmail-envelope-from
'header
1435 message-subscribed-address-functions
1436 '(gnus-find-subscribed-addresses)
1437 message-dont-reply-to-names
1438 "\\(\\(amin@bndl\\.org\\)\\|\\(.*@\\(aminb\\|amin\\.bndl\\)\\.org\\)\\|\\(\\(bandali\\|aminb?\\|mab\\)@gnu\\.org\\)\\|\\(a\\(min\\.\\)?bandali@uwaterloo\\.ca\\)\\|\\(abandali@csclub\\.uwaterloo\\.ca\\)\\)")
1439 (require 'company-ebdb
)
1440 :hook
(;; (message-setup . mml-secure-message-sign-pgpmime)
1441 (message-mode . flyspell-mode
)
1442 (message-mode .
(lambda ()
1443 ;; (setq fill-column 65
1444 ;; message-fill-column 65)
1445 (make-local-variable 'company-idle-delay
)
1446 (setq company-idle-delay
0.2))))
1448 ;; (message-header-subject ((t (:foreground "#111" :weight semi-bold))))
1449 ;; (message-header-to ((t (:foreground "#111" :weight normal))))
1450 ;; (message-header-cc ((t (:foreground "#333" :weight normal))))
1453 (with-eval-after-load 'mml-sec
1454 (setq mml-secure-openpgp-encrypt-to-self t
1455 mml-secure-openpgp-sign-with-sender t
))
1457 (use-feature footnote
1460 ;; (setq footnote-start-tag ""
1461 ;; footnote-end-tag ""
1462 ;; footnote-style 'unicode)
1464 (:map message-mode-map
1465 :prefix-map a
/footnote-prefix-map
1467 ("a" . footnote-add-footnote
)
1468 ("b" . footnote-back-to-message
)
1469 ("c" . footnote-cycle-style
)
1470 ("d" . footnote-delete-footnote
)
1471 ("g" . footnote-goto-footnote
)
1472 ("r" . footnote-renumber-footnotes
)
1473 ("s" . footnote-set-style
)))
1476 :straight
(:host github
:repo
"girzel/ebdb")
1478 :bind
(:map gnus-group-mode-map
("e" . ebdb
))
1480 (setq ebdb-sources
(no-littering-expand-var-file-name "ebdb"))
1481 (with-eval-after-load 'swiper
1482 (add-to-list 'swiper-font-lock-exclude
'ebdb-mode t
)))
1484 (use-feature ebdb-com
1487 ;; (use-package ebdb-complete
1490 ;; (ebdb-complete-enable))
1492 (use-package company-ebdb
1494 (defun company-ebdb--post-complete (_) nil
))
1496 (use-feature ebdb-gnus
1499 (ebdb-gnus-window-configuration
1502 (summary 0.25 point
)
1505 (ebdb-gnus 0.3))))))
1507 (use-feature ebdb-mua
1509 ;; :custom (ebdb-mua-pop-up nil)
1512 ;; (use-package ebdb-message
1516 ;; (use-package ebdb-vcard
1519 (use-package message-x
)
1522 :straight
(:host nil
:repo
"https://git.bndl.org/amin/znc.el")
1523 :bind
(("C-c a e e" . znc-erc
)
1524 ("C-c a e a" . znc-all
))
1526 (let ((pwd (let ((auth (auth-source-search :host
"znca")))
1528 ((null auth
) (error "Couldn't find znca's authinfo"))
1529 (t (funcall (plist-get (car auth
) :secret
)))))))
1531 `(("znc.bndl.org" 1337 t
1532 ((freenode "amin/freenode" ,pwd
)))
1533 ("znc.bndl.org" 1337 t
1534 ((moznet "amin/moznet" ,pwd
)))))))
1536 (message "Loading %s...done (%.3fs)" user-init-file
1537 (float-time (time-subtract (current-time)
1538 a
/before-user-init-time
)))
1540 ;;; init.el ends here