(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))))
#+END_SRC
-* Add melpa, and reduce the declarations by setting defaults
+* Packages
+** Add melpa, and reduce the declarations by setting defaults
#+BEGIN_SRC emacs-lisp
(require 'package)
(setq use-package-always-ensure t
use-package-always-defer t)
#+END_SRC
-* Corfu
+** Corfu
#+BEGIN_SRC emacs-lisp
(use-package corfu
:demand
: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
:config
(global-page-break-lines-mode))
#+END_SRC
-* AucTeX and pdftools
+** AucTeX and pdftools
Make AucTeX use pdftools, prompt for master file, synctex, etc. Be sure to run =pdf-tools-install= before first use.
#+BEGIN_SRC emacs-lisp
(use-package pdf-tools)
(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
(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."
("]" . (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
(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
(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
: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))
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
org-clock-report-include-clocking-task t
org-time-stamp-rounding-minutes '(1 1))
#+END_SRC
-*** Agenda and Capture
-**** Agenda settings
+**** Agenda and Capture
+***** Agenda settings
#+BEGIN_SRC emacs-lisp
(add-hook 'org-agenda-mode-hook #'hl-line-mode)
org-log-state-notes-insert-after-drawers t
org-log-state-notes-into-drawer nil)
#+END_SRC
-**** Custom Agendas
+***** Custom Agendas
#+BEGIN_SRC emacs-lisp
(defvar *re/org-agenda-inbox*
'(tags "inbox" ((org-agenda-overriding-header "\nINBOX:"))))
,,*re/org-agenda-undertakings*
,,*re/org-agenda-waiting*))))
#+END_SRC
-**** Capture Templates
+***** Capture Templates
#+BEGIN_SRC emacs-lisp
(setq org-capture-templates '(("i" "Inbox" entry
(file "gtd.org")
: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
(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"
(add-to-list 'auto-mode-alist '("\\.org_keep\\'" . org-mode))
#+END_SRC
-*** Converting markdown to org
+**** Converting markdown to org
#+BEGIN_SRC emacs-lisp
(defun re/markdown-to-org-region (start end)
"Convert Markdown formatted text in region (START, END) to Org.
start end
"pandoc -f markdown -t org --wrap=preserve" t t))
#+END_SRC
-*** Converting org to markdown
+**** Converting org to markdown
#+BEGIN_SRC emacs-lisp
(defun re/org-to-markdown-region (start end)
"Convert Org formatted text in region (START, END) to Markdown.
start end
"pandoc -f org -t markdown --wrap=preserve" t t))
#+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
("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"
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 ()
(add-hook howm-mode-hook 'howm-mode-set-buffer-name))
#+END_SRC
-* Trashed
+** Trashed
Shows the trash file as a dired buffer
#+BEGIN_SRC emacs-lisp
(use-package trashed
trashed-sort-key '("Date deleted" . t)
trashed-date-format "%Y-%m-%d %H:%M:%S"))
#+END_SRC
-* Use mu4e on my home pcs
+** Use mu4e on my home pcs
#+BEGIN_SRC emacs-lisp
(unless (equal system-type 'windows-nt)
(use-package mu4e