-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
;; 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)
# name: etal
# key: etal
# --
-\emph{et al.}$0
\ No newline at end of file
+\emph{et~al.}$0
\ No newline at end of file
user-mail-address "bandali@gnu.org")
\f
-;;; 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)
-
-\f
;;; Package management
(progn ; `borg'
(or (server-running-p) (server-mode)))
\f
-;;; 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\f\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))))))
-
-\f
;;; Defaults
;;;; C-level customizations
\f
;;; Essential packages
-(add-to-list
- 'load-path
- (expand-file-name
- (convert-standard-filename "lisp") user-emacs-directory))
-
(when b/exwm-p
(require 'bandali-exwm))
;; 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
(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))
-Subproject commit 7fb7b874291e0cdeb1f0acb18564a686ec86788d
+Subproject commit ccfc92c600df681df5e8b5fecec328c462ceb71e
-Subproject commit 3cfb35f5c54a76f200272ed11b4a39f11a57552c
+Subproject commit bc6d869c5b26fc969eb103c4be2642c5b8524e35
-Subproject commit 721436b04da4e2795387cb48a98ac6de37ece0fd
+Subproject commit 732d92eac56023a4fb4a5dc3d9d4e274ebf44bf9
-Subproject commit a625033fb1dde83f6e4c2fc21f632b22ec34b609
+Subproject commit 2281a89a3ddc6616073da6f190dda08d23b18ba6
-Subproject commit dcd6803724ace2270cfd9723929a17ca31d64af0
+Subproject commit 0b7038694a4d844581461c261d96a7cd5679ac51
-Subproject commit 1b426e1215242cef61b65ee6a1d07840e22d4bce
+Subproject commit d951004c7f3ebf98d55fc5a80a3471ec95b6db05
-Subproject commit 6c3b89276a149b2d009882f756a9edf866671f05
+Subproject commit 0ef8b13aef011a98b7da756e4f1ce3bb18e4d55a
-Subproject commit ec719a49bf6e724d197277e63c70a728c2c6e281
+Subproject commit 485ee181564655d21c0770a4e021f7b805f4d643
-Subproject commit bc1edab09d3fc1b248c17775ae2eb7d35b96be40
+Subproject commit 36d39bd25ae58d1359d17f99142520339bea5974
-Subproject commit ea8d8654365eeeea366a3ee0f51689987f2803a8
+Subproject commit 93d66b13a7bcd8fa3e123839365482fcc655819d
-Subproject commit 14d6f95bec975d882d5d0a047e81c74a1cd89edc
+Subproject commit 0c0d00b931f8790390dbf352eb7a695ae8912761
-Subproject commit b436971c7d35af5ab48d91248dc3028fb733cab6
+Subproject commit 5b51845194b75052324be7effdaeb736c1367649
-Subproject commit afa0c2f98453b9ffd9d8160831debc7e36cdb87b
+Subproject commit 73694be44a802cac89bfe0798e2a4aeb79e39ead
-Subproject commit c873d5529c9c80cb58222f22873a4f081c307cb2
+Subproject commit bfc5ecd69cdf71fae0af722d90336c66a6415f03
-Subproject commit 8b49ae978cceca65967f3544c236f32964ddbed0
+Subproject commit 8f2427a69bc0388ddfb14a10eaf71e589f3b0913
-Subproject commit 4fe66d4d55c8eacebda53a13cc38e01d32bdaaa2
+Subproject commit 7c512887c6d69864fb600d32fb92857c51babcff
-Subproject commit 5b1217ab085fab4abeb1118dccb260691b446703
+Subproject commit d3d6d70b1cd4818d271752468e0fdb0788db750d
((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
;; legend: (u)nsubscribed | (d)ead
;; ----------------------------------
;; spam
- ("X-Spam-Flag" "YES" "Junk")
+ ("X-Spam_action" "reject" "Junk")
;; otherwise, leave mail in INBOX
"INBOX")))
(nnimap "uw"
'(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
"^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:"
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)
--- /dev/null
+;;; bandali-utils.el --- useful utilities -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2020 Amin Bandali
+
+;; Author: Amin Bandali <bandali@gnu.org>
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; 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\f\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