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 (use-package no-littering
120 (add-to-list 'savehist-additional-variables
'kill-ring
)
122 (setq auto-save-file-name-transforms
123 `((".*" ,(no-littering-expand-var-file-name "auto-save/") t
))))
128 (setq custom-file
(no-littering-expand-etc-file-name "custom.el"))
129 (when (file-exists-p custom-file
)
131 (setf custom-safe-themes t
))
134 (load (no-littering-expand-etc-file-name "secrets")))
136 (use-package exec-path-from-shell
139 (setq exec-path-from-shell-arguments nil
140 exec-path-from-shell-check-startup-files nil
)
142 (exec-path-from-shell-initialize)
143 ;; while we're at it, let's fix access to our running ssh-agent
144 (exec-path-from-shell-copy-env "SSH_AGENT_PID")
145 (exec-path-from-shell-copy-env "SSH_AUTH_SOCK"))
149 :config
(or (server-running-p) (server-mode)))
151 (setq text-scale-mode-step
1.05)
153 (setq mouse-autoselect-window t
)
155 (defun a/no-mouse-autoselect-window
()
156 (make-local-variable 'mouse-autoselect-window
)
157 (setq mouse-autoselect-window nil
))
159 (setq ;; scroll-margin 1
160 ;; scroll-conservatively 10000
162 scroll-conservatively
10
163 scroll-preserve-screen-position
1)
168 (setq mouse-wheel-scroll-amount
'(1 ((shift) .
1)) ; one line at a time
169 mouse-wheel-progressive-speed nil
; don't accelerate scrolling
170 mouse-wheel-follow-mouse t
)) ; scroll window under mouse
172 (use-feature pixel-scroll
174 :config
(pixel-scroll-mode 1))
176 (setq epg-pinentry-mode
'loopback
)
181 (defmacro a
/setq-every
(value &rest vars
)
182 "Set all the variables from VARS to value VALUE."
183 (declare (indent defun
) (debug t
))
184 `(progn ,@(mapcar (lambda (x) (list 'setq x value
)) vars
)))
186 (defun a/start-process
(program &rest args
)
187 "Same as `start-process', but doesn't bother about name and buffer."
188 (let ((process-name (concat program
"_process"))
189 (buffer-name (generate-new-buffer-name
190 (concat program
"_output"))))
191 (apply #'start-process
192 process-name buffer-name program args
)))
194 (defun a/dired-start-process
(program &optional args
)
195 "Open current file with a PROGRAM."
196 ;; Shell command looks like this: "program [ARGS]... FILE" (ARGS can
197 ;; be nil, so remove it).
198 (apply #'a
/start-process
200 (remove nil
(list args
(dired-get-file-for-visit)))))
202 ;; (fringe-mode '(3 . 1))
205 (setq disabled-command-function nil
)
207 (setq save-interprogram-paste-before-kill t
)
209 (setq enable-recursive-minibuffers t
210 resize-mini-windows t
)
212 (defalias 'yes-or-no-p
#'y-or-n-p
)
214 (setq initial-buffer-choice t
)
216 (setq initial-scratch-message nil
)
218 (setq initial-major-mode
'text-mode
)
220 (setq inhibit-startup-buffer-menu t
)
222 (advice-add #'display-startup-echo-area-message
:override
#'ignore
)
223 (setq inhibit-startup-screen t
224 inhibit-startup-echo-area-message user-login-name
)
226 (setq frame-title-format
227 '("" invocation-name
" - "
228 (:eval
(if (buffer-file-name)
229 (abbreviate-file-name (buffer-file-name))
232 (setq backup-by-copying t
234 delete-old-versions t
)
236 (global-auto-revert-mode 1)
237 (setq auto-revert-verbose nil
238 global-auto-revert-non-file-buffers nil
)
242 require-final-newline t
247 (with-eval-after-load 'compile
248 (defun a/compilation-finish-function
(buffer outstr
)
249 (unless (string-match "finished" outstr
)
250 (switch-to-buffer-other-window buffer
))
253 (setq compilation-finish-functions
#'a
/compilation-finish-function
)
257 (defadvice compilation-start
258 (around inhibit-display
259 (command &optional mode name-function highlight-regexp
))
260 (if (not (string-match "^\\(find\\|grep\\)" command
))
261 (cl-letf (((symbol-function 'display-buffer
) #'ignore
))
262 (save-window-excursion ad-do-it
))
264 (ad-activate 'compilation-start
))
266 (setq search-default-mode
#'char-fold-to-regexp
)
268 ;; uncomment to extend this behaviour to query-replace
269 ;; (setq replace-char-fold t)
271 (setq-default cursor-type
'bar
)
273 (setq isearch-allow-scroll t
)
278 ("C-c e b" . eval-buffer
)
279 ("C-c e r" . eval-region
)
281 ("C-c e i" . emacs-init-time
)
282 ("C-c e u" . emacs-uptime
)
284 ("C-c F m" . make-frame-command
)
285 ("C-c F d" . delete-frame
)
286 ("C-c F D" . delete-other-frames
)
288 ("C-c o" . other-window
)
290 ("C-S-h C" . describe-char
)
291 ("C-S-h F" . describe-face
)
293 ("C-x k" . kill-this-buffer
)
294 ("C-x K" . kill-buffer
)
296 ("s-p" . beginning-of-buffer
)
297 ("s-n" . end-of-buffer
))
299 (when (display-graphic-p)
300 (unbind-key "C-z" global-map
))
303 :prefix-map a
/straight-prefix-map
305 ("u" . straight-use-package
)
306 ("f" . straight-freeze-versions
)
307 ("t" . straight-thaw-versions
)
308 ("P" . straight-prune-build
)
309 ("g" . straight-get-recipe
)
310 ("r" . a
/reload-init
)
311 ;; M-x ^straight-.*-all$
312 ("a c" . straight-check-all
)
313 ("a f" . straight-fetch-all
)
314 ("a m" . straight-merge-all
)
315 ("a n" . straight-normalize-all
)
316 ("a F" . straight-pull-all
)
317 ("a P" . straight-push-all
)
318 ("a r" . straight-rebuild-all
)
319 ;; M-x ^straight-.*-package$
320 ("p c" . straight-check-package
)
321 ("p f" . straight-fetch-package
)
322 ("p m" . straight-merge-package
)
323 ("p n" . straight-normalize-package
)
324 ("p F" . straight-pull-package
)
325 ("p P" . straight-push-package
)
326 ("p r" . straight-rebuild-package
))
328 (use-package auto-compile
331 (auto-compile-on-load-mode)
332 (auto-compile-on-save-mode)
333 (setq auto-compile-display-buffer nil
334 auto-compile-mode-line-counter t
335 auto-compile-source-recreate-deletes-dest t
336 auto-compile-toggle-deletes-nonlib-dest t
337 auto-compile-update-autoloads t
)
338 (add-hook 'auto-compile-inhibit-compile-hook
339 'auto-compile-inhibit-compile-detached-git-head
))
341 (straight-use-package 'org-plus-contrib
)
346 (setq org-src-tab-acts-natively t
347 org-src-preserve-indentation nil
348 org-edit-src-content-indentation
0
349 org-link-email-description-format
"Email %c: %s" ; %.30s
350 org-highlight-latex-and-related
'(entities)
351 org-use-speed-commands t
352 org-startup-folded
'content
353 org-catch-invisible-edits
'show-and-error
355 (add-to-list 'org-structure-template-alist
'("L" .
"src emacs-lisp") t
)
357 (("C-c a o a" . org-agenda
)
359 ("M-L" . org-insert-last-stored-link
)
361 :hook
((org-mode . org-indent-mode
)
362 (org-mode . auto-fill-mode
)
363 (org-mode . flyspell-mode
))
365 (org-agenda-files '("~/usr/org/todos/personal.org"
366 "~/usr/org/todos/masters.org"))
367 (org-agenda-start-on-weekday 0)
368 (org-latex-packages-alist '(("" "listings") ("" "color")))
370 '(org-block-begin-line ((t (:foreground
"#5a5b5a" :background
"#1d1f21"))))
371 '(org-block ((t (:background
"#1d1f21"))))
372 '(org-latex-and-related ((t (:foreground
"#b294bb")))))
374 (use-feature ox-latex
377 (setq org-latex-listings
'listings
378 ;; org-latex-prefer-user-labels t
380 (add-to-list 'org-latex-classes
381 '("IEEEtran" "\\documentclass[11pt]{IEEEtran}"
382 ("\\section{%s}" .
"\\section*{%s}")
383 ("\\subsection{%s}" .
"\\subsection*{%s}")
384 ("\\subsubsection{%s}" .
"\\subsubsection*{%s}")
385 ("\\paragraph{%s}" .
"\\paragraph*{%s}")
386 ("\\subparagraph{%s}" .
"\\subparagraph*{%s}"))
388 (require 'ox-beamer
))
390 (use-feature ox-extra
392 (ox-extras-activate '(latex-header-blocks ignore-headlines
)))
394 (with-eval-after-load 'org
395 (defvar a
/show-async-tangle-results nil
396 "Keep *emacs* async buffers around for later inspection.")
398 (defvar a
/show-async-tangle-time nil
399 "Show the time spent tangling the file.")
401 (defun a/async-babel-tangle
()
402 "Tangle org file asynchronously."
404 (let* ((file-tangle-start-time (current-time))
405 (file (buffer-file-name))
406 (file-nodir (file-name-nondirectory file
))
407 ;; (async-quiet-switch "-q")
408 (file-noext (file-name-sans-extension file
)))
412 (org-babel-tangle-file ,file
))
413 (unless a
/show-async-tangle-results
416 (message "Tangled %s%s"
418 (if a
/show-async-tangle-time
420 (float-time (time-subtract (current-time)
421 ',file-tangle-start-time
)))
423 (message "Tangling %s failed" ,file-nodir
))))))))
426 'safe-local-variable-values
427 '(eval add-hook
'after-save-hook
#'a
/async-babel-tangle
'append
'local
))
431 :bind
(("C-x g" . magit-status
)
432 ("s-g s" . magit-status
)
433 ("s-g l" . magit-log-buffer-file
))
435 (magit-add-section-hook 'magit-status-sections-hook
436 'magit-insert-modules
437 'magit-insert-stashes
439 (setq magit-repository-directories
'(("~/" .
0)
441 (nconc magit-section-initial-visibility-alist
442 '(([unpulled status
] . show
)
443 ([unpushed status
] . show
)))
444 :custom-face
(magit-diff-file-heading ((t (:weight normal
)))))
449 (add-to-list 'recentf-exclude
"^/\\(?:ssh\\|su\\|sudo\\)?:")
450 (setq recentf-max-saved-items
40))
457 (:map ivy-minibuffer-map
458 ([escape] . keyboard-escape-quit)
459 ([S-up] . ivy-previous-history-element)
460 ([S-down] . ivy-next-history-element)
461 ("DEL" . ivy-backward-delete-char))
465 ivy-use-virtual-buffers t
466 ivy-virtual-abbreviate 'abbreviate
467 ivy-count-format "%d/%d ")
470 ;; (ivy-minibuffer-match-face-2 ((t (:background "#e99ce8" :weight semi-bold))))
471 ;; (ivy-minibuffer-match-face-3 ((t (:background "#bbbbff" :weight semi-bold))))
472 ;; (ivy-minibuffer-match-face-4 ((t (:background "#ffbbff" :weight semi-bold))))
477 :bind (("C-s" . swiper-isearch)
479 ("C-S-s" . isearch-forward)))
483 :bind (([remap execute-extended-command] . counsel-M-x)
484 ([remap find-file] . counsel-find-file)
485 ("C-c x" . counsel-M-x)
486 ("C-c f ." . counsel-find-file)
487 ("C-c f l" . counsel-find-library)
488 :map minibuffer-local-map
489 ("C-r" . counsel-minibuffer-history))
492 (defalias 'locate #'counsel-locate))
497 :bind ("C-c a s e" . eshell)
499 (eval-when-compile (defvar eshell-prompt-regexp))
500 (defun a/eshell-quit-or-delete-char (arg)
502 (if (and (eolp) (looking-back eshell-prompt-regexp nil))
503 (eshell-life-is-too-much)
506 (defun a/eshell-clear ()
508 (let ((inhibit-read-only t))
512 (defun a/eshell-setup ()
513 (make-local-variable 'company-idle-delay)
514 (defvar company-idle-delay)
515 (setq company-idle-delay nil)
516 (bind-keys :map eshell-mode-map
517 ("C-d" . a/eshell-quit-or-delete-char)
518 ("C-S-l" . a/eshell-clear)
519 ("M-r" . counsel-esh-history)
520 ([tab] . company-complete)))
522 :hook (eshell-mode . a/eshell-setup)
524 (eshell-hist-ignoredups t)
525 (eshell-input-filter 'eshell-input-filter-initial-space))
529 (("C-x C-b" . ibuffer-other-window)
530 :map ibuffer-mode-map
531 ("P" . ibuffer-backward-filter-group)
532 ("N" . ibuffer-forward-filter-group)
533 ("M-p" . ibuffer-do-print)
534 ("M-n" . ibuffer-do-shell-command-pipe-replace))
536 ;; Use human readable Size column instead of original one
537 (define-ibuffer-column size-h
538 (:name "Size" :inline t)
540 ((> (buffer-size) 1000000) (format "%7.1fM" (/ (buffer-size) 1000000.0)))
541 ((> (buffer-size) 100000) (format "%7.0fk" (/ (buffer-size) 1000.0)))
542 ((> (buffer-size) 1000) (format "%7.1fk" (/ (buffer-size) 1000.0)))
543 (t (format "%8d" (buffer-size)))))
545 (ibuffer-saved-filter-groups
547 ("dired" (mode . dired-mode))
548 ("org" (mode . org-mode))
551 (mode . gnus-group-mode)
552 (mode . gnus-summary-mode)
553 (mode . gnus-article-mode)
554 ;; not really, but...
555 (mode . message-mode)))
573 (mode . emacs-lisp-mode)
575 (mode . haskell-mode)
577 (mode . alloy-mode)))
581 (mode . latex-mode)))
584 (name . "^\\*scratch\\*$")
585 (name . "^\\*Messages\\*$")))
586 ("erc" (mode . erc-mode)))))
588 '((mark modified read-only locked " "
589 (name 18 18 :left :elide)
593 (mode 16 16 :left :elide)
594 " " filename-and-process)
598 :hook (ibuffer . (lambda () (ibuffer-switch-to-saved-filter-groups "default"))))
601 :hook (prog-mode . outline-minor-mode)
604 outline-minor-mode-map
605 ("<s-tab>" . outline-toggle-children)
606 ("M-p" . outline-previous-visible-heading)
607 ("M-n" . outline-next-visible-heading)
608 :prefix-map a/outline-prefix-map
610 ("TAB" . outline-toggle-children)
611 ("a" . outline-hide-body)
612 ("H" . outline-hide-body)
613 ("S" . outline-show-all)
614 ("h" . outline-hide-subtree)
615 ("s" . outline-show-subtree)))
618 :custom (ls-lisp-dirs-first t))
622 (setq dired-listing-switches "-alh"
623 ls-lisp-use-insert-directory-program nil)
625 ;; easily diff 2 marked files
626 ;; https://oremacs.com/2017/03/18/dired-ediff/
627 (defun dired-ediff-files ()
630 (defvar ediff-after-quit-hook-internal)
631 (let ((files (dired-get-marked-files))
632 (wnd (current-window-configuration)))
633 (if (<= (length files) 2)
634 (let ((file1 (car files))
635 (file2 (if (cdr files)
639 (dired-dwim-target-directory)))))
640 (if (file-newer-than-file-p file1 file2)
641 (ediff-files file2 file1)
642 (ediff-files file1 file2))
643 (add-hook 'ediff-after-quit-hook-internal
645 (setq ediff-after-quit-hook-internal nil)
646 (set-window-configuration wnd))))
647 (error "no more than 2 files should be marked"))))
648 :bind (:map dired-mode-map
649 ("b" . dired-up-directory)
650 ("e" . dired-ediff-files)
651 ("E" . dired-toggle-read-only)
652 ("\\" . dired-hide-details-mode)
655 (a/dired-start-process "zathura"))))
656 :hook (dired-mode . dired-hide-details-mode))
660 (temp-buffer-resize-mode)
661 (setq help-window-select t))
665 (add-to-list 'tramp-default-proxies-alist '(nil "\\`root\\'" "/ssh:%h:"))
666 (add-to-list 'tramp-default-proxies-alist '("localhost" nil nil))
667 (add-to-list 'tramp-default-proxies-alist
668 (list (regexp-quote (system-name)) nil nil)))
671 :config (dash-enable-font-lock))
673 (use-package doc-view
674 :bind (:map doc-view-mode-map
675 ("M-RET" . image-previous-line)))
679 (setq diff-hl-draw-borders nil)
680 (global-diff-hl-mode)
681 :hook (magit-post-refresh . diff-hl-magit-post-refresh))
684 :when (version< "25" emacs-version)
685 :config (global-eldoc-mode))
689 :config (show-paren-mode))
692 :config (column-number-mode))
694 (use-feature savehist
695 :config (savehist-mode))
697 (use-feature saveplace
698 :when (version< "25" emacs-version)
699 :config (save-place-mode))
701 (use-feature prog-mode
702 :config (global-prettify-symbols-mode)
703 (defun indicate-buffer-boundaries-left ()
704 (setq indicate-buffer-boundaries 'left))
705 (add-hook 'prog-mode-hook #'indicate-buffer-boundaries-left))
707 (use-feature text-mode
708 :hook ((text-mode . indicate-buffer-boundaries-left)
709 (text-mode . abbrev-mode)))
714 (:map company-active-map
715 ([tab] . company-complete-common-or-cycle)
716 ([escape] . company-abort
))
718 (company-minimum-prefix-length 1)
719 (company-selection-wrap-around t
)
720 (company-dabbrev-char-regexp "\\sw\\|\\s_\\|[-_]")
721 (company-dabbrev-downcase nil
)
722 (company-dabbrev-ignore-case nil
)
724 (global-company-mode t
))
726 (use-package flycheck
728 :hook
(prog-mode . flycheck-mode
)
730 (:map flycheck-mode-map
731 ("M-P" . flycheck-previous-error
)
732 ("M-N" . flycheck-next-error
))
734 ;; Use the load-path from running Emacs when checking elisp files
735 (setq flycheck-emacs-lisp-load-path
'inherit
)
737 ;; Only flycheck when I actually save the buffer
738 (setq flycheck-check-syntax-automatically
'(mode-enabled save
)))
740 ;; http://endlessparentheses.com/ispell-and-apostrophes.html
744 ;; ’ can be part of a word
745 (setq ispell-local-dictionary-alist
746 `((nil "[[:alpha:]]" "[^[:alpha:]]"
747 "['\x2019]" nil
("-B") nil utf-8
)))
748 ;; don't send ’ to the subprocess
749 (defun endless/replace-apostrophe
(args)
750 (cons (replace-regexp-in-string
751 "’" "'" (car args
))
753 (advice-add #'ispell-send-string
:filter-args
754 #'endless
/replace-apostrophe
)
756 ;; convert ' back to ’ from the subprocess
757 (defun endless/replace-quote
(args)
758 (if (not (derived-mode-p 'org-mode
))
760 (cons (replace-regexp-in-string
761 "'" "’" (car args
))
763 (advice-add #'ispell-parse-output
:filter-args
764 #'endless
/replace-quote
))
766 (use-feature lisp-mode
768 (add-hook 'emacs-lisp-mode-hook
'outline-minor-mode
)
769 (add-hook 'emacs-lisp-mode-hook
'reveal-mode
)
770 (defun indent-spaces-mode ()
771 (setq indent-tabs-mode nil
))
772 (add-hook 'lisp-interaction-mode-hook
#'indent-spaces-mode
))
774 (use-package alloy-mode
775 :straight
(:host github
:repo
"dwwmmn/alloy-mode")
777 :config
(setq alloy-basic-offset
2))
779 (use-package proof-site
; Proof General
780 :straight proof-general
)
782 (eval-when-compile (defvar lean-mode-map
))
783 (use-package lean-mode
785 :bind
(:map lean-mode-map
786 ("S-SPC" . company-complete
))
788 (require 'lean-input
)
789 (setq default-input-method
"Lean"
790 lean-input-tweak-all
'(lean-input-compose
791 (lean-input-prepend "/")
792 (lean-input-nonempty))
793 lean-input-user-translations
'(("/" "/")))
796 (use-package haskell-mode
798 (setq haskell-indentation-layout-offset
4
799 haskell-indentation-left-offset
4
800 flycheck-checker
'haskell-hlint
801 flycheck-disabled-checkers
'(haskell-stack-ghc haskell-ghc
)))
806 :hook
(haskell-mode . dante-mode
))
808 (use-package hlint-refactor
810 :bind
(:map hlint-refactor-mode-map
811 ("C-c l b" . hlint-refactor-refactor-buffer
)
812 ("C-c l r" . hlint-refactor-refactor-at-point
))
813 :hook
(haskell-mode . hlint-refactor-mode
))
815 (use-package flycheck-haskell
818 (use-package sgml-mode
820 (setq sgml-basic-offset
2))
822 (use-package css-mode
824 (setq css-indent-offset
2))
826 (use-package web-mode
830 web-mode-code-indent-offset
831 web-mode-css-indent-offset
832 web-mode-markup-indent-offset
))
834 (use-package emmet-mode
835 :after
(:any web-mode css-mode sgml-mode
)
836 :bind
* (("C-)" . emmet-next-edit-point
)
837 ("C-(" . emmet-prev-edit-point
))
839 (unbind-key "C-j" emmet-mode-keymap
)
840 (setq emmet-move-cursor-between-quotes t
)
841 :hook
(web-mode css-mode html-mode sgml-mode
))
845 (use-feature geiser-guile
847 (setq geiser-guile-load-path
"~/src/git/guix"))
852 :config
(setq Man-width
80))
854 (use-package which-key
857 (which-key-add-key-based-replacements
858 ;; prefixes for global prefixes and minor modes
862 "C-c 8 -" "typo/dashes"
863 "C-c 8 <" "typo/left-brackets"
864 "C-c 8 >" "typo/right-brackets"
866 "C-x a" "abbrev/expand"
867 "C-x r" "rectangle/register/bookmark"
868 "C-x v" "version control"
869 ;; prefixes for my personal bindings
870 "C-c a" "applications"
874 "C-c p" "package-management"
875 ;; "C-c p e" "package-management/epkg"
876 "C-c p s" "straight.el"
879 "C-c c" "compile-and-comments"
884 "C-c m" "multiple-cursors"
886 "C-c P s" "projectile/search"
887 "C-c P x" "projectile/execute"
888 "C-c P 4" "projectile/other-window"
894 ;; prefixes for major modes
895 (which-key-add-major-mode-key-based-replacements 'message-mode
897 (which-key-add-major-mode-key-based-replacements 'org-mode
898 "C-c C-v" "org-babel")
899 (which-key-add-major-mode-key-based-replacements 'web-mode
900 "C-c C-a" "web/attributes"
901 "C-c C-b" "web/blocks"
903 "C-c C-e" "web/element"
904 "C-c C-t" "web/tags")
908 (which-key-add-column-padding 5)
909 (which-key-max-description-length 32))
911 (add-to-list 'custom-theme-load-path
"~/.emacs.d/lisp")
912 (load-theme 'tangomod t
)
914 (use-package smart-mode-line
915 :commands
(sml/apply-theme
)
920 (use-package doom-themes
)
922 (defvar a
/org-mode-font-lock-keywords
923 '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)"
924 (1 '(:foreground
"#5a5b5a" :background
"#292b2b") t
) ; directive
925 (3 '(:foreground
"#81a2be" :background
"#292b2b") t
) ; kind
926 (4 '(:foreground
"#c5c8c6") t
)))) ; title
928 (defun a/lights-on
()
929 "Enable my favourite light theme."
931 (mapc #'disable-theme custom-enabled-themes
)
932 (load-theme 'tangomod t
)
933 (sml/apply-theme
'automatic
)
934 (font-lock-remove-keywords
935 'org-mode a
/org-mode-font-lock-keywords
))
937 (defun a/lights-off
()
940 (mapc #'disable-theme custom-enabled-themes
)
941 (load-theme 'doom-tomorrow-night t
)
942 (sml/apply-theme
'automatic
)
943 (font-lock-add-keywords
944 'org-mode a
/org-mode-font-lock-keywords t
))
947 ("s-t d" . a
/lights-off
)
948 ("s-t l" . a
/lights-on
))
950 (use-package crux
; results in Waiting for git... [2 times]
952 :bind
(("C-c b k" . crux-kill-other-buffers
)
953 ("C-c d" . crux-duplicate-current-line-or-region
)
954 ("C-c D" . crux-duplicate-and-comment-current-line-or-region
)
955 ("C-c f c" . crux-copy-file-preserve-attributes
)
956 ("C-c f d" . crux-delete-file-and-buffer
)
957 ("C-c f r" . crux-rename-file-and-buffer
)
958 ("C-c j" . crux-top-join-line
)
959 ("C-S-j" . crux-top-join-line
)))
962 :bind
(("C-a" . mwim-beginning-of-code-or-line
)
963 ("C-e" . mwim-end-of-code-or-line
)
964 ("<home>" . mwim-beginning-of-line-or-code
)
965 ("<end>" . mwim-end-of-line-or-code
)))
967 (use-package projectile
968 :bind-keymap
("C-c P" . projectile-command-map
)
972 (defun my-projectile-invalidate-cache (&rest _args
)
973 ;; ignore the args to `magit-checkout'
974 (projectile-invalidate-cache nil
))
976 (eval-after-load 'magit-branch
978 (advice-add 'magit-checkout
979 :after
#'my-projectile-invalidate-cache
)
980 (advice-add 'magit-branch-and-checkout
981 :after
#'my-projectile-invalidate-cache
)))
982 :custom
(projectile-completion-system 'ivy
))
987 (("C-S-h c" . helpful-command
)
988 ("C-S-h f" . helpful-callable
) ; helpful-function
989 ("C-S-h v" . helpful-variable
)
990 ("C-S-h k" . helpful-key
)
991 ("C-S-h p" . helpful-at-point
)))
993 (use-package unkillable-scratch
996 (unkillable-scratch 1)
998 (unkillable-buffers '("^\\*scratch\\*$" "^\\*Messages\\*$")))
1000 (use-package boxquote
1003 (:prefix-map a
/boxquote-prefix-map
1005 ("b" . boxquote-buffer
)
1006 ("B" . boxquote-insert-buffer
)
1007 ("d" . boxquote-defun
)
1008 ("F" . boxquote-insert-file
)
1009 ("hf" . boxquote-describe-function
)
1010 ("hk" . boxquote-describe-key
)
1011 ("hv" . boxquote-describe-variable
)
1012 ("hw" . boxquote-where-is
)
1013 ("k" . boxquote-kill
)
1014 ("p" . boxquote-paragraph
)
1015 ("q" . boxquote-boxquote
)
1016 ("r" . boxquote-region
)
1017 ("s" . boxquote-shell-command
)
1018 ("t" . boxquote-text
)
1019 ("T" . boxquote-title
)
1020 ("u" . boxquote-unbox
)
1021 ("U" . boxquote-unbox-region
)
1022 ("y" . boxquote-yank
)
1023 ("M-q" . boxquote-fill-paragraph
)
1024 ("M-w" . boxquote-kill-ring-save
)))
1026 (use-package orgalist
1029 :hook
(message-mode . orgalist-mode
))
1034 (typo-global-mode 1)
1035 :hook
(text-mode . typo-mode
))
1037 (use-package hl-todo
1040 (global-hl-todo-mode))
1042 (use-package shrink-path
1046 (defvar user-
@-host
(concat (user-login-name) "@" (system-name) " "))
1047 (defun +eshell
/prompt
()
1048 (let ((base/dir
(shrink-path-prompt default-directory
)))
1049 (concat (propertize user-
@-host
'face
'default
)
1050 (propertize (car base
/dir
)
1051 'face
'font-lock-comment-face
)
1052 (propertize (cdr base
/dir
)
1053 'face
'font-lock-constant-face
)
1054 (propertize "> " 'face
'default
))))
1055 (setq eshell-prompt-regexp
(concat user-
@-host
".*> ")
1056 eshell-prompt-function
#'+eshell
/prompt
))
1058 (use-package eshell-up
1060 :commands eshell-up
)
1062 (use-package multi-term
1064 :bind
(("C-c a s m" . multi-term-dedicated-toggle
)
1066 ("C-c C-j" . term-char-mode
)
1068 ("C-c C-j" . term-line-mode
))
1070 (setq multi-term-program
"/bin/screen"
1071 ;; TODO: add separate bindings for connecting to existing
1072 ;; session vs. always creating a new one
1073 multi-term-dedicated-select-after-open-p t
1074 multi-term-dedicated-window-height
20
1075 multi-term-dedicated-max-window-height
30
1077 '(("C-c C-c" . term-interrupt-subjob
)
1078 ("C-c C-e" . term-send-esc
)
1080 ("C-y" . term-paste
)
1081 ("M-f" . term-send-forward-word
)
1082 ("M-b" . term-send-backward-word
)
1083 ("M-p" . term-send-up
)
1084 ("M-n" . term-send-down
)
1085 ("<C-backspace>" . term-send-backward-kill-word
)
1086 ("<M-DEL>" . term-send-backward-kill-word
)
1087 ("M-d" . term-send-delete-word
)
1088 ("M-," . term-send-raw
)
1089 ("M-." . comint-dynamic-complete
))
1090 term-unbind-key-alist
1091 '("C-z" "C-x" "C-c" "C-h" "C-y" "<ESC>")))
1093 (use-package page-break-lines
1095 (global-page-break-lines-mode))
1097 (use-package expand-region
1098 :bind
("C-=" . er
/expand-region
))
1100 (use-package multiple-cursors
1102 (("C-S-<mouse-1>" . mc
/add-cursor-on-click
)
1103 (:prefix-map a
/mc-prefix-map
1105 ("c" . mc
/edit-lines
)
1106 ("n" . mc
/mark-next-like-this
)
1107 ("p" . mc
/mark-previous-like-this
)
1108 ("a" . mc
/mark-all-like-this
))))
1114 (use-package yasnippet
1117 (defconst yas-verbosity-cur yas-verbosity
)
1118 (setq yas-verbosity
2)
1119 (add-to-list 'yas-snippet-dirs
"~/src/git/guix/etc/snippets")
1121 (setq yas-verbosity yas-verbosity-cur
)
1123 (text-mode . yas-minor-mode
))
1125 (use-package debbugs
1128 :repo
"emacs-straight/debbugs"
1129 :files
(:defaults
"Debbugs.wsdl")))
1131 (use-package org-ref
1133 (a/setq-every
'("~/usr/org/references.bib")
1134 reftex-default-bibliography
1135 org-ref-default-bibliography
)
1137 org-ref-bibliography-notes
"~/usr/org/notes.org"
1138 org-ref-pdf-directory
"~/usr/org/bibtex-pdfs/"))
1141 :commands
(slack-start)
1143 (eval-when-compile ; silence the byte-compiler
1144 (defvar url-http-data nil
)
1145 (defvar url-http-extra-headers nil
)
1146 (defvar url-http-method nil
)
1147 (defvar url-callback-function nil
)
1148 (defvar url-callback-arguments nil
)
1149 (defvar oauth--token-data nil
))
1150 (setq slack-buffer-emojify t
1151 slack-prefer-current-team t
)
1153 (slack-register-team
1154 :name
"nday-students"
1156 :token nday-students-token
1157 :subscribed-channels
'(general)
1158 :full-and-display-names t
)
1159 (add-to-list 'swiper-font-lock-exclude
'slack-message-buffer-mode t
)
1160 (setq lui-time-stamp-format
"[%Y-%m-%d %H:%M:%S]"
1161 lui-time-stamp-only-when-changed-p t
1162 lui-time-stamp-position
'right
)
1164 (("C-c s s" . slack-start
)
1165 ("C-c s u" . slack-select-unread-rooms
)
1166 ("C-c s b" . slack-select-rooms
)
1167 ("C-c s t" . slack-change-current-team
)
1168 ("C-c s c" . slack-ws-close
)
1170 ("M-p" . slack-buffer-goto-prev-message
)
1171 ("M-n" . slack-buffer-goto-next-message
)
1172 ("C-c e" . slack-message-edit
)
1173 ("C-c k" . slack-message-delete
)
1174 ("C-c C-k" . slack-channel-leave
)
1175 ("C-c r a" . slack-message-add-reaction
)
1176 ("C-c r r" . slack-message-remove-reaction
)
1177 ("C-c r s" . slack-message-show-reaction-users
)
1178 ("C-c p l" . slack-room-pins-list
)
1179 ("C-c p a" . slack-message-pins-add
)
1180 ("C-c p r" . slack-message-pins-remove
)
1181 ("@" . slack-message-embed-mention
)
1182 ("#" . slack-message-embed-channel
)))
1187 (setq alert-default-style
'notifier
))
1189 (defvar a
/maildir
(expand-file-name "~/mail/"))
1190 (with-eval-after-load 'recentf
1191 (add-to-list 'recentf-exclude a
/maildir
))
1194 a
/gnus-init-file
(no-littering-expand-etc-file-name "gnus")
1195 mail-user-agent
'gnus-user-agent
1196 read-mail-command
'gnus
)
1199 :bind
(("s-m" . gnus
)
1200 ("s-M" . gnus-unplugged
))
1203 gnus-select-method
'(nnnil "")
1204 gnus-secondary-select-methods
1206 (nnimap-stream plain
)
1207 (nnimap-address "127.0.0.1")
1208 (nnimap-server-port 143)
1209 (nnimap-authenticator plain
)
1210 (nnimap-user "amin@bndl.org"))
1212 (nnimap-stream plain
)
1213 (nnimap-address "127.0.0.1")
1214 (nnimap-server-port 143)
1215 (nnimap-authenticator plain
)
1216 (nnimap-user "abandali@uwaterloo.ca"))
1218 (nnimap-stream plain
)
1219 (nnimap-address "127.0.0.1")
1220 (nnimap-server-port 143)
1221 (nnimap-authenticator plain
)
1222 (nnimap-user "abandali@csclub.uw")))
1223 gnus-message-archive-group
"nnimap+amin:Sent"
1226 (to-address .
"deepspec@lists.cs.princeton.edu")
1227 (to-list .
"deepspec@lists.cs.princeton.edu"))
1228 ("gnu\\.emacs-devel"
1229 (to-address .
"emacs-devel@gnu.org")
1230 (to-list .
"emacs-devel@gnu.org"))
1231 ("gnu\\.emacs-orgmode"
1232 (to-address .
"emacs-orgmode@gnu.org")
1233 (to-list .
"emacs-orgmode@gnu.org"))
1234 ("gnu\\.emacsconf-discuss"
1235 (to-address .
"emacsconf-discuss@gnu.org")
1236 (to-list .
"emacsconf-discuss@gnu.org"))
1237 ("gnu\\.fencepost-users"
1238 (to-address .
"fencepost-users@gnu.org")
1239 (to-list .
"fencepost-users@gnu.org"))
1240 ("gnu\\.gnunet-developers"
1241 (to-address .
"gnunet-developers@gnu.org")
1242 (to-list .
"gnunet-developers@gnu.org"))
1243 ("gnu\\.guile-devel"
1244 (to-address .
"guile-devel@gnu.org")
1245 (to-list .
"guile-devel@gnu.org"))
1247 (to-address .
"guix-devel@gnu.org")
1248 (to-list .
"guix-devel@gnu.org"))
1249 ("gnu\\.haskell-art"
1250 (to-address .
"haskell-art@we.lurk.org")
1251 (to-list .
"haskell-art@we.lurk.org"))
1252 ("gnu\\.haskell-cafe"
1253 (to-address .
"haskell-cafe@haskell.org")
1254 (to-list .
"haskell-cafe@haskell.org"))
1255 ("gnu\\.help-gnu-emacs"
1256 (to-address .
"help-gnu-emacs@gnu.org")
1257 (to-list .
"help-gnu-emacs@gnu.org"))
1258 ("gnu\\.info-gnu-emacs"
1259 (to-address .
"info-gnu-emacs@gnu.org")
1260 (to-list .
"info-gnu-emacs@gnu.org"))
1262 (to-address .
"info-guix@gnu.org")
1263 (to-list .
"info-guix@gnu.org"))
1265 (to-address .
"notmuch@notmuchmail.org")
1266 (to-list .
"notmuch@notmuchmail.org"))
1267 ("gnu\\.parabola-dev"
1268 (to-address .
"dev@lists.parabola.nu")
1269 (to-list .
"dev@lists.parabola.nu"))
1271 (to-address .
"webmasters@gnu.org")
1272 (to-list .
"webmasters@gnu.org"))
1273 ("gnu\\.www-commits"
1274 (to-address .
"www-commits@gnu.org")
1275 (to-list .
"www-commits@gnu.org"))
1276 ("gnu\\.www-discuss"
1277 (to-address .
"www-discuss@gnu.org")
1278 (to-list .
"www-discuss@gnu.org"))
1279 ("gnu\\.~bandali\\.public-inbox"
1280 (to-address .
"~bandali/public-inbox@lists.sr.ht")
1281 (to-list .
"~bandali/public-inbox@lists.sr.ht"))
1282 ("gnu\\.~sircmpwn\\.srht-admins"
1283 (to-address .
"~sircmpwn/sr.ht-admins@lists.sr.ht")
1284 (to-list .
"~sircmpwn/sr.ht-admins@lists.sr.ht"))
1285 ("gnu\\.~sircmpwn\\.srht-announce"
1286 (to-address .
"~sircmpwn/sr.ht-announce@lists.sr.ht")
1287 (to-list .
"~sircmpwn/sr.ht-announce@lists.sr.ht"))
1288 ("gnu\\.~sircmpwn\\.srht-dev"
1289 (to-address .
"~sircmpwn/sr.ht-dev@lists.sr.ht")
1290 (to-list .
"~sircmpwn/sr.ht-dev@lists.sr.ht"))
1291 ("gnu\\.~sircmpwn\\.srht-discuss"
1292 (to-address .
"~sircmpwn/sr.ht-discuss@lists.sr.ht")
1293 (to-list .
"~sircmpwn/sr.ht-discuss@lists.sr.ht"))
1298 gnus-large-newsgroup
50
1299 gnus-home-directory
(no-littering-expand-var-file-name "gnus/")
1300 gnus-directory
(concat gnus-home-directory
"news/")
1301 message-directory
(concat gnus-home-directory
"mail/")
1302 nndraft-directory
(concat gnus-home-directory
"drafts/")
1303 gnus-save-newsrc-file nil
1304 gnus-read-newsrc-file nil
1305 gnus-interactive-exit nil
1306 gnus-gcc-mark-as-read t
)
1310 (require 'ebdb-gnus
)
1312 (with-eval-after-load 'recentf
1313 (add-to-list 'recentf-exclude gnus-home-directory
)))
1315 (use-feature gnus-art
1318 gnus-visible-headers
1319 (concat gnus-visible-headers
"\\|^List-Id:\\|^X-RT-Originator:\\|^User-Agent:")
1320 gnus-sorted-header-list
1321 '("^From:" "^Subject:" "^Summary:" "^Keywords:"
1322 "^Followup-To:" "^To:" "^Cc:" "X-RT-Originator"
1323 "^Newsgroups:" "List-Id:" "^Organization:"
1324 "^User-Agent:" "^Date:")
1325 ;; local-lapsed article dates
1326 ;; from https://www.emacswiki.org/emacs/GnusFormatting#toc11
1327 gnus-article-date-headers
'(user-defined)
1328 gnus-article-time-format
1330 (let* ((date (format-time-string "%a, %d %b %Y %T %z" time
))
1331 (local (article-make-date-line date
'local
))
1332 (combined-lapsed (article-make-date-line date
1335 (string-match " (.+" combined-lapsed
)
1336 (match-string 0 combined-lapsed
))))
1337 (concat local lapsed
))))
1339 :map gnus-article-mode-map
1340 ("M-L" . org-store-link
)))
1342 (use-feature gnus-sum
1343 :bind
(:map gnus-summary-mode-map
1344 :prefix-map a
/gnus-summary-prefix-map
1346 ("r" . gnus-summary-reply
)
1347 ("w" . gnus-summary-wide-reply
)
1348 ("v" . gnus-summary-show-raw-article
))
1351 :map gnus-summary-mode-map
1352 ("M-L" . org-store-link
))
1353 :hook
(gnus-summary-mode . a
/no-mouse-autoselect-window
))
1355 (use-feature gnus-msg
1357 (setq gnus-posting-styles
1359 (address "amin@bndl.org")
1361 (eval (setq a
/message-cite-say-hi t
)))
1363 (address "bandali@gnu.org")
1364 (eval (set (make-local-variable 'message-user-fqdn
) "fencepost.gnu.org")))
1365 ((header "subject" "ThankCRM")
1366 (to "webmasters-comment@gnu.org")
1367 (body "Added to 2019supporters.html.\n\nMoving to campaigns.\n\n-amin\n")
1368 (eval (setq a
/message-cite-say-hi nil
)))
1369 ("nnimap\\+uwaterloo:.*"
1370 (address "abandali@uwaterloo.ca")
1371 (gcc "\"nnimap+uwaterloo:Sent Items\""))
1372 ("nnimap\\+csclub:.*"
1373 (address "abandali@csclub.uwaterloo.ca")
1374 (gcc "nnimap+csclub:Sent")))))
1376 (use-feature gnus-topic
1377 :hook
(gnus-group-mode . gnus-topic-mode
)
1378 :config
(setq gnus-topic-line-format
"%i[ %A: %(%{%n%}%) ]%v\n"))
1380 (use-feature gnus-agent
1382 (setq gnus-agent-synchronize-flags
'ask
)
1383 :hook
(gnus-group-mode . gnus-agent-mode
))
1385 (use-feature gnus-group
1387 (setq gnus-permanently-visible-groups
"\\(:INBOX$\\|:gnu$\\)"))
1389 (use-feature mm-decode
1391 (setq mm-discouraged-alternatives
'("text/html" "text/richtext")))
1393 (use-feature sendmail
1395 (setq sendmail-program
"/usr/bin/msmtp"
1396 ;; message-sendmail-extra-arguments '("-v" "-d")
1397 mail-specify-envelope-from t
1398 mail-envelope-from
'header
))
1400 (use-feature message
1402 ;; redefine for a simplified In-Reply-To header
1403 ;; (see https://todo.sr.ht/~sircmpwn/lists.sr.ht/67)
1404 (defun message-make-in-reply-to ()
1405 "Return the In-Reply-To header for this message."
1406 (when message-reply-headers
1407 (let ((from (mail-header-from message-reply-headers
))
1408 (msg-id (mail-header-id message-reply-headers
)))
1412 (defconst a
/message-cite-style-format
"On %Y-%m-%d %l:%M %p, %N wrote:")
1413 (defconst message-cite-style-bandali
1414 '((message-cite-function 'message-cite-original
)
1415 (message-citation-line-function 'message-insert-formatted-citation-line
)
1416 (message-cite-reply-position 'traditional
)
1417 (message-yank-prefix "> ")
1418 (message-yank-cited-prefix ">")
1419 (message-yank-empty-prefix ">")
1420 (message-citation-line-format
1421 (if a
/message-cite-say-hi
1422 (concat "Hi %F,\n\n" a
/message-cite-style-format
)
1423 a
/message-cite-style-format
)))
1424 "Citation style based on Mozilla Thunderbird's. Use with message-cite-style.")
1425 (setq ;; message-cite-style 'message-cite-style-bandali
1426 message-kill-buffer-on-exit t
1427 message-send-mail-function
'message-send-mail-with-sendmail
1428 message-sendmail-envelope-from
'header
1429 message-subscribed-address-functions
1430 '(gnus-find-subscribed-addresses)
1431 message-dont-reply-to-names
1432 "\\(\\(amin@bndl\\.org\\)\\|\\(.*@\\(aminb\\|amin\\.bndl\\)\\.org\\)\\|\\(\\(bandali\\|aminb?\\|mab\\)@gnu\\.org\\)\\|\\(a\\(min\\.\\)?bandali@uwaterloo\\.ca\\)\\|\\(abandali@csclub\\.uwaterloo\\.ca\\)\\)")
1433 (require 'company-ebdb
)
1434 :hook
(;; (message-setup . mml-secure-message-sign-pgpmime)
1435 (message-mode . flyspell-mode
)
1436 (message-mode .
(lambda ()
1437 ;; (setq fill-column 65
1438 ;; message-fill-column 65)
1439 (make-local-variable 'company-idle-delay
)
1440 (setq company-idle-delay
0.2))))
1442 ;; (message-header-subject ((t (:foreground "#111" :weight semi-bold))))
1443 ;; (message-header-to ((t (:foreground "#111" :weight normal))))
1444 ;; (message-header-cc ((t (:foreground "#333" :weight normal))))
1447 (with-eval-after-load 'mml-sec
1448 (setq mml-secure-openpgp-encrypt-to-self t
1449 mml-secure-openpgp-sign-with-sender t
))
1451 (use-feature footnote
1454 ;; (setq footnote-start-tag ""
1455 ;; footnote-end-tag ""
1456 ;; footnote-style 'unicode)
1458 (:map message-mode-map
1459 :prefix-map a
/footnote-prefix-map
1461 ("a" . footnote-add-footnote
)
1462 ("b" . footnote-back-to-message
)
1463 ("c" . footnote-cycle-style
)
1464 ("d" . footnote-delete-footnote
)
1465 ("g" . footnote-goto-footnote
)
1466 ("r" . footnote-renumber-footnotes
)
1467 ("s" . footnote-set-style
)))
1470 :straight
(:host github
:repo
"girzel/ebdb")
1472 :bind
(:map gnus-group-mode-map
("e" . ebdb
))
1474 (setq ebdb-sources
(no-littering-expand-var-file-name "ebdb"))
1475 (with-eval-after-load 'swiper
1476 (add-to-list 'swiper-font-lock-exclude
'ebdb-mode t
)))
1478 (use-feature ebdb-com
1481 ;; (use-package ebdb-complete
1484 ;; (ebdb-complete-enable))
1486 (use-package company-ebdb
1488 (defun company-ebdb--post-complete (_) nil
))
1490 (use-feature ebdb-gnus
1493 (ebdb-gnus-window-configuration
1496 (summary 0.25 point
)
1499 (ebdb-gnus 0.3))))))
1501 (use-feature ebdb-mua
1503 ;; :custom (ebdb-mua-pop-up nil)
1506 ;; (use-package ebdb-message
1510 ;; (use-package ebdb-vcard
1513 (use-package message-x
)
1516 :straight
(:host nil
:repo
"https://git.bndl.org/amin/znc.el")
1517 :bind
(("C-c a e e" . znc-erc
)
1518 ("C-c a e a" . znc-all
))
1520 (let ((pwd (let ((auth (auth-source-search :host
"znca")))
1522 ((null auth
) (error "Couldn't find znca's authinfo"))
1523 (t (funcall (plist-get (car auth
) :secret
)))))))
1525 `(("znc.bndl.org" 1337 t
1526 ((freenode "amin/freenode" ,pwd
)))
1527 ("znc.bndl.org" 1337 t
1528 ((moznet "amin/moznet" ,pwd
)))))))
1530 (message "Loading %s...done (%.3fs)" user-init-file
1531 (float-time (time-subtract (current-time)
1532 a
/before-user-init-time
)))
1534 ;;; init.el ends here