]> git.earman.xyz Git - emacsinit.git/commitdiff
Re-arrange
authorrearman <rearman@r717.net>
Fri, 8 May 2026 21:09:37 +0000 (17:09 -0400)
committerrearman <rearman@r717.net>
Fri, 8 May 2026 21:09:37 +0000 (17:09 -0400)
Bring out package headers to main level, set some org babel settings

README.org

index 8878ef647cc08346aa11e8c4332de90a23a52e90..4f1fa0661c9e661e1d46c2af8663176c4a6663eb 100644 (file)
@@ -37,7 +37,6 @@
 
 #+END_SRC
 * Packages
-** Boilerplate
 Add melpa, and reduce the declarations by setting defaults
 #+BEGIN_SRC emacs-lisp
 (require 'package)
@@ -47,7 +46,7 @@ Add melpa, and reduce the declarations by setting defaults
 (setq use-package-always-ensure t
       use-package-always-defer t)
 #+END_SRC
-** Corfu
+* Corfu
 #+BEGIN_SRC emacs-lisp
 (use-package corfu
   :demand
@@ -72,19 +71,19 @@ Add melpa, and reduce the declarations by setting defaults
   :config
   (corfu-popupinfo-mode))
 #+END_SRC
-** Expand Region
+* Expand Region
 #+BEGIN_SRC emacs-lisp
 (use-package expand-region
   :bind
   (("C-=" . er/expand-region)))
 #+END_SRC
-** Aggressive Indent
+* Aggressive Indent
 #+BEGIN_SRC emacs-lisp
 (use-package aggressive-indent)
 #+END_SRC
-** Magit
+* Magit
 No longer needed, since I defer by default.
-** Page Break Lines
+* Page Break Lines
 Needs to be demanded so I don't have to manually load it
 #+BEGIN_SRC emacs-lisp
 (use-package page-break-lines
@@ -93,7 +92,7 @@ Needs to be demanded so I don't have to manually load it
   :config
   (global-page-break-lines-mode))
 #+END_SRC
-** AucTeX and pdftools
+* AucTeX and pdftools
 Make AucTeX use pdftools, prompt for master file, synctex, etc.
 #+BEGIN_SRC emacs-lisp
 (use-package pdf-tools)
@@ -109,14 +108,14 @@ Make AucTeX use pdftools, prompt for master file, synctex, etc.
   (add-hook 'TeX-after-compilation-finished-functions
            #'TeX-revert-document-buffer))
 #+END_SRC
-** CSV Mode
+* CSV Mode
 #+BEGIN_SRC emacs-lisp
 (use-package csv-mode
   :config
   (add-hook 'csv-mode-hook 'csv-align-mode))
 
 #+END_SRC
-** Markdown Mode
+* Markdown Mode
 Make markdown act more like org when I'm forced to use it
 #+BEGIN_SRC emacs-lisp
 (use-package markdown-mode
@@ -136,7 +135,7 @@ Make markdown act more like org when I'm forced to use it
 
 (use-package edit-indirect :after 'markdown-mode)
 #+END_SRC
-** Sly
+* Sly
 #+BEGIN_SRC emacs-lisp
   (defun re/sly-repl-new-frame (&optional arg)
     "Start a SLY repl in a new frame."
@@ -167,7 +166,7 @@ Make markdown act more like org when I'm forced to use it
        ("]" . (lambda () (interactive) (re/balance-and-eval-sexp #'sly-mrepl-return)))
        ("C-c q" . re/sly-quit-current-lisp)))
 #+END_SRC
-*** Eldoc settings
+** Eldoc settings
 Sly really doesn't play well with elodc in the minibuffer, so here are some settings to make it better.
 #+BEGIN_SRC emacs-lisp
 (add-to-list 'display-buffer-alist
@@ -177,7 +176,7 @@ Sly really doesn't play well with elodc in the minibuffer, so here are some sett
 (keymap-global-set "C-c d" #'eldoc) ; force eldoc to show in minibuffer
 (keymap-global-set "C-c D" #'eldoc-doc-buffer) ; open eldoc buffer when it's getting spammed
 #+END_SRC
-** Geiser
+* Geiser
 #+BEGIN_SRC emacs-lisp
   (use-package geiser
     :config
@@ -194,13 +193,13 @@ Sly really doesn't play well with elodc in the minibuffer, so here are some sett
 
   (use-package geiser-chicken :after 'geiser)
 #+END_SRC
-** Forth
-*** TODO Try out this mode for gforth
+* Forth
+** TODO Try out this mode for gforth
 #+BEGIN_SRC emacs-lisp
 (use-package forth-mode)
 #+END_SRC
-** ORG
-*** Load in the package and set bindings
+* ORG
+** Load in the package and set bindings
 #+BEGIN_SRC emacs-lisp
   (use-package org
     :config
@@ -232,13 +231,13 @@ Sly really doesn't play well with elodc in the minibuffer, so here are some sett
     :bind
     (("C-c t" . org-transclusion-mode)))
 #+END_SRC
-*** Configuration
-**** General options
+** Configuration
+*** General options
 #+BEGIN_SRC emacs-lisp
   (with-eval-after-load 'org-mode (add-to-list 'org-export-backends 'md))
 
-  (setq org-startup-indented t
-       org-indent-indentation-per-level tab-width
+  (setq org-startup-indented nil
+       org-indent-indentation-per-level 1
        org-startup-folded 'fold
        org-startup-with-inline-images t
        org-cycle-inline-images-display t
@@ -263,9 +262,11 @@ Sly really doesn't play well with elodc in the minibuffer, so here are some sett
        org-special-ctrl-a/e t
        org-special-ctrl-k t
        org-return-follows-link t
-       org-yank-adjusted-subtrees t)
+       org-yank-adjusted-subtrees t
+       org-src-window-setup 'current-window
+       org-src-preserve-indentation t)
 #+END_SRC
-**** Time Clocking
+*** Time Clocking
 #+BEGIN_SRC emacs-lisp
 (org-clock-persistence-insinuate)
 (setq org-clock-history-length 10
@@ -276,7 +277,7 @@ Sly really doesn't play well with elodc in the minibuffer, so here are some sett
       org-clock-report-include-clocking-task t
       org-time-stamp-rounding-minutes '(1 1))
 #+END_SRC
-**** Agenda and Capture
+*** Agenda and Capture
 #+BEGIN_SRC emacs-lisp
 (add-hook 'org-agenda-mode-hook #'hl-line-mode)
 
@@ -357,7 +358,7 @@ Sly really doesn't play well with elodc in the minibuffer, so here are some sett
                               :clock-in t
                               :clock-resume t)))
 #+END_SRC
-**** IDs
+*** IDs
 #+BEGIN_SRC emacs-lisp
 (setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id
       org-id-method 'ts
@@ -382,7 +383,7 @@ Sly really doesn't play well with elodc in the minibuffer, so here are some sett
 
 (advice-add 'org-refile :after (lambda (&rest _) (re/org-save-all)))
 #+END_SRC
-**** Archiving
+*** Archiving
 #+BEGIN_SRC emacs-lisp
 (defun re/org-archive-all ()
   "Archive all tasks marked `DONE' in agenda files"
@@ -402,9 +403,9 @@ Sly really doesn't play well with elodc in the minibuffer, so here are some sett
 
 (add-to-list 'auto-mode-alist '("\\.org_keep\\'" . org-mode))
 #+END_SRC
-** HOWM
+* HOWM
 On-again, off-again relationship with this one
-*** Load package and add bindings
+** Load package and add bindings
 #+BEGIN_SRC emacs-lisp
   (use-package howm
     :bind
@@ -414,66 +415,67 @@ On-again, off-again relationship with this one
      ("C-c , k" . re/howm-create-keyword)
      ("C-c , =" . howm-narrow-to-memo)))
 #+END_SRC
-*** Config
-**** General settings
+** Config
+*** General settings
 #+BEGIN_SRC emacs-lisp
-  (setq howm-template '("= %title%cursor #inbox\n%date %file\n\n"
-                            "= %title%cursor #meeting\n%date %file\n\nAttendees: \n"
-                            "= @%title%cursor\n%date %file\n\n")
-       howm-keyword-file "~/howm/.howm-keys"
-       howm-history-file "~/howm/.howm-history"
-       howm-menu-file "~/.emacs.d/0000-00-00-000000.txt"
-       howm-file-name-format "%Y%m%dT%H%M%S.txt"
-       howm-keyword-case-fold-search t
-       howm-remember-insertion-format "%s"
-       howm-menu-todo-num 10)
-
-  (defun re/howm-menu-new-frame (&optional arg)
-    "Show the howm menu in a new frame"
-    (interactive "P")
-    (re/open-with-new-frame "HOWM" #'howm-menu))
+(setq howm-template '("= %title%cursor #inbox\n%date %file\n\n"
+                     "= %title%cursor #meeting\n%date %file\n\nAttendees: \n"
+                     "= @%title%cursor\n%date %file\n\n")
+      howm-keyword-file "~/howm/.howm-keys"
+      howm-history-file "~/howm/.howm-history"
+      howm-menu-file "~/.emacs.d/0000-00-00-000000.txt"
+      howm-file-name-format "%Y%m%dT%H%M%S.txt"
+      howm-keyword-case-fold-search t
+      howm-remember-insertion-format "%s"
+      howm-menu-todo-num 10)
+
+(defun re/howm-menu-new-frame (&optional arg)
+  "Show the howm menu in a new frame"
+  (interactive "P")
+  (re/open-with-new-frame "HOWM" #'howm-menu))
 
-  (defun re/howm-create-keyword ()
-    "Reads a keyword from the minibuffer and appends it to the keywords file."
-    (interactive)
-    (append-to-file (concat (read-string "New Keyword: ")
-                               "\n")
-                       nil
-                       howm-keyword-file))
+(defun re/howm-create-keyword ()
+  "Reads a keyword from the minibuffer and appends it to the keywords file."
+  (interactive)
+  (append-to-file (concat (read-string "New Keyword: ")
+                         "\n")
+                 nil
+                 howm-keyword-file
+                 "\n"))
 #+END_SRC
-**** Menu config
+*** Menu config
 #+BEGIN_SRC emacs-lisp
-  ;; add entries in howm-menu (press enter on the text)
-  (defun re/howm-menu-legend ()
-    (cl-labels ((p (text face) (propertize text 'font-lock-face face)))
-      (concat (format "Top %s" howm-menu-todo-num)
-             " "
-             (p "!Deadline" howm-reminder-deadline-face)
-             "/"
-             (p "+ToDo" howm-reminder-todo-face)
-             "/"
-             (p "@Schedule" howm-reminder-schedule-face)
-             "/"
-             (p "~Defer" howm-reminder-defer-face)
-             "/"
-             (p "-Reminder" howm-reminder-normal-face)
-             " Entries:")))
-
-  (with-eval-after-load 'howm
-    (dolist (aldr-additions '(("\\[Mtg\\]" (lambda (&optional dummy) (howm-create 2)))
-                             ("\\[Person\\]" (lambda (&optional dummy) (howm-create 3)))))
-      (add-to-list 'action-lock-default-rules aldr-additions t))
-    (add-to-list 'howm-menu-allow 're/howm-menu-legend)
-    ;; add coloring for custom "waiting" state
-    (add-to-list 'howm-reminder-font-lock-keywords
-                `(,(howm-reminder-regexp "[w]") (0 howm-reminder-defer-face prepend))
-                t))
-
-  (dolist (hooks '(after-save-hook howm-mode-hook))
-    (add-hook hooks 'howm-mode-set-buffer-name))
+;; add entries in howm-menu (press enter on the text)
+(defun re/howm-menu-legend ()
+  (cl-labels ((p (text face) (propertize text 'font-lock-face face)))
+    (concat (format "Top %s" howm-menu-todo-num)
+           " "
+           (p "!Deadline" howm-reminder-deadline-face)
+           "/"
+           (p "+ToDo" howm-reminder-todo-face)
+           "/"
+           (p "@Schedule" howm-reminder-schedule-face)
+           "/"
+           (p "~Defer" howm-reminder-defer-face)
+           "/"
+           (p "-Reminder" howm-reminder-normal-face)
+           " Entries:")))
+
+(with-eval-after-load 'howm
+  (dolist (aldr-additions '(("\\[Mtg\\]" (lambda (&optional dummy) (howm-create 2)))
+                           ("\\[Person\\]" (lambda (&optional dummy) (howm-create 3)))))
+    (add-to-list 'action-lock-default-rules aldr-additions t))
+  (add-to-list 'howm-menu-allow 're/howm-menu-legend)
+  ;; add coloring for custom "waiting" state
+  (add-to-list 'howm-reminder-font-lock-keywords
+              `(,(howm-reminder-regexp "[w]") (0 howm-reminder-defer-face prepend))
+              t))
+
+(dolist (hooks '(after-save-hook howm-mode-hook))
+  (add-hook hooks 'howm-mode-set-buffer-name))
 #+END_SRC
 
-** Trashed
+* Trashed
 Shows the trash file as a dired buffer
 #+BEGIN_SRC emacs-lisp
 (use-package trashed