From 6b09fc8a2951778cd3ff9807d7132dcfb1f7de38 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 2 Jul 2020 18:31:23 -0400 Subject: [PATCH 1/1] Update 17 drones and commit a bunch of changes Update amx to v3.3-15-gccfc92c Update borg to v3.1.2-11-gbc6d869 Update dash to 2.17.0-5-g732d92e Update diff-hl to 1.8.7-17-g2281a89 Update ebdb to 0.6-130-g0b70386 Update ivy to 0.13.0-336-gd951004 Update libgit to 0ef8b13 Update magit to v2.90.1-1021-g485ee181 Update minions to v0.3.4 Update no-littering to v1.1.0-2-g93d66b1 Update org to release_9.3.7-662-g0c0d00b93 Update orgalist to 5b51845 Update transient to v0.2.0-28-g73694be Update use-package to 2.4-41-gbfc5ecd Update which-key to v3.4.0-25-g8f2427a Update with-editor to v2.9.3-3-g7c51288 Update yasnippet to 0.14.0-7-gd3d6d70 --- Makefile | 17 +++- early-init.el | 10 +++ etc/yasnippet/snippets/latex-mode/etal | 2 +- init.el | 115 ++---------------------- lib/amx | 2 +- lib/borg | 2 +- lib/dash | 2 +- lib/diff-hl | 2 +- lib/ebdb | 2 +- lib/ivy | 2 +- lib/libgit | 2 +- lib/magit | 2 +- lib/minions | 2 +- lib/no-littering | 2 +- lib/org | 2 +- lib/orgalist | 2 +- lib/transient | 2 +- lib/use-package | 2 +- lib/which-key | 2 +- lib/with-editor | 2 +- lib/yasnippet | 2 +- lisp/bandali-erc.el | 8 +- lisp/bandali-gnus.el | 12 ++- lisp/bandali-message.el | 2 +- lisp/bandali-utils.el | 118 +++++++++++++++++++++++++ 25 files changed, 182 insertions(+), 136 deletions(-) create mode 100644 lisp/bandali-utils.el diff --git a/Makefile b/Makefile index c36f3ba..02296e8 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,23 @@ -include lib/borg/borg.mk +INIT_FILES = early-init.el +INIT_FILES += init.el +INIT_FILES += lisp/bandali-utils.el +INIT_FILES += lisp/bandali-org.el +INIT_FILES += lisp/bandali-theme.el +INIT_FILES += lisp/bandali-ivy.el +INIT_FILES += lisp/bandali-eshell.el +INIT_FILES += lisp/bandali-ibuffer.el +INIT_FILES += lisp/bandali-dired.el +INIT_FILES += lisp/bandali-gnus.el +INIT_FILES += lisp/bandali-message.el +INIT_FILES += lisp/bandali-ebdb.el +INIT_FILES += lisp/bandali-erc.el +INIT_FILES += lisp/bandali-yasnippet.el + bootstrap-borg: @git submodule--helper clone --name borg --path lib/borg \ - --url git@github.com:emacscollective/borg.git + --url https://github.com/emacscollective/borg.git @cd lib/borg; git symbolic-ref HEAD refs/heads/master @cd lib/borg; git reset --hard HEAD diff --git a/early-init.el b/early-init.el index 3ee38c2..bb6d45c 100644 --- a/early-init.el +++ b/early-init.el @@ -1,3 +1,13 @@ ;; No package.el (for emacs 27 and later). See ;; https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=24acb31c04b4048b85311d794e600ecd7ce60d3b (setq package-enable-at-startup nil) +(setq load-prefer-newer t) +(defmacro comment (&rest _) + "Comment out one or more s-expressions." + (declare (indent defun)) + nil) +(add-to-list + 'load-path + (expand-file-name + (convert-standard-filename "lisp") user-emacs-directory)) +(require 'bandali-utils) diff --git a/etc/yasnippet/snippets/latex-mode/etal b/etc/yasnippet/snippets/latex-mode/etal index 3f80334..96e1fb0 100644 --- a/etc/yasnippet/snippets/latex-mode/etal +++ b/etc/yasnippet/snippets/latex-mode/etal @@ -2,4 +2,4 @@ # name: etal # key: etal # -- -\emph{et al.}$0 \ No newline at end of file +\emph{et~al.}$0 \ No newline at end of file diff --git a/init.el b/init.el index 88cbc9b..dc6d3f2 100644 --- a/init.el +++ b/init.el @@ -95,15 +95,6 @@ user-mail-address "bandali@gnu.org") -;;; comment macro - -;; useful for commenting out multiple sexps at a time -(defmacro comment (&rest _) - "Comment out one or more s-expressions." - (declare (indent defun)) - nil) - - ;;; Package management (progn ; `borg' @@ -181,99 +172,6 @@ (or (server-running-p) (server-mode))) -;;; Useful utilities - -(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))) - -(defun b/start-process (program &rest args) - "Same as `start-process', but doesn't bother about name and buffer." - (let ((process-name (concat program "_process")) - (buffer-name (generate-new-buffer-name - (concat program "_output")))) - (apply #'start-process - process-name buffer-name program args))) - -(defun b/dired-start-process (program &optional args) - "Open current file with a PROGRAM." - ;; Shell command looks like this: "program [ARGS]... FILE" (ARGS can - ;; be nil, so remove it). - (declare-function dired-get-file-for-visit "dired") - (apply #'b/start-process - program - (remove nil (list args (dired-get-file-for-visit))))) - -(defun b/add-elisp-section () - (interactive) - (insert "\n") - (forward-line -1) - (insert "\n \n;;; ")) - -;; (defvar b/fill-column 47 -;; "My custom `fill-column'.") - -(defconst b/asterism "* * *") - -(defun b/insert-asterism () - "Insert a centred asterism." - (interactive) - (insert - (concat - "\n\n" - (make-string (floor (/ (- fill-column (length b/asterism)) 2)) - ?\s) - b/asterism - "\n\n"))) - -(defun b/no-mouse-autoselect-window () - "Conveniently disable `focus-follows-mouse'. -For disabling the behaviour for certain buffers and/or modes." - (make-local-variable 'mouse-autoselect-window) - (setq mouse-autoselect-window nil)) - -(defun b/kill-current-buffer () - "Kill the current buffer." - ;; also see https://redd.it/64xb3q - (interactive) - (kill-buffer (current-buffer))) - -(defun b/move-indentation-or-beginning-of-line (arg) - "Move to the indentation or to the beginning of line." - (interactive "^p") - ;; (if (bolp) - ;; (back-to-indentation) - ;; (move-beginning-of-line arg)) - (if (= (point) - (progn (back-to-indentation) - (point))) - (move-beginning-of-line arg))) - -(defun b/join-line-top () - "Like `join-line', but join next line to the current line." - (interactive) - (join-line 1)) - -(defun b/duplicate-line-or-region (&optional n) - "Duplicate the current line, or region (if active). -Make N (default: 1) copies of the current line or region." - (interactive "*p") - (let ((u-r-p (use-region-p)) ; if region is active - (n1 (or n 1))) - (save-excursion - (let ((text - (if u-r-p - (buffer-substring (region-beginning) (region-end)) - (prog1 (thing-at-point 'line) - (end-of-line) - (if (eobp) - (newline) - (forward-line 1)))))) - (dotimes (_ (abs n1)) - (insert text)))))) - - ;;; Defaults ;;;; C-level customizations @@ -577,11 +475,6 @@ Make N (default: 1) copies of the current line or region." ;;; Essential packages -(add-to-list - 'load-path - (expand-file-name - (convert-standard-filename "lisp") user-emacs-directory)) - (when b/exwm-p (require 'bandali-exwm)) @@ -621,8 +514,8 @@ Make N (default: 1) copies of the current line or region." ;; recently opened files (use-package recentf :defer 0.2 - ;; :config - ;; (add-to-list 'recentf-exclude "^/\\(?:ssh\\|su\\|sudo\\)?:") + :config + (add-to-list 'recentf-keep 'file-remote-p) :config (recentf-mode) :custom @@ -668,6 +561,10 @@ Make N (default: 1) copies of the current line or region." (require 'bandali-dired) (use-package help + :bind + (:map help-mode-map + ("p" . backward-button) + ("n" . forward-button)) :config (temp-buffer-resize-mode) (setq help-window-select t)) diff --git a/lib/amx b/lib/amx index 7fb7b87..ccfc92c 160000 --- a/lib/amx +++ b/lib/amx @@ -1 +1 @@ -Subproject commit 7fb7b874291e0cdeb1f0acb18564a686ec86788d +Subproject commit ccfc92c600df681df5e8b5fecec328c462ceb71e diff --git a/lib/borg b/lib/borg index 3cfb35f..bc6d869 160000 --- a/lib/borg +++ b/lib/borg @@ -1 +1 @@ -Subproject commit 3cfb35f5c54a76f200272ed11b4a39f11a57552c +Subproject commit bc6d869c5b26fc969eb103c4be2642c5b8524e35 diff --git a/lib/dash b/lib/dash index 721436b..732d92e 160000 --- a/lib/dash +++ b/lib/dash @@ -1 +1 @@ -Subproject commit 721436b04da4e2795387cb48a98ac6de37ece0fd +Subproject commit 732d92eac56023a4fb4a5dc3d9d4e274ebf44bf9 diff --git a/lib/diff-hl b/lib/diff-hl index a625033..2281a89 160000 --- a/lib/diff-hl +++ b/lib/diff-hl @@ -1 +1 @@ -Subproject commit a625033fb1dde83f6e4c2fc21f632b22ec34b609 +Subproject commit 2281a89a3ddc6616073da6f190dda08d23b18ba6 diff --git a/lib/ebdb b/lib/ebdb index dcd6803..0b70386 160000 --- a/lib/ebdb +++ b/lib/ebdb @@ -1 +1 @@ -Subproject commit dcd6803724ace2270cfd9723929a17ca31d64af0 +Subproject commit 0b7038694a4d844581461c261d96a7cd5679ac51 diff --git a/lib/ivy b/lib/ivy index 1b426e1..d951004 160000 --- a/lib/ivy +++ b/lib/ivy @@ -1 +1 @@ -Subproject commit 1b426e1215242cef61b65ee6a1d07840e22d4bce +Subproject commit d951004c7f3ebf98d55fc5a80a3471ec95b6db05 diff --git a/lib/libgit b/lib/libgit index 6c3b892..0ef8b13 160000 --- a/lib/libgit +++ b/lib/libgit @@ -1 +1 @@ -Subproject commit 6c3b89276a149b2d009882f756a9edf866671f05 +Subproject commit 0ef8b13aef011a98b7da756e4f1ce3bb18e4d55a diff --git a/lib/magit b/lib/magit index ec719a4..485ee18 160000 --- a/lib/magit +++ b/lib/magit @@ -1 +1 @@ -Subproject commit ec719a49bf6e724d197277e63c70a728c2c6e281 +Subproject commit 485ee181564655d21c0770a4e021f7b805f4d643 diff --git a/lib/minions b/lib/minions index bc1edab..36d39bd 160000 --- a/lib/minions +++ b/lib/minions @@ -1 +1 @@ -Subproject commit bc1edab09d3fc1b248c17775ae2eb7d35b96be40 +Subproject commit 36d39bd25ae58d1359d17f99142520339bea5974 diff --git a/lib/no-littering b/lib/no-littering index ea8d865..93d66b1 160000 --- a/lib/no-littering +++ b/lib/no-littering @@ -1 +1 @@ -Subproject commit ea8d8654365eeeea366a3ee0f51689987f2803a8 +Subproject commit 93d66b13a7bcd8fa3e123839365482fcc655819d diff --git a/lib/org b/lib/org index 14d6f95..0c0d00b 160000 --- a/lib/org +++ b/lib/org @@ -1 +1 @@ -Subproject commit 14d6f95bec975d882d5d0a047e81c74a1cd89edc +Subproject commit 0c0d00b931f8790390dbf352eb7a695ae8912761 diff --git a/lib/orgalist b/lib/orgalist index b436971..5b51845 160000 --- a/lib/orgalist +++ b/lib/orgalist @@ -1 +1 @@ -Subproject commit b436971c7d35af5ab48d91248dc3028fb733cab6 +Subproject commit 5b51845194b75052324be7effdaeb736c1367649 diff --git a/lib/transient b/lib/transient index afa0c2f..73694be 160000 --- a/lib/transient +++ b/lib/transient @@ -1 +1 @@ -Subproject commit afa0c2f98453b9ffd9d8160831debc7e36cdb87b +Subproject commit 73694be44a802cac89bfe0798e2a4aeb79e39ead diff --git a/lib/use-package b/lib/use-package index c873d55..bfc5ecd 160000 --- a/lib/use-package +++ b/lib/use-package @@ -1 +1 @@ -Subproject commit c873d5529c9c80cb58222f22873a4f081c307cb2 +Subproject commit bfc5ecd69cdf71fae0af722d90336c66a6415f03 diff --git a/lib/which-key b/lib/which-key index 8b49ae9..8f2427a 160000 --- a/lib/which-key +++ b/lib/which-key @@ -1 +1 @@ -Subproject commit 8b49ae978cceca65967f3544c236f32964ddbed0 +Subproject commit 8f2427a69bc0388ddfb14a10eaf71e589f3b0913 diff --git a/lib/with-editor b/lib/with-editor index 4fe66d4..7c51288 160000 --- a/lib/with-editor +++ b/lib/with-editor @@ -1 +1 @@ -Subproject commit 4fe66d4d55c8eacebda53a13cc38e01d32bdaaa2 +Subproject commit 7c512887c6d69864fb600d32fb92857c51babcff diff --git a/lib/yasnippet b/lib/yasnippet index 5b1217a..d3d6d70 160000 --- a/lib/yasnippet +++ b/lib/yasnippet @@ -1 +1 @@ -Subproject commit 5b1217ab085fab4abeb1118dccb260691b446703 +Subproject commit d3d6d70b1cd4818d271752468e0fdb0788db750d diff --git a/lisp/bandali-erc.el b/lisp/bandali-erc.el index afdc949..624572a 100644 --- a/lisp/bandali-erc.el +++ b/lisp/bandali-erc.el @@ -99,10 +99,10 @@ ((null auth) (error "Couldn't find znca's authinfo")) (t (funcall (plist-get (car auth) :secret))))))) (setq znc-servers - `(("znc.shemshak.org" 1337 t - ((freenode "amin/freenode" ,pwd))) - ("znc.shemshak.org" 1337 t - ((oftc "amin/oftc" ,pwd))))))) + `(("znc.emacsconf.org" 6697 t + ((freenode "bandali/freenode" ,pwd))) + ("znc.emacsconf.org" 6697 t + ((oftc "bandali/oftc" ,pwd))))))) (provide 'bandali-erc) ;;; bandali-erc.el ends here diff --git a/lisp/bandali-gnus.el b/lisp/bandali-gnus.el index f85f694..2bfa816 100644 --- a/lisp/bandali-gnus.el +++ b/lisp/bandali-gnus.el @@ -92,7 +92,7 @@ ;; legend: (u)nsubscribed | (d)ead ;; ---------------------------------- ;; spam - ("X-Spam-Flag" "YES" "Junk") + ("X-Spam_action" "reject" "Junk") ;; otherwise, leave mail in INBOX "INBOX"))) (nnimap "uw" @@ -271,6 +271,12 @@ '(list . "list-id\\|list-post\\|x-mailing-list\\|x-beenthere\\|x-loop") t))) + ;; (require 'gnus-registry) + ;; (setq gnus-registry-max-entries 2500) + ;; (setq gnus-registry-ignored-groups + ;; (append gnus-registry-ignored-groups + ;; '(("^nnimap:gnu\\.l" t) + ;; ("webmasters$" t)))) ;; (gnus-registry-initialize) (with-eval-after-load 'recentf @@ -301,8 +307,8 @@ "^Resent-From:" "^User-Agent:" "^X-detected-operating-system:" - "^X-Spam-Flag:" - "^X-Spam-Level:" + "^X-Spam_action:" + "^X-Spam_bar:" "^Message-ID:" ;; "^References:" "^List-Id:" diff --git a/lisp/bandali-message.el b/lisp/bandali-message.el index 4f3d551..c063bae 100644 --- a/lisp/bandali-message.el +++ b/lisp/bandali-message.el @@ -57,7 +57,7 @@ message-subscribed-address-functions '(gnus-find-subscribed-addresses) message-dont-reply-to-names - "\\(\\(amin@shemshak\\.org\\)\\|\\(.*@aminb\\.org\\)\\|\\(\\(bandali\\|mab\\|aminb?\\)@gnu\\.org\\)\\|\\(a?bandali@\\(csclub\\.\\)?uwaterloo\\.ca\\)\\)") + "\\(\\(amin@shemshak\\.org\\)\\|\\(.*@aminb\\.org\\)\\|\\(\\(bandali\\|mab\\|aminb?\\)@gnu\\.org\\)\\|bandali@fsf\\.org\\|\\(a?bandali@\\(csclub\\.\\)?uwaterloo\\.ca\\)\\)") ;; (require 'company-ebdb) :hook (;; (message-setup . mml-secure-message-sign-pgpmime) (message-mode . flyspell-mode) diff --git a/lisp/bandali-utils.el b/lisp/bandali-utils.el new file mode 100644 index 0000000..7a2820d --- /dev/null +++ b/lisp/bandali-utils.el @@ -0,0 +1,118 @@ +;;; bandali-utils.el --- useful utilities -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Amin Bandali + +;; Author: Amin Bandali +;; Keywords: lisp, tools + +;; 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: + +;; A small collection of useful utilities used through my init files. + +;;; 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))) + +(defun b/start-process (program &rest args) + "Same as `start-process', but doesn't bother about name and buffer." + (let ((process-name (concat program "_process")) + (buffer-name (generate-new-buffer-name + (concat program "_output")))) + (apply #'start-process + process-name buffer-name program args))) + +(defun b/dired-start-process (program &optional args) + "Open current file with a PROGRAM." + ;; Shell command looks like this: "program [ARGS]... FILE" (ARGS can + ;; be nil, so remove it). + (declare-function dired-get-file-for-visit "dired") + (apply #'b/start-process + program + (remove nil (list args (dired-get-file-for-visit))))) + +(defun b/add-elisp-section () + (interactive) + (insert "\n") + (forward-line -1) + (insert "\n \n;;; ")) + +;; (defvar b/fill-column 47 +;; "My custom `fill-column'.") + +(defconst b/asterism "* * *") + +(defun b/insert-asterism () + "Insert a centred asterism." + (interactive) + (insert + (concat + "\n\n" + (make-string (floor (/ (- fill-column (length b/asterism)) 2)) + ?\s) + b/asterism + "\n\n"))) + +(defun b/no-mouse-autoselect-window () + "Conveniently disable `focus-follows-mouse'. +For disabling the behaviour for certain buffers and/or modes." + (make-local-variable 'mouse-autoselect-window) + (setq mouse-autoselect-window nil)) + +(defun b/kill-current-buffer () + "Kill the current buffer." + ;; also see https://redd.it/64xb3q + (interactive) + (kill-buffer (current-buffer))) + +(defun b/move-indentation-or-beginning-of-line (arg) + "Move to the indentation or to the beginning of line." + (interactive "^p") + ;; (if (bolp) + ;; (back-to-indentation) + ;; (move-beginning-of-line arg)) + (if (= (point) + (progn (back-to-indentation) + (point))) + (move-beginning-of-line arg))) + +(defun b/join-line-top () + "Like `join-line', but join next line to the current line." + (interactive) + (join-line 1)) + +(defun b/duplicate-line-or-region (&optional n) + "Duplicate the current line, or region (if active). +Make N (default: 1) copies of the current line or region." + (interactive "*p") + (let ((u-r-p (use-region-p)) ; if region is active + (n1 (or n 1))) + (save-excursion + (let ((text + (if u-r-p + (buffer-substring (region-beginning) (region-end)) + (prog1 (thing-at-point 'line) + (end-of-line) + (if (eobp) + (newline) + (forward-line 1)))))) + (dotimes (_ (abs n1)) + (insert text)))))) + +(provide 'bandali-utils) +;;; bandali-utils.el ends here -- 2.20.1