diff --git a/config.org b/config.org index 08beb86..549b0aa 100644 --- a/config.org +++ b/config.org @@ -36,23 +36,13 @@ Relative line numbers don't seem to work, because of folding in Org-mode. #+begin_src emacs-lisp (setq doom-theme 'doom-xcode) (setq doom-font (font-spec :family "Hack Nerd Font Mono" :size 16 :weight 'medium)) - (setq auto-save-default nil) ;I don't like autosaving. Let me do it myself. -#+end_src - -#+RESULTS: - -** Doom splash screen -I really don't like the widgets, and I think it takes longer to load so I get rid of them -#+begin_src emacs-lisp (remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu) (remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer) +(setq fancy-splash-image (concat doom-private-dir "emacs.png")) +(add-hook 'term-mode-hook 'hide-mode-line-mode) #+end_src -Set a sweet splash image -#+begin_src emacs-lisp -(setq fancy-splash-image (concat doom-private-dir "emacs.png")) -#+end_src * Evil configuration I want a non-ESC way to get back to normal mode: #+begin_src emacs-lisp @@ -62,44 +52,20 @@ I want a non-ESC way to get back to normal mode: (map! :desc "Decrement number below or after cursor" :n "C-x" #'evil-numbers/dec-at-pt) (map! :n "g j" #'evil-next-visual-line) (map! :n "g k" #'evil-previous-visual-line) +(map! + :map org-agenda-keymap + "j" #'evil-next-line + "k" #'evil-previous-line) +(map! + :map org-super-agenda-header-map + "j" #'evil-next-line + "k" #'evil-previous-line) #+end_src * Terminal setup -I like to just use bash: -#+begin_src emacs-lisp -(defun bash nil - "Lauch term with /bin/bash" - (interactive) - (term "/bin/bash")) - -(defun dash nil - "Lauch term with /bin/dash" - (interactive) - (term "/bin/dash")) - -(defun zsh nil - "Lauch term with /bin/zsh" - (interactive) - (term "/bin/zsh")) - -#+end_src - -#+RESULTS: -: zsh - ** Shell mappings #+begin_src emacs-lisp (map! :leader (:prefix ("k" . "shell") - - :desc "Start a bash shell" - :n "b" #'bash - - :desc "Start a dash shell" - :n "d" #'dash - - :desc "Start a zsh shell" - :n "z" #'zsh - :desc "Start an elisp repl" :n "e" #'+emacs-lisp/open-repl @@ -107,44 +73,13 @@ I like to just use bash: :n "j" #'+python/open-repl)) #+end_src -#+RESULTS: - -,#+RESULTS: - -I don't like the modeline in the terminal. -,#+begin_src emacs-lisp -(add-hook 'term-mode-hook 'hide-mode-line-mode) -#+end_src -* Sage-math -#+begin_src emacs-lisp -(use-package! sage-shell-mode - :defer) - -;; Ob-sagemath supports only evaluating with a session. -(setq org-babel-default-header-args:sage '((:session . t) - (:results . "output"))) - -;; C-c c for asynchronous evaluating (only for SageMath code blocks). -(with-eval-after-load "org" - (define-key org-mode-map (kbd "C-c c") 'ob-sagemath-execute-async)) -#+end_src I like to have a shortcut for calc as well, for simpler calculations #+begin_src emacs-lisp (map! :leader :desc "The Emacs Calculator" "C" #'calc) #+end_src -* Beancount -** FavaGTK :outdated: -I want to launch favagtk more easily. Let's do that here: -#+begin_src emacs-lisp -(defun fava () - (interactive) - (async-shell-command "flatpak run org.gnome.gitlab.johannesjh.favagtk")) -(map! :leader - :desc "Start favagtk" - "r b" #'fava) -#+end_src + * Useful Functions ** Get the date from the shell I want to grab the current date and put it in the buffer. @@ -166,9 +101,7 @@ Because I sometimes use Fish or another shell, it's good to make sure bash is ru "m" #'insert-current-date-alt))) #+end_src -#+RESULTS: -: insert-current-date-alt -** Convert regex strings to rx +** Convert regex strings to rx :COMMENT: #+begin_src elisp :tangle packages.el (package! xr) #+end_src @@ -176,9 +109,6 @@ Because I sometimes use Fish or another shell, it's good to make sure bash is ru #+begin_src elisp (use-package! xr) #+end_src -* Creating Diagrams and graphs -** TODO set default values using org-babel's features for that. - * Securing Sensitive Files ** Age.el #+begin_src emacs-lisp :tangle "packages.el" @@ -203,7 +133,7 @@ Because I sometimes use Fish or another shell, it's good to make sure bash is ru :END: This preprocessor script allows me to use Ripgrep with Age to filter agenda files. You can see the configuration for that in [[#agenda-efficient][this section]]. -#+begin_src zsh :tangle "/home/user/age-preprocessor.zsh" +#+begin_src zsh :tangle "/home/judah/age-preprocessor.zsh" #!/usr/bin/env zsh case "$1" in @@ -244,6 +174,7 @@ Emacs has better default values now, so it will ask to evaluate local variables. (setq templates/post-capture-title "#+TITLE: ${title}\n") (setq templates/post-capture-template (concat templates/post-capture-title templates/post-capture-props)) #+end_src + * Org-mode for a great todo list ** Making the Agenda features more efficient Using ripgrep we can automatically narrow org-agenda files. @@ -256,7 +187,7 @@ This piece of code will allow us to capture all the agenda files using the prepr #+begin_src sh :exports code :tangle no rg --type-add 'aorg:*.org.age' \ -torg -taorg \ - --pre ~/age-preprocessor.zsh --pre-glob '*.age' -l TODO /home/user/org + --pre ~/age-preprocessor.zsh --pre-glob '*.age' -l TODO /home/judah/10-19-personal-projects/11-zettelkasten #+end_src Now, of course, this code is not useful as it is--after all, we can't tangle a ~.sh~ script into [[file:config.el]]. @@ -266,13 +197,10 @@ The rubber hits the road here. I'll call that shell command to set the agenda files correctly. #+begin_src emacs-lisp (defun set-org-agenda-files-ripgrep () - (setq org-agenda-files (split-string (shell-command-to-string "rg --type-add \'aorg:*.org.age\' -torg -taorg --pre ~/age-preprocessor.zsh --pre-glob \'*.age\' -l TODO /home/user/org "))) - (setq org-agenda-files (remove "/home/user/org/archive.sec.org.age" org-agenda-files))) + (setq org-agenda-files (split-string (shell-command-to-string "rg --type-add \'aorg:*.org.age\' -torg -taorg --pre ~/age-preprocessor.zsh --pre-glob \'*.age\' -l TODO /home/judah/10-19-personal-projects/11-zettelkasten/"))) + (setq org-agenda-files (remove "/home/judah/10-19-personal-projects/11-zettelkasten/archive.sec.org.age" org-agenda-files))) #+end_src -#+RESULTS: -: set-org-agenda-files-ripgrep - And then we want to call this before building the agenda: #+begin_src emacs-lisp (add-hook 'org-agenda-mode-hook 'set-org-agenda-files-ripgrep) @@ -302,21 +230,8 @@ I don't want scheduled items to duplicate if the deadline is up. #+end_src #+RESULTS: -: ~/org/ +: ~/10-19-personal-projects/11-zettelkasten/ -*** Keymap -#+begin_src emacs-lisp -(map! - :map org-agenda-keymap - "j" #'evil-next-line - "k" #'evil-previous-line) -(map! - :map org-super-agenda-header-map - "j" #'evil-next-line - "k" #'evil-previous-line) -#+end_src - -#+RESULTS: ** Appearances *** Images Preferences @@ -332,7 +247,7 @@ Super-agenda allows many nice configurations to the agenda buffer. #+begin_src emacs-lisp :tangle "packages.el" (package! org-super-agenda) #+end_src -Is it working now? It sure seems to be, so IDK what was up with it earlier. + #+begin_src emacs-lisp (use-package! org-super-agenda :after org-roam @@ -340,60 +255,63 @@ Is it working now? It sure seems to be, so IDK what was up with it earlier. #+end_src +#+RESULTS: +: t + Configure the Super Agenda to neatly organize everything. #+begin_src emacs-lisp (setq org-super-agenda-groups - '(;; Each group has an implicit boolean OR operator between its selectors. + '(;; Each group has an implicit boolean OR operator between its selectors. - (:name "Calendar" - :and (:todo nil :not (:scheduled (before "2024-03-17")) :not (:deadline (before "2024-03-17"))) - :order 10) + (:name "Calendar" + :and (:todo nil :not (:scheduled (before "2024-03-17")) :not (:deadline (before "2024-03-17"))) + :order 10) - (:name "Today" ; Optionally specify section name - :time-grid t ; Items that appear on the time grid - :todo "TODAY") ; Items that have this TODO keyword + (:name "Today" ; Optionally specify section name + :time-grid t ; Items that appear on the time grid + :todo "TODAY") ; Items that have this TODO keyword - (:name "Important" - ;; Single arguments given alone - :tag "bills" - :priority<= "A") - (:name "Active Projects" - :and (:todo "PROJ" - :not (:scheduled (after "2024-03-17")) - :deadline (after "2024-03-17"))) + (:name "Important" + ;; Single arguments given alone + :tag "bills" + :priority<= "A") + (:name "Active Projects" + :and (:todo "PROJ" + :not (:scheduled (after "2024-03-17")) + :deadline (after "2024-03-17"))) - (:name "School" - :tag "school" ) + (:name "School" + :tag "school" ) - ;; Set order of multiple groups at once - (:order-multi (2 (:name "Shopping in town" - ;; Boolean AND group matches items that match all subgroups - :and (:tag "shopping" :tag "@town")) - (:name "Food-related" - ;; Multiple args given in list with implicit OR - :tag ("food" "dinner")) - (:name "Habits" - :habit t - :tag "personal") - (:name "Space-related (non-moon-or-planet-related)" - ;; Regexps match case-insensitively on the entire entry - :and (:regexp ("space" "NASA") - ;; Boolean NOT also has implicit OR between selectors - :not (:regexp "moon" :tag "planet"))))) - ;; Groups supply their own section names when none are given - (:todo "WAITING" :order 8) ; Set order of this section - (:todo ("SOMEDAY" "TO-READ" "CHECK" "TO-WATCH" "WATCHING") - ;; Show this group at the end of the agenda (since it has the - ;; highest number). If you specified this group last, items - ;; with these todo keywords that e.g. have priority A would be - ;; displayed in that group instead, because items are grouped - ;; out in the order the groups are listed. - :order 9) - (:priority<= "B" - ;; Show this section after "Today" and "Important", because - ;; their order is unspecified, defaulting to 0. Sections - ;; are displayed lowest-number-first. - :order 1))) + ;; Set order of multiple groups at once + (:order-multi (2 (:name "Shopping in town" + ;; Boolean AND group matches items that match all subgroups + :and (:tag "shopping" :tag "@town")) + (:name "Food-related" + ;; Multiple args given in list with implicit OR + :tag ("food" "dinner")) + (:name "Habits" + :habit t + :tag "personal") + (:name "Space-related (non-moon-or-planet-related)" + ;; Regexps match case-insensitively on the entire entry + :and (:regexp ("space" "NASA") + ;; Boolean NOT also has implicit OR between selectors + :not (:regexp "moon" :tag "planet"))))) + ;; Groups supply their own section names when none are given + (:todo "WAITING" :order 8) ; Set order of this section + (:todo ("SOMEDAY" "TO-READ" "CHECK" "TO-WATCH" "WATCHING") + ;; Show this group at the end of the agenda (since it has the + ;; highest number). If you specified this group last, items + ;; with these todo keywords that e.g. have priority A would be + ;; displayed in that group instead, because items are grouped + ;; out in the order the groups are listed. + :order 9) + (:priority<= "B" + ;; Show this section after "Today" and "Important", because + ;; their order is unspecified, defaulting to 0. Sections + ;; are displayed lowest-number-first. + :order 1))) #+end_src ** org-edna @@ -410,11 +328,11 @@ Edna allows better dependency handling for todos and the like. #+begin_src emacs-lisp (use-package org-habit -:custom -(org-habit-graph-column 1) -(org-habit-preceding-days 10) -(org-habit-following-days 1) -(org-habit-show-habits-only-for-today t)) + :custom + (org-habit-graph-column 1) + (org-habit-preceding-days 10) + (org-habit-following-days 1) + (org-habit-show-habits-only-for-today t)) #+end_src @@ -431,7 +349,7 @@ Inline anki is far better for small cards, and where it is best to maintain a /s #+begin_src emacs-lisp :tangle packages.el (package! asyncloop) (package! inline-aki - :recipe (:host github :repo "meedstrom/inline-anki")) + :recipe (:host github :repo "meedstrom/inline-anki")) #+end_src #+begin_src emacs-lisp @@ -457,20 +375,12 @@ This is okay, but I'd rather find something that isn't already used. #+end_src * Programming Items -** Editorconfig -I need to make sure some different files work with -#+begin_src emacs-lisp -(after! editorconfig-mode -(add-to-list 'editorconfig-mode-alist - '(cpp-mode . "cpp"))) -#+end_src ** LSP In order for editorconfig to do its thing, indentation by the lsp must be disabled. #+begin_src emacs-lisp (setq lsp-enable-indentation nil) #+end_src emacs-lisp - * Website ** Capture template #+begin_src emacs-lisp @@ -479,17 +389,12 @@ In order for editorconfig to do its thing, indentation by the lsp must be disabl (setq templates/post-capture-template (concat templates/post-capture-title templates/post-capture-props)) #+end_src - -** Hugo base directory -#+begin_src emacs-lisp -(setq org-hugo-base-dir (concat org-directory (file-name-as-directory "website"))) -(setq org-hugo-default-section-directory "posts") -#+end_src -* Crafting a Writing Environment +* Crafting a Writing Environment :export: For writing I like to automate as much as possible. This means creating an environment that does citations and such /for/ me. ** Export settings -*** Ox-latex +*** \LaTeX +**** Ox-latex #+begin_src emacs-lisp (after! org ;; Import ox-latex to get org-latex-classes and other funcitonality @@ -507,17 +412,17 @@ This means creating an environment that does citations and such /for/ me. (setq org-latex-classes nil)))) #+end_src -*** Lualatex as PDF Processor +**** Lualatex as PDF Processor I've found that lualatex does a good job processing PDFs. $hi$ #+begin_src emacs-lisp (after! ox-latex (setq org-latex-pdf-process - '("lualatex --output-directory=/home/user/Documents -shell-escape -interaction nonstopmode %f" - "lualatex --output-directory=/home/user/Documents -shell-escape -interaction nonstopmode %f"))) + '("lualatex --output-directory=%o -shell-escape -interaction nonstopmode %f" + "lualatex --output-directory=%o -shell-escape -interaction nonstopmode %f"))) #+end_src #+RESULTS: -| lualatex --output-directory=/home/user/Documents -shell-escape -interaction nonstopmode %f | lualatex --output-directory=/home/user/Documents -shell-escape -interaction nonstopmode %f | +| lualatex --output-directory=/home/judah/Documents -shell-escape -interaction nonstopmode %f | lualatex --output-directory=/home/judah/Documents -shell-escape -interaction nonstopmode %f | $x + 1 = 3$ #+RESULTS: @@ -614,12 +519,8 @@ $x + 1 = 3$ #+end_src -#+RESULTS: -| mcdowellcv | \documentclass[]{mcdowellcv} | - -*** COMMENT Fixing dvipng image handling +**** COMMENT Fixing dvipng image handling #+begin_src emacs-lisp - (defun +org-refresh-latex-images-previews-h () (dolist (buffer (doom-buffers-in-mode 'org-mode (buffer-list))) (with-current-buffer buffer @@ -630,38 +531,8 @@ $x + 1 = 3$ (add-hook 'doom-load-theme-hook #'+org-refresh-latex-images-previews-h) #+end_src -*** Export Function -#+begin_src emacs-lisp -(defun eww-open-this-file () - (set 'directory (file-name-directory buffer-file-name)) - (set 'filename (file-name-sans-extension buffer-file-name)) - (set 'extension ".html") - (set 'filename (format "%s%s" filename extension)) - (eww-open-file filename) - (evil-window-left) -) -(defun org-export-and-open-eww () - "Export current file to html and open in eww" - (interactive) - - (org-html-export-to-html) - (if (equal (file-name-extension buffer-file-name) "org") - (eww-open-this-file) - (message "Failed") - ) -) -#+end_src - -We'll want a handy shortcut for this. -#+begin_src emacs-lisp - (map! :leader - :desc "Export to html and diplay with eww" - "r E" #'org-export-and-open-eww) -#+end_src -#+RESULTS: -: /home/user/.config/doom/ -*** Delete links from inline anki +**** Delete links from inline anki #+begin_src elisp (defun inline-anki-link-filter (link backend info) "Rewrite links in export to preserve link text only" @@ -676,7 +547,7 @@ We'll want a handy shortcut for this. #+begin_src elisp (add-to-list 'org-export-filter-link-functions - 'inline-anki-link-filter) + 'inline-anki-link-filter) #+end_src @@ -719,50 +590,50 @@ First of all, we must configure citar. *** Icons for some prettification #+begin_src emacs-lisp (after! citar - (setq citar-indicator-files-icons - (citar-indicator-create - :symbol (nerd-icons-faicon - "nf-fa-file_o" - :face 'nerd-icons-green - :v-adjust -0.1) - :function #'citar-has-files - :padding " " ; need this because the default padding is too low for these icons - :tag "has:files")) + (setq citar-indicator-files-icons + (citar-indicator-create + :symbol (nerd-icons-faicon + "nf-fa-file_o" + :face 'nerd-icons-green + :v-adjust -0.1) + :function #'citar-has-files + :padding " " ; need this because the default padding is too low for these icons + :tag "has:files")) - (setq citar-indicator-links-icons - (citar-indicator-create - :symbol (nerd-icons-faicon - "nf-fa-link" - :face 'nerd-icons-orange - :v-adjust 0.01) - :function #'citar-has-links - :padding " " - :tag "has:links")) + (setq citar-indicator-links-icons + (citar-indicator-create + :symbol (nerd-icons-faicon + "nf-fa-link" + :face 'nerd-icons-orange + :v-adjust 0.01) + :function #'citar-has-links + :padding " " + :tag "has:links")) - (setq citar-indicator-notes-icons - (citar-indicator-create - :symbol (nerd-icons-codicon - "nf-cod-note" - :face 'nerd-icons-blue - :v-adjust -0.3) - :function #'citar-has-notes - :padding " " - :tag "has:notes")) + (setq citar-indicator-notes-icons + (citar-indicator-create + :symbol (nerd-icons-codicon + "nf-cod-note" + :face 'nerd-icons-blue + :v-adjust -0.3) + :function #'citar-has-notes + :padding " " + :tag "has:notes")) - (setq citar-indicator-cited-icons - (citar-indicator-create - :symbol (nerd-icons-faicon - "nf-fa-circle_o" - :face 'nerd-icon-green) - :function #'citar-is-cited - :padding " " - :tag "is:cited")) + (setq citar-indicator-cited-icons + (citar-indicator-create + :symbol (nerd-icons-faicon + "nf-fa-circle_o" + :face 'nerd-icon-green) + :function #'citar-is-cited + :padding " " + :tag "is:cited")) -(setq citar-indicators - (list citar-indicator-files-icons - citar-indicator-links-icons - citar-indicator-notes-icons - citar-indicator-cited-icons))) + (setq citar-indicators + (list citar-indicator-files-icons + citar-indicator-links-icons + citar-indicator-notes-icons + citar-indicator-cited-icons))) #+end_src ** Scholarly Writing Environment with Org-mode @@ -770,45 +641,46 @@ I like to keep formatting simple. Let's use a package or two to set a decent document class: #+begin_src emacs-lisp (add-to-list 'org-latex-classes - '("student-apa7" - "\\documentclass[stu]{apa7} + '("student-apa7" + "\\documentclass[stu]{apa7} \\usepackage[]{multicol} \\usepackage{mathptmx} +\\usepackage{times} [NO-DEFAULT-PACKAGES] [NO-PACKAGES]" - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}") - ("\\paragraph{%s}" . "\\paragraph*{%s}") - ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\paragraph{%s}" . "\\paragraph*{%s}") + ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) (add-to-list 'org-latex-classes - '("student-turabian" - "\\documentclass{turabian-researchpaper} + '("student-turabian" + "\\documentclass{turabian-researchpaper} \\usepackage[]{multicol} \\usepackage{mathptmx} [NO-PACKAGES] " - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}") - ("\\paragraph{%s}" . "\\paragraph*{%s}") - ("\\subparagraph{%s}" . "\\subparagraph*{%s}") - ("\\usepackage{biblatex-chicago}"))) + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\paragraph{%s}" . "\\paragraph*{%s}") + ("\\subparagraph{%s}" . "\\subparagraph*{%s}") + ("\\usepackage{biblatex-chicago}"))) (add-to-list 'org-latex-classes - '("student-mla" - "\\documentclass[stu]{mla} + '("student-mla" + "\\documentclass[stu]{mla} \\hypersetup{hidelinks} \\usepackage[]{multicol} \\usepackage{mathptmx} " - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}") - ("\\paragraph{%s}" . "\\paragraph*{%s}") - ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\paragraph{%s}" . "\\paragraph*{%s}") + ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) - ;; org-latex-compilers = ("pdflatex" "xelatex" "lualatex"), which are the possible values for %latex +;; org-latex-compilers = ("pdflatex" "xelatex" "lualatex"), which are the possible values for %latex #+end_src *** Engraving Faces @@ -874,33 +746,33 @@ I use =r= for this purpose. It is close and goes well with *roam*. #+begin_src emacs-lisp (after! org-roam (map! :leader (:prefix ("r" . "roam") - :desc "Search for a node in org-roam files" - "f" #'org-roam-node-find + :desc "Search for a node in org-roam files" + "f" #'org-roam-node-find - :desc "Insert the link to a node from org-roam" - "i" #'org-roam-node-insert + :desc "Insert the link to a node from org-roam" + "i" #'org-roam-node-insert - :desc "Rescan org-roam files and add new nodes to database" - "s" #'org-roam-db-sync + :desc "Rescan org-roam files and add new nodes to database" + "s" #'org-roam-db-sync - :desc "Jump to a random node" - "r" #'org-roam-node-random + :desc "Jump to a random node" + "r" #'org-roam-node-random - :desc "Capture inside an existing or new node" - "c" #'org-roam-capture + :desc "Capture inside an existing or new node" + "c" #'org-roam-capture - :desc "Go to or create a daily note" - "d" #'org-roam-dailies-goto-today + :desc "Go to or create a daily note" + "d" #'org-roam-dailies-goto-today - :desc "Seek a daily note" - "D" #'org-roam-dailies-goto-date + :desc "Seek a daily note" + "D" #'org-roam-dailies-goto-date - :desc "Extract a subtree to a new file" - "e" #'org-roam-extract-subtree)) + :desc "Extract a subtree to a new file" + "e" #'org-roam-extract-subtree)) - (map! - :desc "Alternative keybind to insert a roam link while in insert mode" - :i "M-[" #'org-roam-node-insert)) + (map! + :desc "Alternative keybind to insert a roam link while in insert mode" + :i "M-[" #'org-roam-node-insert)) #+end_src *** Nice UI to access Zettelkasten notes with Org-roam ui @@ -910,38 +782,33 @@ I use =r= for this purpose. It is close and goes well with *roam*. #+end_src #+begin_src emacs-lisp (use-package! websocket - :after org-roam) + :after org-roam) (use-package! org-roam-ui - :after org-roam ;; or :after org -;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have -;; a hookable mode anymore, you're advised to pick something yourself -;; if you don't care about startup time, use -;; :hook (after-init . org-roam-ui-mode) - :config - (setq org-roam-ui-sync-theme t - org-roam-ui-follow t - org-roam-ui-update-on-save t - org-roam-ui-open-on-start t)) + :after org-roam ;; or :after org + ;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have + ;; a hookable mode anymore, you're advised to pick something yourself + ;; if you don't care about startup time, use + ;; :hook (after-init . org-roam-ui-mode) + :config + (setq org-roam-ui-sync-theme t + org-roam-ui-follow t + org-roam-ui-update-on-save t + org-roam-ui-open-on-start t)) (after! org-roam-ui (map! :leader (:prefix ("r" . "roam") (:prefix ("u" . "roam-ui") - :desc "focus the current node in org-roam-ui view" - "f" #'org-roam-ui-node-zoom + :desc "focus the current node in org-roam-ui view" + "f" #'org-roam-ui-node-zoom - :desc "focus the current node's local graph in org-roam-ui view" - "l" #'org-roam-ui-node-local + :desc "focus the current node's local graph in org-roam-ui view" + "l" #'org-roam-ui-node-local - :desc "begin org-roam ui mode" - "u" #'open-org-roam-ui + :desc "begin org-roam ui mode" + "u" #'open-org-roam-ui - )))) + )))) #+END_SRC -*** Default Browser for Export -#+begin_src emacs-lisp -(setq browse-url-browser-function 'browse-url-generic - browse-url-generic-program "surf") -#+end_src ** Journal Environment with org-roam #+begin_src emacs-lisp @@ -971,26 +838,26 @@ Test for existence of the plus: (match-beginning 1)" "Get global org property KEY of current buffer. Adding up values for one key is supported." (let ((key-re (org-global-props-key-re key)) - (props (org-global-props)) - ret) + (props (org-global-props)) + ret) (cl-loop with val for prop in props - when (string-match key-re (setq val (plist-get prop :value))) do - (setq - val (substring val (match-end 0)) - ret (if (match-beginning 1) - (concat ret " " val) - val))) + when (string-match key-re (setq val (plist-get prop :value))) do + (setq + val (substring val (match-end 0)) + ret (if (match-beginning 1) + (concat ret " " val) + val))) ret)) - #+end_src + ** Resume setup for a stellar CV *** ox-extra for ":ignore:" tags I want to be able to ignore headings on export. #+begin_src emacs-lisp - (use-package! ox-extra - :after (org) - :config - (ox-extras-activate '(latex-header-blocks ignore-headlines))) +(use-package! ox-extra + :after (org) + :config + (ox-extras-activate '(latex-header-blocks ignore-headlines))) #+end_src *** McDowell Resume Template This template is supposed to be the standard. @@ -1076,7 +943,7 @@ We need to bring in the correct SSH agent values, so that Emacs is aware of wher (use-package! exec-path-from-shell) (after! exec-path-from-shell (dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" "GPG_AGENT_INFO")) - (add-to-list 'exec-path-from-shell-variables var)) + (add-to-list 'exec-path-from-shell-variables var)) (exec-path-from-shell-initialize) ) #+end_src @@ -1226,7 +1093,7 @@ SVGBob is an ASCII art renderer. It can do all kinds of nifty things with just a (setq org-svgbob-executable "svgbob_cli") (setq org-babel-svgbob--parameters - '(:background transparent)) + '(:background transparent)) #+end_src @@ -1273,7 +1140,7 @@ I like to have all my config in one place. doom ; what makes DOOM look the way it does doom-dashboard ; a nifty splash screen for Emacs ;;doom-quit ; DOOM quit-message prompts when you quit Emacs - ;;(emoji +unicode) ; 🙂 + (emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra indent-guides ; highlighted indent columns @@ -1300,7 +1167,7 @@ I like to have all my config in one place. (format ) ; automated prettiness ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim - multiple-cursors ; editing in many places at once + ;;multiple-cursors ; editing in many places at once ;;objed ; text object editing for the innocent ;;parinfer ; turn lisp into python, sort of ;;rotate-text ; cycle region at point between text candidates @@ -1317,7 +1184,7 @@ I like to have all my config in one place. :term ;;eshell ; the elisp shell that works everywhere ;;shell ; simple shell REPL for Emacs - term ; basic terminal emulator for Emacs + ;;term ; basic terminal emulator for Emacs vterm ; the best terminal emulation in Emacs :checkers @@ -1326,10 +1193,10 @@ I like to have all my config in one place. grammar ; tasing grammar mistake every you make :tools - ;;ansible + ansible (biblio +icons) ; Writes a PhD for you (citation needed) ;;debugger ; FIXME stepping through code, to help you add bugs - ;;direnv + direnv ;;docker editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs @@ -1346,7 +1213,7 @@ I like to have all my config in one place. ;;taskrunner ; taskrunner for all your projects ;;terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux - ;;tree-sitter ; syntax and parsing, sitting in a tree... + tree-sitter ; syntax and parsing, sitting in a tree... ;;upload ; map local to remote projects via ssh/ftp :os @@ -1355,10 +1222,10 @@ I like to have all my config in one place. :lang ;;agda ; types of types of types of types... - (beancount +lsp) ; mind the GAAP + ;;(beancount +lsp) ; mind the GAAP (cc +lsp) ; C > C++ == 1 ;;clojure ; java with a lisp - ;;common-lisp ; if you've seen one lisp, you've seen them all + common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs ;;crystal ; ruby at the speed of c ;;csharp ; unity, .NET, and mono shenanigans @@ -1376,7 +1243,7 @@ I like to have all my config in one place. ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 ;;gdscript ; the language you waited for - ;;(go +lsp) ; the hipster dialect + (go +lsp) ; the hipster dialect ;;(graphql +lsp) ; Give queries a REST ;;(haskell +lsp) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python @@ -1392,7 +1259,7 @@ I like to have all my config in one place. lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c - ;;nix ; I hereby declare "nix geht mehr!" + (nix +lsp +treesitter) ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel (org +roam2 +gnuplot +pomodoro +noter +present +pretty) ; organize your plain life in plain text ;;php ; perl's insecure younger brother @@ -1413,9 +1280,9 @@ I like to have all my config in one place. ;;solidity ; do you need a blockchain? No. ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. - web ; the tubes - ;;yaml ; JSON, but readable - ;zig ; C, but simpler + (web +lsp) ; the tubes + yaml ; JSON, but readable + ;zig ; C, but simpler :email ;;(mu4e +org +gmail) @@ -1433,22 +1300,20 @@ I like to have all my config in one place. :config literate (default +bindings +smartparens) - -) + ) #+end_src * Footnotes [fn:1] Stolen from Tecosaur's [[https://git.tecosaur.net/tec/emacs-config][config]] * Other Editing -** Lillypond - -*** ob-lilypond -**** package +** Lilypond :COMMENT:noexport: +*** package #+begin_src emacs-lisp :tangle "packages.el" (package! ob-lilypond :recipe (:host github :type git :repo "mjago/ob-lilypond")) #+end_src -**** config + +*** config #+begin_src emacs-lisp (use-package! ob-lilypond) (setq ly-arrange-mode t)