[emacs] don’t show compilation window in amin/async-babel-tangle
[~bandali/configs] / init.org
index da1d297..cd210db 100644 (file)
--- a/init.org
+++ b/init.org
@@ -65,7 +65,7 @@ make build
 ** First line
 
 #+begin_src emacs-lisp :comments none
-;;; init.el --- Amin Bandali's Emacs config -*- lexical-binding: t ; eval: (view-mode 1)-*-
+;;; init.el --- Amin Bandali's Emacs config -*- lexical-binding: t; eval: (view-mode 1) -*-
 #+end_src
 
 Enable =view-mode=, which both makes the file read-only (as a reminder
@@ -113,7 +113,6 @@ The conventions below were inspired by [[https://github.com/hlissner/doom-emacs]
 ;;   amin-...   public variables or non-interactive functions
 ;;   amin--...  private anything (non-interactive), not safe for direct use
 ;;   amin/...   an interactive function; safe for M-x or keybinding
-;;   amin:...   an evil operator, motion, or command
 ;;   amin|...   a hook function
 ;;   amin*...   an advising function
 ;;   amin@...   a hydra command
@@ -125,10 +124,6 @@ The conventions below were inspired by [[https://github.com/hlissner/doom-emacs]
 :CUSTOM_ID: initial-setup
 :END:
 
-#+begin_src emacs-lisp :comments none
-;;; Code:
-#+end_src
-
 ** Emacs initialization
 
 I'd like to do a couple of measurements of Emacs' startup time. First,
@@ -379,7 +374,7 @@ See [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.htm
 Font stack with better unicode support, around =Ubuntu Mono= and
 =Hack=.
 
-#+begin_src emacs-lisp :tangle no
+#+begin_src emacs-lisp
 (dolist (ft (fontset-list))
   (set-fontset-font
    ft
@@ -651,7 +646,7 @@ Enable =winner-mode=.
 (winner-mode 1)
 #+end_src
 
-*** Close =*compilation*= on success
+*** COMMENT Close =*compilation*= on success
 
 #+begin_src emacs-lisp
 (setq compilation-exit-message-function
@@ -832,7 +827,8 @@ file.
                                                                   ',file-tangle-start-time)))
                              ""))
                   (when amin-async-tangle-post-compile
-                    (compile amin-async-tangle-post-compile)))
+                    (save-window-excursion
+                      (compile amin-async-tangle-post-compile))))
               (message "Tangling %s failed" ,file-nodir))))))))
 
 (add-to-list
@@ -1123,15 +1119,6 @@ TODO: break this giant source block down into individual org sections.
   (add-to-list 'tramp-default-proxies-alist
                (list (regexp-quote (system-name)) nil nil)))
 
-(use-package undo-tree
-  :config
-  (global-undo-tree-mode -1))
-  ;; :bind (("C-?" . undo-tree-undo)
-  ;;        ("M-_" . undo-tree-redo))
-  ;; :config
-  ;; (global-undo-tree-mode)
-  ;; (setq undo-tree-mode-lighter ""
-  ;;       undo-tree-auto-save-history t))
 #+end_src
 
 * Editing
@@ -1156,6 +1143,7 @@ TODO: break this giant source block down into individual org sections.
 #+end_src
 
 * Syntax and spell checking
+
 #+begin_src emacs-lisp
 (use-package flycheck
   :defer 3
@@ -1468,19 +1456,11 @@ instead.
   :hook (web-mode css-mode html-mode sgml-mode))
 #+end_src
 
-** Nix
-
-#+begin_src emacs-lisp
-(use-package nix-mode
-  :defer t
-  :mode "\\.nix\\'")
-#+end_src
-
-** Java
+** COMMENT Java
 
 *** meghanada
 
