From: Amin Bandali Date: Sun, 4 Oct 2020 22:39:23 +0000 (-0400) Subject: Migrate from using Borg to ELPA X-Git-Url: https://git.shemshak.org/~bandali/configs/commitdiff_plain/8c4704d01f819581a7cdcad2ffebfba996ebd30e Migrate from using Borg to ELPA --- diff --git a/.gitmodules b/.gitmodules index 66e31e9..7714589 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,127 +1,21 @@ [submodule "alloy-mode"] - path = lib/alloy-mode + path = lisp/alloy-mode url = https://github.com/dwwmmn/alloy-mode.git [submodule "amx"] - path = lib/amx + path = lisp/amx url = https://github.com/DarwinAwardWinner/amx.git -[submodule "async"] - path = lib/async - url = https://github.com/jwiegley/emacs-async.git -[submodule "auto-compile"] - path = lib/auto-compile - url = https://github.com/emacscollective/auto-compile.git -[submodule "biblio.el"] - path = lib/biblio.el - url = https://github.com/cpitclaudel/biblio.el.git -[submodule "borg"] - path = lib/borg - url = https://github.com/emacscollective/borg.git [submodule "boxquote"] - path = lib/boxquote + path = lisp/boxquote url = https://github.com/davep/boxquote.el.git -[submodule "dash"] - path = lib/dash - url = https://github.com/magnars/dash.el.git - no-makeinfo = dash-template.texi - # dash creates a `dir' dash info file, which makes git think - # that the submodule is dirty. so, let's ignore the untracked - # files of dash's submodule - ignore = untracked -[submodule "debbugs"] - path = lib/debbugs - url = https://github.com/emacsmirror/debbugs.git - # debbugs creates a `instructions.info' info file, which makes git - # think that the submodule is dirty. so, let's ignore the - # untracked files of debbugs' submodule - ignore = untracked -[submodule "ebdb"] - path = lib/ebdb - url = https://github.com/girzel/ebdb.git -[submodule "erc-hl-nicks"] - path = lib/erc-hl-nicks - url = https://github.com/leathekd/erc-hl-nicks.git -[submodule "expand-region"] - path = lib/expand-region - url = https://github.com/magnars/expand-region.el.git [submodule "hl-todo"] - path = lib/hl-todo + path = lisp/hl-todo url = https://github.com/tarsius/hl-todo.git -[submodule "ivy"] - path = lib/ivy - url = https://github.com/abo-abo/swiper.git - info-path = doc -[submodule "libgit"] - path = lib/libgit - url = https://github.com/magit/libegit2.git - build-step = make -[submodule "magit"] - path = lib/magit - url = https://github.com/magit/magit.git - recursive-byte-compile = true - info-path = Documentation -[submodule "minions"] - path = lib/minions - url = https://github.com/tarsius/minions.git -[submodule "org"] - path = lib/org - url = https://code.orgmode.org/bzg/org-mode.git - build-step = make - load-path = lisp - load-path = contrib/lisp - info-path = doc -[submodule "org-tanglesync"] - path = lib/org-tanglesync - url = https://github.com/mtekman/org-tanglesync.el.git -[submodule "orgalist"] - path = lib/orgalist - url = https://github.com/emacsmirror/orgalist.git -[submodule "packed"] - path = lib/packed - url = https://github.com/emacscollective/packed.git [submodule "page-break-lines"] - path = lib/page-break-lines + path = lisp/page-break-lines url = https://github.com/purcell/page-break-lines.git -[submodule "refinery-theme"] - path = lib/refinery-theme - url = https://git.bndl.org/refinery-theme -[submodule "rich-minority"] - path = lib/rich-minority - url = https://github.com/Malabarba/rich-minority.git -[submodule "rt-liberation"] - path = lib/rt-liberation - url = https://git.savannah.gnu.org/git/rtliber.git - info-path = doc - # rt-liberation creates doc/{dir,rt-liberation.info} files, which - # make git think that the submodule is dirty. so, let's ignore - # the untracked files of rt-liberation's submodule - ignore = untracked [submodule "s"] - path = lib/s + path = lisp/s url = https://github.com/magnars/s.el.git [submodule "scpaste"] - path = lib/scpaste + path = lisp/scpaste url = https://git.sr.ht/~technomancy/scpaste -[submodule "smart-mode-line"] - path = lib/smart-mode-line - url = https://github.com/Malabarba/smart-mode-line.git -[submodule "switch-buffer-functions"] - path = lib/switch-buffer-functions - url = https://github.com/10sr/switch-buffer-functions-el.git -[submodule "transient"] - path = lib/transient - url = https://github.com/magit/transient.git -[submodule "unkillable-scratch"] - path = lib/unkillable-scratch - url = https://github.com/EricCrosson/unkillable-scratch.git -[submodule "which-key"] - path = lib/which-key - url = https://github.com/justbur/emacs-which-key.git -[submodule "with-editor"] - path = lib/with-editor - url = https://github.com/magit/with-editor.git -[submodule "yasnippet"] - path = lib/yasnippet - url = https://github.com/joaotavora/yasnippet.git -[submodule "znc"] - path = lib/znc - url = https://git.emacsconf.org/bandali/znc.el.git diff --git a/etc/abbrev.el b/etc/abbrev.el new file mode 100644 index 0000000..76f19d8 --- /dev/null +++ b/etc/abbrev.el @@ -0,0 +1,5 @@ +;;-*-coding: utf-8;-*- +(define-abbrev-table 'message-mode-abbrev-table + '( + ("linux" "GNU/Linux" nil :count 4) + )) diff --git a/etc/custom.el b/etc/custom.el index 39db4ec..ebb093b 100644 --- a/etc/custom.el +++ b/etc/custom.el @@ -3,120 +3,7 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(abbrev-file-name "/home/bandali/.emacs.d/var/abbrev.el") - '(auth-sources '("~/.authinfo.gpg")) - '(authinfo-hidden "\\(?:client-secret\\|password\\|token\\)") - '(auto-revert-verbose nil) - '(auto-save-file-name-transforms '((".*" "/home/bandali/.emacs.d/var/auto-save/" t))) - '(backup-by-copying t) - '(company-dabbrev-char-regexp "\\sw\\|\\s_\\|[-_]" t) - '(company-dabbrev-downcase nil t) - '(company-dabbrev-ignore-case nil t) - '(company-minimum-prefix-length 1) - '(company-selection-wrap-around t) - '(debpaste-paste-is-hidden t t) - '(delete-old-versions t) - '(display-battery-mode t) - '(display-time-mode t) - '(dmenu-prompt-string "run: " t) - '(dmenu-save-file "/home/bandali/.emacs.d/var/dmenu-items" t) - '(ebdb-gnus-window-configuration - '(article - (vertical 1.0 - (summary 0.25 point) - (horizontal 1.0 - (article 1.0) - (ebdb-gnus 0.3))))) - '(ebdb-gnus-window-size 0.3) - '(ebdb-mua-pop-up t) - '(ediff-split-window-function 'split-window-horizontally t) - '(ediff-window-setup-function 'ediff-setup-windows-plain t) - '(epa-pinentry-mode 'loopback) - '(epg-gpg-program "/home/bandali/.guix-profile/bin/gpg") - '(epg-pinentry-mode 'loopback) - '(erc-fill-column 77) - '(erc-fill-function 'erc-fill-static) - '(erc-fill-static-center 18) - '(erc-join-buffer 'bury) - '(erc-lurker-hide-list '("JOIN" "PART" "QUIT")) - '(erc-nick "bandali") - '(erc-pcomplete-nick-postfix ", ") - '(erc-prompt "erc>") - '(erc-rename-buffers t) - '(erc-server-reconnect-attempts 5) - '(erc-server-reconnect-timeout 3) - '(erc-track-enable-keybindings nil) - '(erc-track-exclude-types - '("JOIN" "MODE" "NICK" "PART" "QUIT" "324" "329" "332" "333" "353" "477")) - '(erc-track-position-in-mode-line t) - '(erc-track-priority-faces-only 'all) - '(erc-track-shorten-function nil) - '(eshell-directory-name "/home/bandali/.emacs.d/var/eshell/") - '(eshell-hist-ignoredups t) - '(eshell-input-filter 'eshell-input-filter-initial-space) '(fci-rule-color "#5B6268") - '(flycheck-mode-line-prefix "flyc") - '(global-auto-revert-non-file-buffers nil) - '(gnus-thread-sort-functions - '(gnus-thread-sort-by-number gnus-thread-sort-by-subject gnus-thread-sort-by-date)) - '(ibuffer-formats - '((mark modified read-only locked " " - (name 72 72 :left :elide) - " " - (size-h 9 -1 :right) - " " - (mode 16 16 :left :elide) - " " filename-and-process) - (mark " " - (name 16 -1) - " " filename)) t) - '(ibuffer-saved-filter-groups - '(("default" - ("dired" - (mode . dired-mode)) - ("org" - (mode . org-mode)) - ("gnus" - (or - (mode . gnus-group-mode) - (mode . gnus-summary-mode) - (mode . gnus-article-mode) - (mode . message-mode))) - ("web" - (or - (mode . web-mode) - (mode . css-mode) - (mode . scss-mode) - (mode . js2-mode))) - ("shell" - (or - (mode . eshell-mode) - (mode . shell-mode) - (mode . term-mode))) - ("programming" - (or - (mode . python-mode) - (mode . c-mode) - (mode . c++-mode) - (mode . java-mode) - (mode . emacs-lisp-mode) - (mode . scheme-mode) - (mode . haskell-mode) - (mode . lean-mode) - (mode . go-mode) - (mode . alloy-mode))) - ("tex" - (or - (mode . bibtex-mode) - (mode . latex-mode))) - ("emacs" - (or - (name . "^\\*scratch\\*$") - (name . "^\\*Messages\\*$"))) - ("exwm" - (mode . exwm-mode)) - ("erc" - (mode . erc-mode)))) t) '(inhibit-startup-buffer-menu t) '(inhibit-startup-echo-area-message "bandali") '(inhibit-startup-screen t) @@ -127,8 +14,8 @@ '(jdee-db-requested-breakpoint-face-colors (cons "#1B2229" "#98be65")) '(jdee-db-spec-breakpoint-face-colors (cons "#1B2229" "#3f444a")) '(ls-lisp-dirs-first t) - '(magit-diff-refine-hunk t t) - '(magit-display-buffer-function 'magit-display-buffer-fullframe-status-v1 t) + '(magit-diff-refine-hunk t) + '(magit-display-buffer-function 'magit-display-buffer-fullframe-status-v1) '(message-elide-ellipsis "[...] ") '(minions-mode t) @@ -153,6 +40,8 @@ '(org-habit-graph-column 44 t) '(org-latex-packages-alist '(("" "listings") ("" "color"))) '(org-pretty-entities t) + '(package-selected-packages + '(delight yasnippet ebdb rt-liberation refinery-theme counsel ivy org-plus-contrib orgalist debbugs)) '(page-break-lines-max-width 70) '(pdf-view-midnight-colors (cons "#bbc2cf" "#282c34")) '(pdf-view-resize-factor 1.05) @@ -181,7 +70,7 @@ (eval setq org-latex-prefer-user-labels t) (eval add-hook 'after-save-hook 'org-latex-export-to-latex t t))) '(save-interprogram-paste-before-kill t) - '(save-place-file "/home/bandali/.emacs.d/var/save-place.el" t) + '(save-place-file "/home/bandali/.emacs.d/var/save-place.el") '(savehist-file "/home/bandali/.emacs.d/var/savehist.el") '(search-default-mode 'char-fold-to-regexp) '(split-width-threshold 150) @@ -228,5 +117,8 @@ '(ivy-minibuffer-match-face-4 ((t (:background "misty rose" :weight semi-bold)))) '(ivy-virtual ((t (:inherit font-lock-builtin-face :foreground "dim gray")))) '(magit-diff-file-heading ((t (:weight normal)))) + '(org-block ((t (:background "#1d1f21")))) + '(org-block-begin-line ((t (:foreground "#5a5b5a" :background "#1d1f21")))) + '(org-latex-and-related ((t (:foreground "#b294bb")))) '(quote (org-block-begin-line ((t (:foreground "#5a5b5a" :background "#1d1f21"))))) '(widget-button ((t (:weight semi-bold))))) diff --git a/init.el b/init.el index 17732a7..870f265 100644 --- a/init.el +++ b/init.el @@ -75,7 +75,19 @@ '((:eval (format "[%s]" (number-to-string - exwm-workspace-current-index))))))))) + exwm-workspace-current-index)))))))) + + ;; make some mode-line spaces smaller + (csetq + mode-line-format + (mapcar + (lambda (x) + (if (and (stringp x) (or (string= x " ") (string= x " "))) + " " + x)) + mode-line-format) + mode-line-buffer-identification + (propertized-buffer-identification "%10b"))) (add-hook 'after-init-hook #'b/post-init) ;; increase number of lines kept in *Messages* log @@ -95,29 +107,34 @@ ;;; Package management -(progn ; `borg' - (add-to-list 'load-path - (expand-file-name "lib/borg" user-emacs-directory)) - (require 'borg) - (borg-initialize) - (setq borg-rewrite-urls-alist - '(("git@github.com:" . "https://github.com/") - ("git@gitlab.com:" . "https://gitlab.com/")))) - -(defmacro csetq (&rest args) - "Set the value of user option VAR to VALUE. - -More generally, you can use multiple variables and values, as in - (csetq VAR VALUE VAR VALUE...) -This sets each user option VAR's value to the corresponding VALUE. - -\(fn [VAR VALUE]...)" - (declare (debug setq)) - `(progn - ,@(cl-loop for (var value) on args by 'cddr - collect - `(funcall (or (get ',var 'custom-set) #'set-default) - ',var ,value)))) +;; (progn ; `borg' +;; (add-to-list 'load-path +;; (expand-file-name "lib/borg" user-emacs-directory)) +;; (require 'borg) +;; (borg-initialize) +;; (setq borg-rewrite-urls-alist +;; '(("git@github.com:" . "https://github.com/") +;; ("git@gitlab.com:" . "https://gitlab.com/")))) + +;; variables of interest: +;; package-archive-priorities +;; package-load-list +;; package-pinned-packages + +;; (let* ((b (find-file-noselect "refinery-theme.el")) +;; (d (with-current-buffer b (package-buffer-info)))) +;; (package-generate-description-file d "refinery-theme-pkg.el")) +(run-with-idle-timer 0.01 nil #'require 'package) +(with-eval-after-load 'package + (when (= (length package-archives) 1) + (csetq + package-archives + `(,@package-archives + ("org" . "https://orgmode.org/elpa/") + ("bndl" . "https://p.bndl.org/elpa/")))) + (package-initialize)) + +(csetq package-archive-upload-base "/ssh:caffeine:~/www/p/elpa") ;;; Initial setup @@ -131,33 +148,31 @@ This sets each user option VAR's value to the corresponding VALUE. (expand-file-name (convert-standard-filename "var/") user-emacs-directory) "The directory where packages place their persistent data files.") +(defvar b/lisp-dir + (expand-file-name + (convert-standard-filename "lisp/") user-emacs-directory) + "The directory where packages place their persistent data files.") (defun b/etc (file) "Expand filename FILE relative to `b/etc-dir'." (expand-file-name (convert-standard-filename file) b/etc-dir)) (defun b/var (file) "Expand filename FILE relative to `b/var-dir'." (expand-file-name (convert-standard-filename file) b/var-dir)) +(defun b/lisp (file) + "Expand filename FILE relative to `b/lisp-dir'." + (expand-file-name (convert-standard-filename file) b/lisp-dir)) (csetq auto-save-list-file-prefix (b/var "auto-save/sessions/") nsm-settings-file (b/var "nsm-settings.el")) -(require 'auto-compile) -(auto-compile-on-load-mode) -(auto-compile-on-save-mode) -(setq auto-compile-display-buffer nil) -(setq auto-compile-mode-line-counter t) -(setq auto-compile-source-recreate-deletes-dest t) -(setq auto-compile-toggle-deletes-nonlib-dest t) -(setq auto-compile-update-autoloads t) - ;; separate custom file (don't want it mixing with init.el) (with-eval-after-load 'custom (setq custom-file (b/etc "custom.el")) (when (file-exists-p custom-file) (load custom-file)) ;; while at it, treat themes as safe - (setf custom-safe-themes t) + ;; (setf custom-safe-themes t) ;; only one custom theme at a time (comment (defadvice load-theme (before clear-previous-themes activate) @@ -289,12 +304,11 @@ This sets each user option VAR's value to the corresponding VALUE. ;; lazy-person-friendly yes/no prompts (defalias 'yes-or-no-p #'y-or-n-p) -;; enable automatic reloading of changed buffers and files -(progn ; autorevert - (csetq auto-revert-verbose nil - global-auto-revert-non-file-buffers nil) - (require 'autorevert) - (global-auto-revert-mode 1)) +;; autorevert: enable automatic reloading of changed buffers and files +(csetq auto-revert-verbose nil + global-auto-revert-non-file-buffers nil) +(require 'autorevert) +(global-auto-revert-mode 1) ;; time and battery in mode-line (csetq @@ -307,7 +321,7 @@ This sets each user option VAR's value to the corresponding VALUE. (require 'time) (display-time-mode) -(csetq battery-mode-line-format "%p%% %t") +(csetq battery-mode-line-format " %p%% %t") (require 'battery) (display-battery-mode) @@ -451,6 +465,7 @@ This sets each user option VAR's value to the corresponding VALUE. (require 'bandali-theme) ;; magit, *the* right way to do git +(comment (csetq transient-history-file (b/var "transient/history.el") transient-levels-file (b/etc "transient/levels.el") transient-values-file (b/etc "transient/values.el")) @@ -492,26 +507,27 @@ This sets each user option VAR's value to the corresponding VALUE. (global-set-key (kbd "C-c g b") #'magit-blame-addition) (global-set-key (kbd "C-c g l") #'magit-log-buffer-file) (global-set-key (kbd "C-c g y") #'magit-pop-revision-stack) +) ;; recently opened files +(csetq recentf-max-saved-items 2000 + recentf-save-file (b/var "recentf-save.el")) (run-with-idle-timer 0.2 nil #'require 'recentf) (with-eval-after-load 'recentf - (csetq recentf-max-saved-items 2000 - recentf-save-file (b/var "recentf-save.el")) - (add-to-list 'recentf-keep #'file-remote-p) + ;; (add-to-list 'recentf-keep #'file-remote-p) (recentf-mode)) ;; needed for history for counsel (csetq amx-save-file (b/var "amx-save.el")) +(add-to-list 'load-path (b/lisp "s")) +(add-to-list 'load-path (b/lisp "amx")) (run-with-idle-timer 0.3 nil #'require 'amx) (with-eval-after-load 'amx (amx-mode)) -;; (require 'bandali-ido) (require 'bandali-ivy) (require 'bandali-eshell) -;; (require 'bandali-multi-term) (require 'bandali-ibuffer) @@ -549,8 +565,9 @@ This sets each user option VAR's value to the corresponding VALUE. (with-eval-after-load 'help (temp-buffer-resize-mode) - (csetq help-window-select t) + (csetq help-window-select t)) +(with-eval-after-load 'help-mode ;; local key bindings (define-key help-mode-map (kbd "p") #'backward-button) (define-key help-mode-map (kbd "n") #'forward-button)) @@ -578,12 +595,15 @@ This sets each user option VAR's value to the corresponding VALUE. (require 'bandali-message) (require 'bandali-ebdb) -;; IRC (with ERC and ZNC) +;; IRC (with ERC) (require 'bandali-erc) +(add-to-list 'load-path (b/lisp "scpaste")) (with-eval-after-load 'scpaste (csetq scpaste-http-destination "https://p.bndl.org" scpaste-scp-destination "p:~")) +(autoload 'scpaste "scpaste" nil t) +(autoload 'scpaste-region "scpaste" nil t) (global-set-key (kbd "C-c a p p") #'scpaste) (global-set-key (kbd "C-c a p r") #'scpaste-region) @@ -593,7 +613,8 @@ This sets each user option VAR's value to the corresponding VALUE. ;; display Lisp objects at point in the echo area (when (version< "25" emacs-version) (with-eval-after-load 'eldoc - (global-eldoc-mode))) + (csetq eldoc-minor-mode-string " eldoc") + (global-eldoc-mode))) ;; highlight matching parens (require 'paren) @@ -609,7 +630,7 @@ This sets each user option VAR's value to the corresponding VALUE. ;; yanking (pasting) what I'd originally intended to. save-interprogram-paste-before-kill t) (with-eval-after-load 'simple - (column-number-mode)) + (column-number-mode 1)) ;; save minibuffer history (require 'savehist) @@ -628,7 +649,7 @@ This sets each user option VAR's value to the corresponding VALUE. (global-prettify-symbols-mode)) (add-hook 'prog-mode-hook #'indicate-buffer-boundaries-left) -(define-key text-mode-map (kbd "C-*") #'b/insert-asterism) +(define-key text-mode-map (kbd "C-") #'b/insert-asterism) (add-hook 'text-mode-hook #'indicate-buffer-boundaries-left) (add-hook 'text-mode-hook #'flyspell-mode) @@ -636,6 +657,9 @@ This sets each user option VAR's value to the corresponding VALUE. (add-to-list 'auto-mode-alist '("\\.bashrc$" . sh-mode)) +(with-eval-after-load 'flyspell + (csetq flyspell-mode-line-string " fly")) + ;; flycheck ;; (run-with-idle-timer 0.6 nil #'require 'flycheck) ;; (with-eval-after-load 'flycheck @@ -676,7 +700,7 @@ This sets each user option VAR's value to the corresponding VALUE. ;; #'endless/replace-quote)) ;; abbrev -(csetq abbrev-file-name (b/var "abbrev.el")) +(csetq abbrev-file-name (b/etc "abbrev.el")) (add-hook 'text-mode-hook #'abbrev-mode) @@ -687,6 +711,9 @@ This sets each user option VAR's value to the corresponding VALUE. (setq indent-tabs-mode nil)) (add-hook 'lisp-interaction-mode-hook #'indent-spaces-mode)) +;; alloy +(add-to-list 'load-path (b/lisp "alloy-mode")) +(autoload 'alloy-mode "alloy-mode" nil t) (with-eval-after-load 'alloy-mode (csetq alloy-basic-offset 2) ;; (defun b/alloy-simple-indent (start end) @@ -744,57 +771,20 @@ This sets each user option VAR's value to the corresponding VALUE. (with-eval-after-load 'man (csetq Man-width 80)) -(run-with-idle-timer 0.4 nil #'require 'which-key) -(with-eval-after-load 'which-key - (csetq - which-key-add-column-padding 5 - which-key-idle-delay 10000 - which-key-idle-secondary-delay 0.05 - which-key-max-description-length 32 - which-key-show-early-on-C-h t) - (which-key-add-key-based-replacements - ;; prefixes for global prefixes and minor modes - "C-c !" "flycheck" - "C-x RET" "coding system" - "C-x 8" "unicode" - "C-x @" "event modifiers" - "C-x a" "abbrev/expand" - "C-x r" "rectangle/register/bookmark" - "C-x t" "tabs" - "C-x v" "version control" - "C-x X" "edebug" - "C-x C-a" "edebug" - "C-x C-k" "kmacro" - ;; prefixes for my personal bindings - "C-c &" "yasnippet" - "C-c a" "applications" - "C-c a e" "erc" - "C-c a o" "org" - "C-c a s" "shells" - "C-c b" "buffers" - "C-c c" "compile-and-comments" - "C-c e" "eval" - "C-c f" "files" - "C-c F" "frames" - "C-c g" "magit" - "C-S-h" "help(ful)" - "C-c q" "boxquote" - "C-c t" "themes") - ;; prefixes for major modes - (which-key-add-major-mode-key-based-replacements 'org-mode - "C-c C-v" "org-babel") - (which-key-mode)) - -;; (require 'bandali-projectile) - -(run-with-idle-timer 0.6 nil #'require 'unkillable-scratch) -(with-eval-after-load 'unkillable-scratch - (csetq unkillable-buffers '("^\\*scratch\\*$" "^\\*Messages\\*$")) - (unkillable-scratch 1)) +(defun b/*scratch* () + "Switch to `*scratch*' buffer, creating it if it does not exist." + (interactive) + (switch-to-buffer + (or (get-buffer "*scratch*") + (with-current-buffer (get-buffer-create "*scratch*") + (set-buffer-major-mode (current-buffer)) + (current-buffer))))) +(global-set-key (kbd "C-c s") #'b/*scratch*) ;; ,---- ;; | make pretty boxed quotes like this ;; `---- +(add-to-list 'load-path (b/lisp "boxquote")) (run-with-idle-timer 0.6 nil #'require 'boxquote) (with-eval-after-load 'boxquote (defvar b/boxquote-prefix-map) @@ -821,11 +811,13 @@ This sets each user option VAR's value to the corresponding VALUE. (define-key b/boxquote-prefix-map (kbd "M-q") #'boxquote-fill-paragraph) (define-key b/boxquote-prefix-map (kbd "M-w") #'boxquote-kill-ring-save)) +(add-to-list 'load-path (b/lisp "hl-todo")) (run-with-idle-timer 0.5 nil #'require 'hl-todo) (with-eval-after-load 'hl-todo ;; highlight TODOs in buffers (global-hl-todo-mode)) +(add-to-list 'load-path (b/lisp "page-break-lines")) (run-with-idle-timer 0.5 nil #'require 'page-break-lines) (with-eval-after-load 'page-break-lines (csetq page-break-lines-max-width fill-column) @@ -897,14 +889,12 @@ This sets each user option VAR's value to the corresponding VALUE. (getenv "XDG_DOWNLOAD_DIR"))) (global-set-key (kbd "C-c a e w") #'eww) -(comment - -;; org-ref -(csetq - reftex-default-bibliography '("~/usr/org/references.bib") - org-ref-default-bibliography '("~/usr/org/references.bib") - org-ref-bibliography-notes "~/usr/org/notes.org" - org-ref-pdf-directory "~/usr/org/bibtex-pdfs/") +;; ;; org-ref +;; (csetq +;; reftex-default-bibliography '("~/usr/org/references.bib") +;; org-ref-default-bibliography '("~/usr/org/references.bib") +;; org-ref-bibliography-notes "~/usr/org/notes.org" +;; org-ref-pdf-directory "~/usr/org/bibtex-pdfs/") ;; fill-column-indicator ? @@ -933,8 +923,8 @@ This sets each user option VAR's value to the corresponding VALUE. (global-set-key (kbd "C-c w L") #'windmove-swap-states-right) ;; pass -(global-set-key (kbd "C-c a p") #'pass) -(add-hook 'pass-mode-hook #'View-exit) +;; (global-set-key (kbd "C-c a p") #'pass) +;; (add-hook 'pass-mode-hook #'View-exit) ;; reftex ;; uncomment to disable reftex-cite's default choice of previous word @@ -950,16 +940,26 @@ This sets each user option VAR's value to the corresponding VALUE. (add-hook 'latex-mode-hook #'reftex-mode) ;; dmenu -(csetq - dmenu-prompt-string "run: " - dmenu-save-file (b/var "dmenu-items")) +;; (csetq +;; dmenu-prompt-string "run: " +;; dmenu-save-file (b/var "dmenu-items")) ;; eosd ? +;; delight +(run-with-idle-timer 0.5 nil #'require 'delight) +(with-eval-after-load 'delight + (delight 'auto-fill-function " f" "simple") + (delight 'abbrev-mode "" "abbrev") + (delight 'page-break-lines-mode "" "page-break-lines") + (delight 'ivy-mode "" "ivy") + (delight 'counsel-mode "" "counsel") + (delight 'mml-mode " mml" "mml") + (delight 'yas-minor-mode "" "yasnippet")) + ;;; Post initialization -) (message "Loading %s...done (%.3fs)" user-init-file (float-time (time-subtract (current-time) b/before-user-init-time))) diff --git a/lib/alloy-mode b/lib/alloy-mode deleted file mode 160000 index 0d05bdd..0000000 --- a/lib/alloy-mode +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d05bdd10c77ec04c3d61eccf67e68c08284951f diff --git a/lib/amx b/lib/amx deleted file mode 160000 index ccfc92c..0000000 --- a/lib/amx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ccfc92c600df681df5e8b5fecec328c462ceb71e diff --git a/lib/async b/lib/async deleted file mode 160000 index 36a1015..0000000 --- a/lib/async +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 36a10151e70e956e2f766ed9e65f4a9cfc8479b2 diff --git a/lib/auto-compile b/lib/auto-compile deleted file mode 160000 index 3e92c5b..0000000 --- a/lib/auto-compile +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3e92c5b1a94b0cf43f2d624180a1cb01df92afd8 diff --git a/lib/biblio.el b/lib/biblio.el deleted file mode 160000 index eb9baf1..0000000 --- a/lib/biblio.el +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eb9baf1d2bf6a073d24ccb717025baa693e98f3e diff --git a/lib/borg b/lib/borg deleted file mode 160000 index bc6d869..0000000 --- a/lib/borg +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bc6d869c5b26fc969eb103c4be2642c5b8524e35 diff --git a/lib/boxquote b/lib/boxquote deleted file mode 160000 index 7e47e0e..0000000 --- a/lib/boxquote +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7e47e0e2853bc1215739b2e28f260e9eed93b2c5 diff --git a/lib/dash b/lib/dash deleted file mode 160000 index b92ab5a..0000000 --- a/lib/dash +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b92ab5a39b987e4fe69317b9d9fda452300baf20 diff --git a/lib/debbugs b/lib/debbugs deleted file mode 160000 index b801e51..0000000 --- a/lib/debbugs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b801e51076f2ac80083f7ef4365db1389a9d2015 diff --git a/lib/ebdb b/lib/ebdb deleted file mode 160000 index 0b70386..0000000 --- a/lib/ebdb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0b7038694a4d844581461c261d96a7cd5679ac51 diff --git a/lib/erc-hl-nicks b/lib/erc-hl-nicks deleted file mode 160000 index a67fe36..0000000 --- a/lib/erc-hl-nicks +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a67fe361c8f2aa20fc235447fbb898f424b51439 diff --git a/lib/expand-region b/lib/expand-region deleted file mode 160000 index ea6b4cb..0000000 --- a/lib/expand-region +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ea6b4cbb9985ddae532bd2faf9bb00570c9f2781 diff --git a/lib/hl-todo b/lib/hl-todo deleted file mode 160000 index 0598b98..0000000 --- a/lib/hl-todo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0598b98f63b623c1778cbd2e2f60b774b7a311b9 diff --git a/lib/ivy b/lib/ivy deleted file mode 160000 index 9619e3c..0000000 --- a/lib/ivy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9619e3ccc4e9179780cf48b7abb24239037791d7 diff --git a/lib/libgit b/lib/libgit deleted file mode 160000 index 0ef8b13..0000000 --- a/lib/libgit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0ef8b13aef011a98b7da756e4f1ce3bb18e4d55a diff --git a/lib/magit b/lib/magit deleted file mode 160000 index 81a5f56..0000000 --- a/lib/magit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 81a5f5668a7886dcb30c57bac8caf5cb29fbd7fb diff --git a/lib/minions b/lib/minions deleted file mode 160000 index 36d39bd..0000000 --- a/lib/minions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 36d39bd25ae58d1359d17f99142520339bea5974 diff --git a/lib/org b/lib/org deleted file mode 160000 index 3f04ad8..0000000 --- a/lib/org +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3f04ad8d2ce14074cc786af266984b796d245fc0 diff --git a/lib/org-tanglesync b/lib/org-tanglesync deleted file mode 160000 index af83a73..0000000 --- a/lib/org-tanglesync +++ /dev/null @@ -1 +0,0 @@ -Subproject commit af83a73ae542d5cb3c9d433cbf2ce1d4f4259117 diff --git a/lib/orgalist b/lib/orgalist deleted file mode 160000 index 5b51845..0000000 --- a/lib/orgalist +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5b51845194b75052324be7effdaeb736c1367649 diff --git a/lib/packed b/lib/packed deleted file mode 160000 index c41c3df..0000000 --- a/lib/packed +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c41c3dfda86ae33832ffc146923e2a4675cbacfa diff --git a/lib/page-break-lines b/lib/page-break-lines deleted file mode 160000 index f8c4cd7..0000000 --- a/lib/page-break-lines +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f8c4cd7fc67638ae4113551dcffdf87fcd252d9b diff --git a/lib/refinery-theme b/lib/refinery-theme deleted file mode 160000 index 8322113..0000000 --- a/lib/refinery-theme +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 83221130cb12be47a38a3748dc8fb00cd2bc6740 diff --git a/lib/rich-minority b/lib/rich-minority deleted file mode 160000 index a03e693..0000000 --- a/lib/rich-minority +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a03e693f6f9232cf75363aaaf1cb041f21675c19 diff --git a/lib/rt-liberation b/lib/rt-liberation deleted file mode 160000 index 9902111..0000000 --- a/lib/rt-liberation +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9902111423f393c4c0079feb4f51dfe425173b00 diff --git a/lib/s b/lib/s deleted file mode 160000 index 43ba8b5..0000000 --- a/lib/s +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 43ba8b563bee3426cead0e6d4ddc09398e1a349d diff --git a/lib/scpaste b/lib/scpaste deleted file mode 160000 index cd4fa0a..0000000 --- a/lib/scpaste +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cd4fa0aafecd839736e0b6cba68b4fc4d7045472 diff --git a/lib/smart-mode-line b/lib/smart-mode-line deleted file mode 160000 index 999be06..0000000 --- a/lib/smart-mode-line +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 999be065b195f2eddb4e1b629f99038d832d44b7 diff --git a/lib/switch-buffer-functions b/lib/switch-buffer-functions deleted file mode 160000 index 95a846b..0000000 --- a/lib/switch-buffer-functions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 95a846baa93bac4c3b3c028b9d53507f1042b23a diff --git a/lib/transient b/lib/transient deleted file mode 160000 index 4d44d08..0000000 --- a/lib/transient +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4d44d08e90355a8ef36aaad1f9f79c95de1ce0e9 diff --git a/lib/unkillable-scratch b/lib/unkillable-scratch deleted file mode 160000 index b24c2a7..0000000 --- a/lib/unkillable-scratch +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b24c2a760529833f230c14cb02ff6e7ec92288ab diff --git a/lib/which-key b/lib/which-key deleted file mode 160000 index 3642c11..0000000 --- a/lib/which-key +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3642c11d5ef9be3c6fb9edb8fd5ec3c370abd889 diff --git a/lib/with-editor b/lib/with-editor deleted file mode 160000 index efafd48..0000000 --- a/lib/with-editor +++ /dev/null @@ -1 +0,0 @@ -Subproject commit efafd482c21b90decbb0b682ed3159c86014d4f3 diff --git a/lib/yasnippet b/lib/yasnippet deleted file mode 160000 index 5cbdbf0..0000000 --- a/lib/yasnippet +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6 diff --git a/lib/znc b/lib/znc deleted file mode 160000 index 2fd359e..0000000 --- a/lib/znc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2fd359e556e05006e6976ba9b0f8cb220ea19863 diff --git a/lisp/alloy-mode b/lisp/alloy-mode new file mode 160000 index 0000000..0d05bdd --- /dev/null +++ b/lisp/alloy-mode @@ -0,0 +1 @@ +Subproject commit 0d05bdd10c77ec04c3d61eccf67e68c08284951f diff --git a/lisp/amx b/lisp/amx new file mode 160000 index 0000000..ccfc92c --- /dev/null +++ b/lisp/amx @@ -0,0 +1 @@ +Subproject commit ccfc92c600df681df5e8b5fecec328c462ceb71e diff --git a/lisp/bandali-erc.el b/lisp/bandali-erc.el index 754f7ee..c76bd1e 100644 --- a/lisp/bandali-erc.el +++ b/lisp/bandali-erc.el @@ -24,6 +24,9 @@ ;;; Code: +(defvar b/erc-detach-on-kill t + "Whether killing a channel should send a DETACH command (for ZNC).") + (with-eval-after-load 'erc (make-directory (b/var "erc/dcc/") t) (csetq @@ -36,6 +39,7 @@ erc-lurker-hide-list '("JOIN" "PART" "QUIT") erc-nick "bandali" erc-prompt "erc>" + erc-prompt-for-password nil erc-rename-buffers t erc-server-reconnect-attempts 5 erc-server-reconnect-timeout 3) @@ -62,30 +66,41 @@ (erc-update-modules) ;; erc-fill - (csetq - erc-fill-column 77 - erc-fill-function 'erc-fill-static - erc-fill-static-center 18) + ;; (csetq + ;; erc-fill-column 77 + ;; erc-fill-function 'erc-fill-variable + ;; erc-fill-static-center 18) + ;; to disable: + ;; (erc-fill-mode -1) ;; erc-match - ;; (csetq - ;; erc-pal-highlight-type 'message - ;; erc-pals - ;; '("aindilis" "blackbeard" "bremner" "brettgilio" "civodul" "dto" - ;; "ggoes" "jrasata" "jxself" "mplsCorwin" "quiliro" "rindolf" "rwp" - ;; "sachac" "technomancy")) - ;; (with-eval-after-load 'erc-match - ;; (set-face-attribute - ;; 'erc-pal-face nil - ;; :foreground 'unspecified - ;; :weight 'unspecified - ;; ;; :inherit 'font-lock-string-face - ;; ;; :background (face-attribute 'font-lock-string-face :background) - ;; :background "#ffffed")) + (csetq + erc-pal-highlight-type 'nick + erc-pals '("aindilis" "blackbeard" "brettgilio" "civodul" "dto" + "ggoes" "jrasata" "mplsCorwin" "rwp" "technomancy")) + (with-eval-after-load 'erc-match + (set-face-attribute + 'erc-pal-face nil + :foreground 'unspecified + :weight 'unspecified + ;; :inherit 'font-lock-string-face + ;; :background (face-attribute 'font-lock-string-face :background) + :background "#ffffed")) ;; erc-pcomplete (csetq erc-pcomplete-nick-postfix ", ") + ;; erc-stamp + (csetq erc-timestamp-only-if-changed-flag nil + erc-timestamp-format "%T " + erc-insert-timestamp-function 'erc-insert-timestamp-left) + (with-eval-after-load 'erc-match + (set-face-attribute + 'erc-timestamp-face nil + :foreground "#aaaaaa" + :weight 'unspecified + :background 'unspecified)) + ;; erc-track (csetq erc-track-enable-keybindings nil @@ -98,23 +113,49 @@ ;; key bindings (global-set-key (kbd "C-c w e") #'erc-switch-to-buffer-other-window) - (define-key erc-mode-map (kbd "M-a") #'erc-track-switch-buffer)) - -(with-eval-after-load 'znc - (let ((pwd (let ((auth (auth-source-search :host "znca"))) - (cond - ((null auth) (error "Couldn't find znca's authinfo")) - (t (funcall (plist-get (car auth) :secret))))))) - (csetq znc-servers - `(("znc.emacsconf.org" 6697 t - ((freenode "bandali/freenode" ,pwd))) - ("znc.emacsconf.org" 6697 t - ((oftc "bandali/oftc" ,pwd))) - ("znc.emacsconf.org" 6697 t - ((tildechat "bandali/tildechat" ,pwd))))))) + (define-key erc-mode-map (kbd "M-a") #'erc-track-switch-buffer) + + ;; hooks + (defun b/erc-detach-or-kill-channel () + (if b/erc-detach-on-kill + (when (erc-server-process-alive) + (let ((tgt (erc-default-target))) + (erc-server-send (format "DETACH %s" tgt) nil tgt))) + (erc-kill-channel))) + (add-hook 'erc-kill-channel-hook #'b/erc-detach-or-kill-channel) + (remove-hook 'erc-kill-channel-hook #'erc-kill-channel)) + ;; global key bindings -(global-set-key (kbd "C-c a e e") #'znc-erc) -(global-set-key (kbd "C-c a e a") #'znc-all) +(global-set-key + (kbd "C-c a e f") + (lambda () + (interactive) + (let* ((auth (auth-source-search :host "znca")) + (p (if (null auth) + (error "Couldn't find znca's authinfo") + (funcall (plist-get (car auth) :secret))))) + (erc-tls :server "znc.emacsconf.org" :port 6697 + :password (concat "bandali/freenode:" p))))) +(global-set-key + (kbd "C-c a e o") + (lambda () + (interactive) + (let* ((auth (auth-source-search :host "znca")) + (p (if (null auth) + (error "Couldn't find znca's authinfo") + (funcall (plist-get (car auth) :secret))))) + (erc-tls :server "znc.emacsconf.org" :port 6697 + :password (concat "bandali/oftc:" p))))) +(global-set-key + (kbd "C-c a e t") + (lambda () + (interactive) + (let* ((auth (auth-source-search :host "znca")) + (p (if (null auth) + (error "Couldn't find znca's authinfo") + (funcall (plist-get (car auth) :secret))))) + (erc-tls :server "znc.emacsconf.org" :port 6697 + :password (concat "bandali/tildechat:" p))))) (provide 'bandali-erc) ;;; bandali-erc.el ends here diff --git a/lisp/bandali-gnus.el b/lisp/bandali-gnus.el index 4aa41ab..39c9af8 100644 --- a/lisp/bandali-gnus.el +++ b/lisp/bandali-gnus.el @@ -385,9 +385,9 @@ https://shemshak.org/~bandali") (defvar b/uwaterloo-signature "Amin Bandali, MMath https://bndl.org") - (defvar b/csc-signature "Amin Bandali | https://bndl.org -System Administrator, Systems Committee -Computer Science Club, University of Waterloo") + (defvar b/csc-signature "Amin Bandali (https://bndl.org) +Systems Committee +Computer Science Club of the University of Waterloo") (defvar b/sfl-signature "Amin Bandali Free Software Consultant Savoir-faire Linux diff --git a/lisp/bandali-ido.el b/lisp/bandali-ido.el deleted file mode 100644 index 3f1769a..0000000 --- a/lisp/bandali-ido.el +++ /dev/null @@ -1,77 +0,0 @@ -;;; bandali-ido.el --- bandali's Ido setup -*- lexical-binding: t; -*- - -;; Copyright (C) 2018-2020 Amin Bandali - -;; Author: Amin Bandali -;; Keywords: convenience, matching - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: - -;; My (currently unused) Ido setup. - -;;; Code: - -(use-package ido - :demand - :bind - (:map ido-common-completion-map - ([escape] . minibuffer-keyboard-quit) - ("DEL" . b/ido-backspace)) - :config - (require 'delsel) - (defun b/ido-backspace () - "Forward to `backward-delete-char'. On error (read-only), quit." - (interactive) - (condition-case nil - (backward-delete-char 1) - (error - (minibuffer-keyboard-quit)))) - (ido-mode 1) - (ido-everywhere 1) - :custom - (ido-enable-flex-matching t) - ;; (ido-enable-regexp t) - ;; (ido-enable-prefix t) - (ido-max-window-height 10) - (ido-use-virtual-buffers t)) - -(use-package ido-vertical-mode - :defer 0.3 - :config - (ido-vertical-mode 1) - :custom - (ido-vertical-define-keys 'C-n-C-p-up-and-down) - (ido-vertical-show-count t)) - -(use-package ido-completing-read+ - :defer 0.3 - :after ido - :config - (ido-ubiquitous-mode 1)) - -(use-package crm-custom - :defer 0.3 - :after crm - :config - (crm-custom-mode 1)) - -(use-package ido-at-point - :defer 0.3 - :config - (ido-at-point-mode 1)) - -(provide 'bandali-ido) -;;; bandali-ido.el ends here diff --git a/lisp/bandali-multi-term.el b/lisp/bandali-multi-term.el deleted file mode 100644 index 1e02e36..0000000 --- a/lisp/bandali-multi-term.el +++ /dev/null @@ -1,81 +0,0 @@ -;;; bandali-multi-term.el --- bandali's multi-term setup -*- lexical-binding: t; -*- - -;; Copyright (C) 2020 Amin Bandali - -;; Author: Amin Bandali -;; Keywords: terminals - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: - -;; My multi-term configuration. - -;;; Code: - -(use-package multi-term - :disabled - :defer 0.6 - :bind (("C-c a s m m" . multi-term) - ("C-c a s m d" . multi-term-dedicated-toggle) - ("C-c a s m p" . multi-term-prev) - ("C-c a s m n" . multi-term-next) - :map term-mode-map - ("C-c C-j" . term-char-mode)) - :config - (setq multi-term-program "screen" - multi-term-program-switches (concat "-c" - (getenv "XDG_CONFIG_HOME") - "/screen/screenrc") - ;; TODO: add separate bindings for connecting to existing - ;; session vs. always creating a new one - multi-term-dedicated-select-after-open-p t - multi-term-dedicated-window-height 20 - multi-term-dedicated-max-window-height 30 - term-bind-key-alist - '(("C-c C-c" . term-interrupt-subjob) - ("C-c C-e" . term-send-esc) - ("C-c C-j" . term-line-mode) - ("C-k" . kill-line) - ;; ("C-y" . term-paste) - ("C-y" . term-send-raw) - ("M-f" . term-send-forward-word) - ("M-b" . term-send-backward-word) - ("M-p" . term-send-up) - ("M-n" . term-send-down) - ("M-j" . term-send-raw-meta) - ("M-y" . term-send-raw-meta) - ("M-/" . term-send-raw-meta) - ("M-0" . term-send-raw-meta) - ("M-1" . term-send-raw-meta) - ("M-2" . term-send-raw-meta) - ("M-3" . term-send-raw-meta) - ("M-4" . term-send-raw-meta) - ("M-5" . term-send-raw-meta) - ("M-6" . term-send-raw-meta) - ("M-7" . term-send-raw-meta) - ("M-8" . term-send-raw-meta) - ("M-9" . term-send-raw-meta) - ("" . term-send-backward-kill-word) - ("" . term-send-backward-kill-word) - ("M-d" . term-send-delete-word) - ("M-," . term-send-raw) - ("M-." . comint-dynamic-complete)) - term-unbind-key-alist - '("C-z" "C-x" "C-c" "C-h" - ;; "C-y" - ""))) - -(provide 'bandali-multi-term) -;;; bandali-multi-term.el ends here diff --git a/lisp/bandali-projectile.el b/lisp/bandali-projectile.el deleted file mode 100644 index dbef93e..0000000 --- a/lisp/bandali-projectile.el +++ /dev/null @@ -1,70 +0,0 @@ -;;; bandali-projectile.el --- bandali's Projectile setup -*- lexical-binding: t; -*- - -;; Copyright (C) 2020 Amin Bandali - -;; Author: Amin Bandali -;; Keywords: convenience - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: - -;; My Projectile setup. - -;;; Code: - -(use-package projectile - :disabled - :defer 0.5 - :bind-keymap ("C-c p" . projectile-command-map) - :config - (make-directory (b/var "projectile/") t) - (projectile-mode) - - (defun b/projectile-mode-line-fun () - "Report project name and type in the modeline." - (let ((project-name (projectile-project-name)) - (project-type (projectile-project-type))) - (format "%s%s" - projectile-mode-line-prefix - (if project-type - (format ":%s" project-type) - "")))) - (setq projectile-mode-line-function 'b/projectile-mode-line-fun) - - (defun my-projectile-invalidate-cache (&rest _args) - ;; ignore the args to `magit-checkout' - (projectile-invalidate-cache nil)) - - (eval-after-load 'magit-branch - '(progn - (advice-add 'magit-checkout - :after #'my-projectile-invalidate-cache) - (advice-add 'magit-branch-and-checkout - :after #'my-projectile-invalidate-cache))) - - (when (featurep 'which-key) - (which-key-add-key-based-replacements - "C-c p" "projectile" - "C-c p s" "projectile/search" - "C-c p x" "projectile/execute" - "C-c p 4" "projectile/other-window")) - :custom - (projectile-cache-file (b/var "projectile/cache.el")) - (projectile-completion-system 'ivy) - (projectile-known-projects-file (b/var "projectile/known-projects.el")) - (projectile-mode-line-prefix " proj")) - -(provide 'bandali-projectile) -;;; bandali-projectile.el ends here diff --git a/lisp/bandali-theme.el b/lisp/bandali-theme.el index 7706bcc..13929cb 100644 --- a/lisp/bandali-theme.el +++ b/lisp/bandali-theme.el @@ -24,18 +24,20 @@ ;;; Code: -(require 'refinery-theme) -(load-theme 'refinery t) +(with-eval-after-load 'package + (require 'refinery-theme) + (load-theme 'refinery t)) -(require 'smart-mode-line) -;; thanks, but no thanks; don't make fixed-width fills. -(defun sml/fill-for-buffer-identification nil "") -(setq sml/theme 'respectful) -(sml/setup) -(smart-mode-line-enable) +;; (require 'smart-mode-line) +;; ;; thanks, but no thanks; don't make fixed-width fills. +;; (defun sml/fill-for-buffer-identification nil "") +;; (setq sml/theme 'respectful) +;; (let ((sml/no-confirm-load-theme t)) +;; (sml/setup) +;; (smart-mode-line-enable)) -(require 'minions) -(minions-mode) +;; (require 'minions) +;; (minions-mode) (defvar b/org-mode-font-lock-keywords '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)" @@ -54,7 +56,8 @@ (mapc #'disable-theme custom-enabled-themes) (load-theme 'refinery t) (when (featurep 'smart-mode-line) - (sml/apply-theme 'bandali)) + (let ((sml/no-confirm-load-theme t)) + (sml/apply-theme 'respectful))) (font-lock-remove-keywords 'org-mode b/org-mode-font-lock-keywords) (when (featurep 'erc-hl-nicks) @@ -68,7 +71,8 @@ (mapc #'disable-theme custom-enabled-themes) (load-theme 'refinery-dark t) (when (featurep 'smart-mode-line) - (sml/apply-theme 'dark)) + (let ((sml/no-confirm-load-theme t)) + (sml/apply-theme 'dark))) (font-lock-add-keywords 'org-mode b/org-mode-font-lock-keywords t) (when (featurep 'erc-hl-nicks) diff --git a/lisp/bandali-utils.el b/lisp/bandali-utils.el index 95c2878..6669b2a 100644 --- a/lisp/bandali-utils.el +++ b/lisp/bandali-utils.el @@ -24,10 +24,22 @@ ;;; Code: -(defmacro b/setq-every (value &rest vars) - "Set all the variables from VARS to value VALUE." - (declare (indent defun) (debug t)) - `(progn ,@(mapcar (lambda (x) (list 'setq x value)) vars))) +(require 'cl-lib) + +(defmacro csetq (&rest args) + "Set the value of user option VAR to VALUE. + +More generally, you can use multiple variables and values, as in + (csetq VAR VALUE VAR VALUE...) +This sets each user option VAR's value to the corresponding VALUE. + +\(fn [VAR VALUE]...)" + (declare (debug setq)) + `(progn + ,@(cl-loop for (var value) on args by 'cddr + collect + `(funcall (or (get ',var 'custom-set) #'set-default) + ',var ,value)))) (defun b/start-process (program &rest args) "Same as `start-process', but doesn't bother about name and buffer." diff --git a/lisp/boxquote b/lisp/boxquote new file mode 160000 index 0000000..7e47e0e --- /dev/null +++ b/lisp/boxquote @@ -0,0 +1 @@ +Subproject commit 7e47e0e2853bc1215739b2e28f260e9eed93b2c5 diff --git a/lisp/hl-todo b/lisp/hl-todo new file mode 160000 index 0000000..0598b98 --- /dev/null +++ b/lisp/hl-todo @@ -0,0 +1 @@ +Subproject commit 0598b98f63b623c1778cbd2e2f60b774b7a311b9 diff --git a/lisp/page-break-lines b/lisp/page-break-lines new file mode 160000 index 0000000..f8c4cd7 --- /dev/null +++ b/lisp/page-break-lines @@ -0,0 +1 @@ +Subproject commit f8c4cd7fc67638ae4113551dcffdf87fcd252d9b diff --git a/lisp/s b/lisp/s new file mode 160000 index 0000000..43ba8b5 --- /dev/null +++ b/lisp/s @@ -0,0 +1 @@ +Subproject commit 43ba8b563bee3426cead0e6d4ddc09398e1a349d diff --git a/lisp/scpaste b/lisp/scpaste new file mode 160000 index 0000000..cd4fa0a --- /dev/null +++ b/lisp/scpaste @@ -0,0 +1 @@ +Subproject commit cd4fa0aafecd839736e0b6cba68b4fc4d7045472 diff --git a/var/abbrev.el b/var/abbrev.el deleted file mode 100644 index 76f19d8..0000000 --- a/var/abbrev.el +++ /dev/null @@ -1,5 +0,0 @@ -;;-*-coding: utf-8;-*- -(define-abbrev-table 'message-mode-abbrev-table - '( - ("linux" "GNU/Linux" nil :count 4) - ))