emacs: update straight.el, transactions are now transparent to users
[~bandali/configs] / .emacs.d / init.el
index a1da362..f08e8c5 100644 (file)
 (defun a/reload-init ()
   "Reload init.el."
   (interactive)
-  (straight-transaction
-    (straight-mark-transaction-as-init)
-    (setq a/file-name-handler-alist file-name-handler-alist)
-    (load user-init-file)
-    (a/post-init)))
+  (setq a/file-name-handler-alist file-name-handler-alist)
+  (load user-init-file nil 'nomessage)
+  (a/post-init))
 
 ;; use-package
 (straight-use-package 'use-package)
@@ -793,6 +791,7 @@ For disabling the behaviour for certain buffers and/or modes."
         (mode . scheme-mode)
         (mode . haskell-mode)
         (mode . lean-mode)
+        (mode . go-mode)
         (mode . alloy-mode)))
       ("tex"
        (or
@@ -947,6 +946,12 @@ For disabling the behaviour for certain buffers and/or modes."
   :hook ((text-mode . indicate-buffer-boundaries-left)
          (text-mode . abbrev-mode)))
 
+(use-feature conf-mode
+  :mode "\\.*rc$")
+
+(use-feature sh-mode
+  :mode "\\.bashrc$")
+
 (use-package company
   :defer 0.6
   :bind
@@ -1168,6 +1173,8 @@ For disabling the behaviour for certain buffers and/or modes."
     :custom
     (font-latex-fontify-sectioning 'color)))
 
+(use-package go-mode)
+
 \f
 ;;; Theme
 
@@ -1529,7 +1536,44 @@ For disabling the behaviour for certain buffers and/or modes."
             (nnimap-address "127.0.0.1")
             (nnimap-server-port 143)
             (nnimap-authenticator plain)
-            (nnimap-user "bandali@gnu.local"))
+            (nnimap-user "bandali@gnu.local")
+            (nnimap-inbox "INBOX")
+            (nnimap-split-methods 'nnimap-split-fancy)
+            (nnimap-split-fancy (|
+                                 (: gnus-registry-split-fancy-with-parent)
+                                 ;; (: gnus-group-split-fancy "INBOX" t "INBOX")
+                                 ;; gnu
+                                 (list ".*emacs-devel.gnu.org" "l.gnu.emacs.devel")
+                                 (list ".*help-gnu-emacs.gnu.org" "l.gnu.emacs.help")
+                                 (list ".*info-gnu-emacs.gnu.org" "l.gnu.emacs.info")
+                                 (list ".*emacs-orgmode.gnu.org" "l.gnu.emacs.orgmode")
+                                 (list ".*emacsconf-discuss.gnu.org" "l.gnu.emacsconf.discuss")
+                                 (list ".*fencepost-users.gnu.org" "l.gnu.fencepost.users")
+                                 (list ".*gnunet-developers.gnu.org" "l.gnu.gnunet.developers")
+                                 (list ".*help-gnunet.gnu.org" "l.gnu.gnunet.help")
+                                 (list ".*bug-gnuzilla.gnu.org" "l.gnu.gnuzilla.bug")
+                                 (list ".*gnuzilla-dev.gnu.org" "l.gnu.gnuzilla.dev")
+                                 (list ".*guile-devel.gnu.org" "l.gnu.guile.devel")
+                                 (list ".*guix-devel.gnu.org" "l.gnu.guix.devel")
+                                 (list ".*info-guix.gnu.org" "l.gnu.guix.info")
+                                 (list ".*www-commits.gnu.org" "l.gnu.www.commits")
+                                 (list ".*www-discuss.gnu.org" "l.gnu.www.discuss")
+                                 ;; webmasters
+                                 (from "webmasters\\(-comment\\)?@gnu\\.org" "webmasters")
+                                 ;; haskell
+                                 (list ".*haskell-art.we.lurk.org" "l.haskell.art")
+                                 (list ".*haskell-cafe.haskell.org" "l.haskell.cafe")
+                                 ;; other
+                                 (list ".*deepspec.lists.cs.princeton.edu" "l.deepspec")
+                                 (list ".*notmuch.notmuchmail.org" "l.notmuch")
+                                 (list ".*dev.lists.parabola.nu" "l.parabola.dev")
+                                 ;; *@lists.sr.ht
+                                 (list ".*~bandali/public-inbox@lists.sr.ht" "l.~bandali.public-inbox")
+                                 (list ".*~sircmpwn/sr.ht-admins@lists.sr.ht" "l.~sircmpwn.srht.admins")
+                                 (list ".*~sircmpwn/sr.ht-announce@lists.sr.ht" "l.~sircmpwn.srht.announce")
+                                 (list ".*~sircmpwn/sr.ht-dev@lists.sr.ht" "l.~sircmpwn.srht.dev")
+                                 (list ".*~sircmpwn/sr.ht-discuss@lists.sr.ht" "l.~sircmpwn.srht.discuss")
+                                 "INBOX")))
      (nnimap "uw"
              (nnimap-stream plain)
              (nnimap-address "127.0.0.1")
@@ -1548,9 +1592,6 @@ For disabling the behaviour for certain buffers and/or modes."
       (to-address . "deepspec@lists.cs.princeton.edu")
       (to-list    . "deepspec@lists.cs.princeton.edu")
       (list-identifier . "\\[deepspec\\]"))
-     ("gnu\\.emacs-devel"
-      (to-address . "emacs-devel@gnu.org")
-      (to-list    . "emacs-devel@gnu.org"))
      ("l\\.gnu\\.emacs\\.devel"
       (to-address . "emacs-devel@gnu.org")
       (to-list    . "emacs-devel@gnu.org"))
@@ -1655,6 +1696,8 @@ For disabling the behaviour for certain buffers and/or modes."
   (require 'ebdb-mua)
   (require 'ebdb-gnus)
 
+  (gnus-registry-initialize)
+
   (with-eval-after-load 'recentf
     (add-to-list 'recentf-exclude gnus-home-directory)))
 
@@ -1714,13 +1757,13 @@ https://csclub.uwaterloo.ca/~abandali/")
            (address "amin@bndl.org")
            (body "\nBest,\n")
            (eval (setq a/message-cite-say-hi t)))
-          ("gnu.*"
+          ("nnimap\\+gnu:.*"
            (address "bandali@gnu.org")
            (signature a/gnu-signature)
            (eval (set (make-local-variable 'message-user-fqdn) "fencepost.gnu.org")))
           ((header "subject" "ThankCRM")
            (to "webmasters-comment@gnu.org")
-           (body "Added  to 2019supporters.html.\n\nMoving to campaigns.\n\n-amin\n")
+           (body "Added  to 2019supporters.html.\n\nMoving to campaigns.\n")
            (eval (setq a/message-cite-say-hi nil)))
           ("nnimap\\+uw:.*"
            (address "abandali@uwaterloo.ca")