-#+begin_src emacs-lisp :tangle no
+#+begin_src emacs-lisp
 (use-package meghanada
   :bind
   (:map meghanada-mode-map
@@ -1507,7 +1487,7 @@ tree-mode
 treemacs
 #+end_comment
 
-#+begin_src emacs-lisp :tangle no
+#+begin_src emacs-lisp
 (use-package treemacs
   :config (setq treemacs-never-persist t))
 
@@ -1557,6 +1537,23 @@ treemacs
   :after (treemacs))
 #+end_src
 
+** geiser
+
+#+begin_src emacs-lisp
+(use-package geiser)
+
+(use-package geiser-guile
+  :config
+  (setq geiser-guile-load-path "~/src/git/guix"))
+#+end_src
+
+** guix
+
+#+begin_src emacs-lisp
+(use-package guix
+  :load-path "lib/guix/elisp")
+#+end_src
+
 * Emacs Enhancements
 
 ** [[https://github.com/justbur/emacs-which-key][which-key]]
@@ -1578,13 +1575,12 @@ Emacs package that displays available keybindings in popup
 (load-theme 'tangomod t)
 #+end_src
 
-** doom-modeline
+** smart-mode-line
 
 #+begin_src emacs-lisp
-(use-package doom-modeline
-  :demand t
-  :config (setq doom-modeline-height 32)
-  :hook (after-init . doom-modeline-init))
+(use-package smart-mode-line
+  :config
+  (sml/setup))
 #+end_src
 
 ** doom-themes
@@ -1599,16 +1595,16 @@ Emacs package that displays available keybindings in popup
 (defun amin/lights-on ()
   "Enable my favourite light theme."
   (interactive)
-  (progn
-    (mapc #'disable-theme custom-enabled-themes)
-    (load-theme 'tangomod t)))
+  (mapc #'disable-theme custom-enabled-themes)
+  (load-theme 'tangomod t)
+  (sml/apply-theme 'automatic))
 
 (defun amin/lights-off ()
   "Go dark."
   (interactive)
-  (progn
-    (mapc #'disable-theme custom-enabled-themes)
-    (load-theme 'doom-tomorrow-night t)))
+  (mapc #'disable-theme custom-enabled-themes)
+  (load-theme 'doom-tomorrow-night t)
+  (sml/apply-theme 'automatic))
 
 (bind-keys
  ("s-t d" . amin/lights-off)
@@ -1773,7 +1769,7 @@ Make =*scratch*= and =*Messages*= unkillable.
 
 Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]].
 
-** COMMENT [[https://github.com/DarthFennec/highlight-indent-guides][highlight-indent-guides]]                                 :ARCHIVE:
+** COMMENT [[https://github.com/DarthFennec/highlight-indent-guides][highlight-indent-guides]]
 
 #+begin_src emacs-lisp
 (use-package highlight-indent-guides
@@ -1809,12 +1805,6 @@ Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]].
         ("l"   . image-forward-hscroll)))
 #+end_src
 
-** anzu
-
-#+begin_src emacs-lisp
-(use-package anzu)
-#+end_src
-
 ** typo.el
 
 #+begin_src emacs-lisp
@@ -1865,7 +1855,7 @@ Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]].
         ""))))
 #+end_src
 
-** COMMENT slack                                                   :ARCHIVE:
+** COMMENT slack
 
 Hopefully temporary.
 
@@ -1930,18 +1920,6 @@ Hopefully temporary.
   (setq alert-default-style 'notifier))
 #+end_src
 
-** COMMENT magithub                                                :ARCHIVE:
-
-For when I /have to/ use GH.
-
-#+begin_src emacs-lisp
-(use-package magithub
-  :after magit
-  :config
-  (magithub-feature-autoinject t)
-  (setq magithub-clone-default-directory "~/src/git"))
-#+end_src
-
 ** [[https://github.com/peterwvj/eshell-up][eshell-up]]
 
 #+begin_src emacs-lisp
@@ -1954,9 +1932,9 @@ For when I /have to/ use GH.
 #+begin_src emacs-lisp
 (use-package multi-term
   :defer 1
-  :bind (("C-c C-j" . term-line-mode)
-         ("C-c m m" . multi-term)
-         ("C-c m p" . multi-term-dedicated-toggle))
+  :bind (("C-c C-j"     . term-line-mode)
+         ("C-c a s m m" . multi-term)
+         ("C-c a s m p" . multi-term-dedicated-toggle))
   :config
   (setq multi-term-program "/bin/screen"
         ;; TODO: add separate bindings for connecting to existing
@@ -1982,6 +1960,14 @@ For when I /have to/ use GH.
         '("C-z" "C-x" "C-c" "C-h" "C-y" "<ESC>")))
 #+end_src
 
+** page-break-lines
+
+#+begin_src emacs-lisp
+(use-package page-break-lines
+  :config
+  (global-page-break-lines-mode))
+#+end_src
+
 * Email
 
 #+begin_src emacs-lisp
@@ -1999,8 +1985,10 @@ For when I /have to/ use GH.
  read-mail-command   'gnus)
 
 (use-package gnus
-  :bind (("s-m" . gnus)
-         ("s-M" . gnus-unplugged))
+  :bind (("C-c m" . gnus)
+         ("C-c M" . gnus-unplugged)
+         ("s-m"   . gnus)
+         ("s-M"   . gnus-unplugged))
   :init
   (setq
    gnus-select-method '(nnnil "")
@@ -2248,6 +2236,7 @@ I tried using =borg-elpa= instead of doing it like this, but it added
 #+end_src
 
 * Blogging
+
 ** [[https://ox-hugo.scripter.co][ox-hugo]]
 
 #+begin_src emacs-lisp
@@ -2283,4 +2272,5 @@ Display how long it took to load the init file.
 * COMMENT Local Variables                                           :ARCHIVE:
 # Local Variables:
 # eval: (add-hook 'after-save-hook #'amin/async-babel-tangle 'append 'local)
+# eval: (typo-mode -1)
 # End: