|
|
@ -7,20 +7,17 @@ I hope you enjoy your time here :)
|
|
|
|
It's not all very well documented, but I have done my best to split everything into a logical order.
|
|
|
|
It's not all very well documented, but I have done my best to split everything into a logical order.
|
|
|
|
Perhaps in 10 years I will still be using it, but who knows.
|
|
|
|
Perhaps in 10 years I will still be using it, but who knows.
|
|
|
|
|
|
|
|
|
|
|
|
* Task List
|
|
|
|
|
|
|
|
** TODO Reorganize into use-cases rather than packages
|
|
|
|
|
|
|
|
* Setting Basics
|
|
|
|
* Setting Basics
|
|
|
|
** Packages
|
|
|
|
** Packages
|
|
|
|
#+begin_src emacs-lisp :tangle "packages.el"
|
|
|
|
#+begin_src emacs-lisp :tangle "packages.el"
|
|
|
|
;; -*- no-byte-compile: t; -*-
|
|
|
|
;; -*- no-byte-compile: t; -*-
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
** Set name, org-roam-directory, etc.
|
|
|
|
** Set name, org-roam-directory, etc.
|
|
|
|
Some basic settings for Emacs
|
|
|
|
Some basic settings for Emacs
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq tab-always-indent t)
|
|
|
|
(setq tab-always-indent t)
|
|
|
|
(setq org-roam-directory "~/org/")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(setq user-full-name "Judah Sotomayor"
|
|
|
|
(setq user-full-name "Judah Sotomayor"
|
|
|
|
user-mail-address "")
|
|
|
|
user-mail-address "")
|
|
|
@ -31,34 +28,21 @@ Some basic settings for Emacs
|
|
|
|
:recipe (:host nil :type git :repo "https://git.freedomland.xyz/judahsotomayor/noctrlc"))
|
|
|
|
:recipe (:host nil :type git :repo "https://git.freedomland.xyz/judahsotomayor/noctrlc"))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Theme and Font
|
|
|
|
* Theme and Font
|
|
|
|
Set the theme.
|
|
|
|
Set the theme.
|
|
|
|
/Use something dark/
|
|
|
|
/Use something dark/
|
|
|
|
+I also prefer relative line numbers because of *evil* mode+
|
|
|
|
+I also prefer relative line numbers because of *evil* mode+
|
|
|
|
Relative line numbers don't seem to work, because of folding in Org-mode.
|
|
|
|
Relative line numbers don't seem to work, because of folding in Org-mode.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq doom-theme 'doom-oksolar-dark)
|
|
|
|
(setq doom-theme 'doom-xcode)
|
|
|
|
(condition-case nil
|
|
|
|
(setq doom-font (font-spec :family "Hack Nerd Font Mono" :size 16 :weight 'medium))
|
|
|
|
(setq doom-font (font-spec :family "Hack Nerd Font Mono" :size 16 :weight 'medium))
|
|
|
|
|
|
|
|
(error (set-face-attribute 'default nil :height 130)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(setq auto-save-default nil) ;I don't like autosaving. Let me do it myself.
|
|
|
|
(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-shortmenu)
|
|
|
|
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer)
|
|
|
|
(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
|
|
|
|
#+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
|
|
|
|
* Evil configuration
|
|
|
|
I want a non-ESC way to get back to normal mode:
|
|
|
|
I want a non-ESC way to get back to normal mode:
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
@ -68,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! :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 j" #'evil-next-visual-line)
|
|
|
|
(map! :n "g k" #'evil-previous-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
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
* Terminal setup
|
|
|
|
* 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
|
|
|
|
** Shell mappings
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(map! :leader (:prefix ("k" . "shell")
|
|
|
|
(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"
|
|
|
|
:desc "Start an elisp repl"
|
|
|
|
:n "e" #'+emacs-lisp/open-repl
|
|
|
|
:n "e" #'+emacs-lisp/open-repl
|
|
|
|
|
|
|
|
|
|
|
@ -113,62 +73,35 @@ I like to just use bash:
|
|
|
|
:n "j" #'+python/open-repl))
|
|
|
|
:n "j" #'+python/open-repl))
|
|
|
|
#+end_src
|
|
|
|
#+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
|
|
|
|
I like to have a shortcut for calc as well, for simpler calculations
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(map! :leader
|
|
|
|
(map! :leader
|
|
|
|
:desc "The Emacs Calculator"
|
|
|
|
:desc "The Emacs Calculator"
|
|
|
|
"C" #'calc)
|
|
|
|
"C" #'calc)
|
|
|
|
#+end_src
|
|
|
|
#+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
|
|
|
|
* Useful Functions
|
|
|
|
** Get the date from the shell
|
|
|
|
** Get the date from the shell
|
|
|
|
I want to grab the current date and put it in the buffer.
|
|
|
|
I want to grab the current date and put it in the buffer.
|
|
|
|
Because I sometimes use Fish or another shell, it's good to make sure bash is running the command using the src_bash{`-c`} flag.
|
|
|
|
Because I sometimes use Fish or another shell, it's good to make sure bash is running the command using the src_bash{`-c`} flag.
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(defun current-date () (interactive)
|
|
|
|
|
|
|
|
(shell-command-to-string "date '+%Y-%m-%d'"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun insert-current-date () (interactive)
|
|
|
|
(defun insert-current-date () (interactive)
|
|
|
|
(insert (string-trim (current-date))))
|
|
|
|
(insert (string-trim (shell-command-to-string "date '+%Y-%m-%d'"))))
|
|
|
|
|
|
|
|
|
|
|
|
(map! :leader
|
|
|
|
(defun insert-current-date-alt () (interactive)
|
|
|
|
:desc "Insert the current date into the buffer"
|
|
|
|
(insert (string-trim (shell-command-to-string "date '+%B %d, %Y'"))))
|
|
|
|
"i d" #'insert-current-date)
|
|
|
|
|
|
|
|
|
|
|
|
(map! :leader (:prefix ("i" . "insert") (:prefix ("d" . "date")
|
|
|
|
|
|
|
|
:desc "ISO 8601 (%Y-%m-%d)"
|
|
|
|
|
|
|
|
"i" #'insert-current-date
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:desc "Month Day, Year (%B %d, %Y)"
|
|
|
|
|
|
|
|
"m" #'insert-current-date-alt)))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+RESULTS:
|
|
|
|
** Convert regex strings to rx :COMMENT:
|
|
|
|
** Convert regex strings to rx
|
|
|
|
|
|
|
|
#+begin_src elisp :tangle packages.el
|
|
|
|
#+begin_src elisp :tangle packages.el
|
|
|
|
(package! xr)
|
|
|
|
(package! xr)
|
|
|
|
#+end_src
|
|
|
|
#+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
|
|
|
|
#+begin_src elisp
|
|
|
|
(use-package! xr)
|
|
|
|
(use-package! xr)
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
* Creating Diagrams and graphs
|
|
|
|
|
|
|
|
** TODO set default values using org-babel's features for that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Securing Sensitive Files
|
|
|
|
* Securing Sensitive Files
|
|
|
|
** Age.el
|
|
|
|
** Age.el
|
|
|
|
#+begin_src emacs-lisp :tangle "packages.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:
|
|
|
|
:END:
|
|
|
|
This preprocessor script allows me to use Ripgrep with Age to filter agenda files.
|
|
|
|
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]].
|
|
|
|
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
|
|
|
|
#!/usr/bin/env zsh
|
|
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
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-title "#+TITLE: ${title}\n")
|
|
|
|
(setq templates/post-capture-template (concat templates/post-capture-title templates/post-capture-props))
|
|
|
|
(setq templates/post-capture-template (concat templates/post-capture-title templates/post-capture-props))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
* Org-mode for a great todo list
|
|
|
|
* Org-mode for a great todo list
|
|
|
|
** Making the Agenda features more efficient
|
|
|
|
** Making the Agenda features more efficient
|
|
|
|
Using ripgrep we can automatically narrow org-agenda files.
|
|
|
|
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
|
|
|
|
#+begin_src sh :exports code :tangle no
|
|
|
|
rg --type-add 'aorg:*.org.age' \
|
|
|
|
rg --type-add 'aorg:*.org.age' \
|
|
|
|
-torg -taorg \
|
|
|
|
-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
|
|
|
|
#+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]].
|
|
|
|
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,7 +197,8 @@ The rubber hits the road here.
|
|
|
|
I'll call that shell command to set the agenda files correctly.
|
|
|
|
I'll call that shell command to set the agenda files correctly.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(defun set-org-agenda-files-ripgrep ()
|
|
|
|
(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 (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
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
And then we want to call this before building the agenda:
|
|
|
|
And then we want to call this before building the agenda:
|
|
|
@ -291,24 +223,15 @@ I don't want scheduled items to duplicate if the deadline is up.
|
|
|
|
(setq org-log-done 'time)
|
|
|
|
(setq org-log-done 'time)
|
|
|
|
(after! org
|
|
|
|
(after! org
|
|
|
|
(setq org-log-done 'time)
|
|
|
|
(setq org-log-done 'time)
|
|
|
|
(setq org-archive-location "~/org/archive.org")
|
|
|
|
(setq org-archive-location "~/10-19-personal-projects/11-zettelkasten/archive.sec.org.age")
|
|
|
|
(setq org-hide-emphasis-markers nil))
|
|
|
|
(setq org-hide-emphasis-markers nil))
|
|
|
|
(setq org-directory "~/org/")
|
|
|
|
(setq org-directory "~/10-19-personal-projects/11-zettelkasten/")
|
|
|
|
(setq org-roam-directory org-directory)
|
|
|
|
(setq org-roam-directory org-directory)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
*** 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
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+RESULTS:
|
|
|
|
#+RESULTS:
|
|
|
|
|
|
|
|
: ~/10-19-personal-projects/11-zettelkasten/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
** Appearances
|
|
|
|
** Appearances
|
|
|
|
*** Images Preferences
|
|
|
|
*** Images Preferences
|
|
|
@ -324,12 +247,17 @@ Super-agenda allows many nice configurations to the agenda buffer.
|
|
|
|
#+begin_src emacs-lisp :tangle "packages.el"
|
|
|
|
#+begin_src emacs-lisp :tangle "packages.el"
|
|
|
|
(package! org-super-agenda)
|
|
|
|
(package! org-super-agenda)
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
Is it working now? It sure seems to be, so IDK what was up with it earlier.
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package! org-super-agenda
|
|
|
|
(use-package! org-super-agenda
|
|
|
|
:after org-roam)
|
|
|
|
:after org-roam
|
|
|
|
|
|
|
|
:config (org-super-agenda-mode))
|
|
|
|
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#+RESULTS:
|
|
|
|
|
|
|
|
: t
|
|
|
|
|
|
|
|
|
|
|
|
Configure the Super Agenda to neatly organize everything.
|
|
|
|
Configure the Super Agenda to neatly organize everything.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-super-agenda-groups
|
|
|
|
(setq org-super-agenda-groups
|
|
|
@ -400,11 +328,11 @@ Edna allows better dependency handling for todos and the like.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
|
|
|
|
|
|
|
(use-package org-habit
|
|
|
|
(use-package org-habit
|
|
|
|
:custom
|
|
|
|
:custom
|
|
|
|
(org-habit-graph-column 1)
|
|
|
|
(org-habit-graph-column 1)
|
|
|
|
(org-habit-preceding-days 10)
|
|
|
|
(org-habit-preceding-days 10)
|
|
|
|
(org-habit-following-days 1)
|
|
|
|
(org-habit-following-days 1)
|
|
|
|
(org-habit-show-habits-only-for-today t))
|
|
|
|
(org-habit-show-habits-only-for-today t))
|
|
|
|
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
@ -447,20 +375,12 @@ This is okay, but I'd rather find something that isn't already used.
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
* Programming Items
|
|
|
|
* 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
|
|
|
|
** LSP
|
|
|
|
In order for editorconfig to do its thing, indentation by the lsp must be disabled.
|
|
|
|
In order for editorconfig to do its thing, indentation by the lsp must be disabled.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq lsp-enable-indentation nil)
|
|
|
|
(setq lsp-enable-indentation nil)
|
|
|
|
#+end_src emacs-lisp
|
|
|
|
#+end_src emacs-lisp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Website
|
|
|
|
* Website
|
|
|
|
** Capture template
|
|
|
|
** Capture template
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
@ -469,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))
|
|
|
|
(setq templates/post-capture-template (concat templates/post-capture-title templates/post-capture-props))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Crafting a Writing Environment :export:
|
|
|
|
** 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
|
|
|
|
|
|
|
|
For writing I like to automate as much as possible.
|
|
|
|
For writing I like to automate as much as possible.
|
|
|
|
This means creating an environment that does citations and such /for/ me.
|
|
|
|
This means creating an environment that does citations and such /for/ me.
|
|
|
|
** Export settings
|
|
|
|
** Export settings
|
|
|
|
*** Ox-latex
|
|
|
|
*** \LaTeX
|
|
|
|
|
|
|
|
**** Ox-latex
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(after! org
|
|
|
|
(after! org
|
|
|
|
;; Import ox-latex to get org-latex-classes and other funcitonality
|
|
|
|
;; Import ox-latex to get org-latex-classes and other funcitonality
|
|
|
@ -497,14 +412,18 @@ This means creating an environment that does citations and such /for/ me.
|
|
|
|
(setq org-latex-classes nil))))
|
|
|
|
(setq org-latex-classes nil))))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
*** Lualatex as PDF Processor
|
|
|
|
**** Lualatex as PDF Processor
|
|
|
|
I've found that lualatex does a good job processing PDFs. $hi$
|
|
|
|
I've found that lualatex does a good job processing PDFs. $hi$
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(after! ox-latex
|
|
|
|
(after! ox-latex
|
|
|
|
(setq org-latex-pdf-process
|
|
|
|
(setq org-latex-pdf-process
|
|
|
|
'("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
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#+RESULTS:
|
|
|
|
|
|
|
|
| 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$
|
|
|
|
$x + 1 = 3$
|
|
|
|
#+RESULTS:
|
|
|
|
#+RESULTS:
|
|
|
|
: luamagick
|
|
|
|
: luamagick
|
|
|
@ -600,12 +519,8 @@ $x + 1 = 3$
|
|
|
|
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+RESULTS:
|
|
|
|
**** COMMENT Fixing dvipng image handling
|
|
|
|
| mcdowellcv | \documentclass[]{mcdowellcv} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*** COMMENT Fixing dvipng image handling
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
|
|
|
|
|
|
|
(defun +org-refresh-latex-images-previews-h ()
|
|
|
|
(defun +org-refresh-latex-images-previews-h ()
|
|
|
|
(dolist (buffer (doom-buffers-in-mode 'org-mode (buffer-list)))
|
|
|
|
(dolist (buffer (doom-buffers-in-mode 'org-mode (buffer-list)))
|
|
|
|
(with-current-buffer buffer
|
|
|
|
(with-current-buffer buffer
|
|
|
@ -616,38 +531,8 @@ $x + 1 = 3$
|
|
|
|
|
|
|
|
|
|
|
|
(add-hook 'doom-load-theme-hook #'+org-refresh-latex-images-previews-h)
|
|
|
|
(add-hook 'doom-load-theme-hook #'+org-refresh-latex-images-previews-h)
|
|
|
|
#+end_src
|
|
|
|
#+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 ()
|
|
|
|
**** Delete links from inline anki
|
|
|
|
"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
|
|
|
|
|
|
|
|
#+begin_src elisp
|
|
|
|
#+begin_src elisp
|
|
|
|
(defun inline-anki-link-filter (link backend info)
|
|
|
|
(defun inline-anki-link-filter (link backend info)
|
|
|
|
"Rewrite links in export to preserve link text only"
|
|
|
|
"Rewrite links in export to preserve link text only"
|
|
|
@ -671,6 +556,117 @@ We'll want a handy shortcut for this.
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
#+RESULTS:
|
|
|
|
#+RESULTS:
|
|
|
|
| inline-anki-link-filter |
|
|
|
|
| inline-anki-link-filter |
|
|
|
|
|
|
|
|
*** HTML
|
|
|
|
|
|
|
|
**** Custom functions
|
|
|
|
|
|
|
|
A lot of this section I steal from [[https://gitlab.com/to1ne/blog/blob/master/elisp/publish.el#L170-204][writepermission.com]].
|
|
|
|
|
|
|
|
He has some great work for rss feed creation and other stuff.
|
|
|
|
|
|
|
|
#+begin_src elisp
|
|
|
|
|
|
|
|
(defun rw/format-rss-feed-entry (entry style project)
|
|
|
|
|
|
|
|
"Format ENTRY for the RSS feed.
|
|
|
|
|
|
|
|
ENTRY is a file name. STYLE is either 'list' or 'tree'.
|
|
|
|
|
|
|
|
PROJECT is the current project."
|
|
|
|
|
|
|
|
(cond ((not (directory-name-p entry))
|
|
|
|
|
|
|
|
(let* ((file (org-publish--expand-file-name entry project))
|
|
|
|
|
|
|
|
(title (org-publish-find-title entry project))
|
|
|
|
|
|
|
|
(date (format-time-string "%Y-%m-%d" (org-publish-find-date entry project)))
|
|
|
|
|
|
|
|
(link (concat (file-name-sans-extension entry) ".html")))
|
|
|
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
|
|
|
(org-mode)
|
|
|
|
|
|
|
|
(insert (format "* [[file:%s][%s]]\n" file title))
|
|
|
|
|
|
|
|
(org-set-property "RSS_PERMALINK" link)
|
|
|
|
|
|
|
|
(org-set-property "PUBDATE" date)
|
|
|
|
|
|
|
|
(insert-file-contents file)
|
|
|
|
|
|
|
|
(buffer-string))))
|
|
|
|
|
|
|
|
((eq style 'tree)
|
|
|
|
|
|
|
|
;; Return only last subdir.
|
|
|
|
|
|
|
|
(file-name-nondirectory (directory-file-name entry)))
|
|
|
|
|
|
|
|
(t entry)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun rw/format-rss-feed (title list)
|
|
|
|
|
|
|
|
"Generate RSS feed, as a string.
|
|
|
|
|
|
|
|
TITLE is the title of the RSS feed. LIST is an internal
|
|
|
|
|
|
|
|
representation for the files to include, as returned by
|
|
|
|
|
|
|
|
`org-list-to-lisp'. PROJECT is the current project."
|
|
|
|
|
|
|
|
(concat "#+TITLE: " title "\n\n"
|
|
|
|
|
|
|
|
(org-list-to-subtree list 1 '(:icount "" :istart ""))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun rw/org-rss-publish-to-rss (plist filename pub-dir)
|
|
|
|
|
|
|
|
"Publish RSS with PLIST, only when FILENAME is 'rss.org'.
|
|
|
|
|
|
|
|
PUB-DIR is when the output will be placed."
|
|
|
|
|
|
|
|
(if (equal "rss.org" (file-name-nondirectory filename))
|
|
|
|
|
|
|
|
(let ((file-name (org-rss-publish-to-rss plist filename pub-dir)))
|
|
|
|
|
|
|
|
(shell-command (format "tail -n +2 %s > random-file-temp.xml" file-name file-name))
|
|
|
|
|
|
|
|
(shell-command (format "mv random-file-temp.xml %s" file-name))
|
|
|
|
|
|
|
|
file-name)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(use-package! ox-rss)
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We will need ox-rss for rss feed production.
|
|
|
|
|
|
|
|
#+begin_src elisp :tangle packages.el
|
|
|
|
|
|
|
|
(package! ox-rss)
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**** Project list configuration
|
|
|
|
|
|
|
|
Finally, configure the project alist using a series of projects.
|
|
|
|
|
|
|
|
1. ~blog-posts~ processes the normal .org file to create posts.
|
|
|
|
|
|
|
|
2. ~blog-static~ brings static css and images into the publishing dir.
|
|
|
|
|
|
|
|
3. ~blog-rss~ creates the rss feed as a special type of sitemap. It uses ox-rss, which we just loaded!
|
|
|
|
|
|
|
|
4. Finally, the whole blog. This uses both blog-posts and blog-rss.
|
|
|
|
|
|
|
|
#+begin_src elisp :results none
|
|
|
|
|
|
|
|
(setq org-html-htmlize-output-type 'css
|
|
|
|
|
|
|
|
org-html-html5-fancy t
|
|
|
|
|
|
|
|
org-html-metadata-timestamp-format "%Y-%m-%d"
|
|
|
|
|
|
|
|
org-html-checkbox-type 'html
|
|
|
|
|
|
|
|
org-html-doctype "html5")
|
|
|
|
|
|
|
|
(let ((blog--root (concat (file-name-as-directory org-directory) "blog"))
|
|
|
|
|
|
|
|
(blog--public-root "~/10-19-personal-projects/15-blog")
|
|
|
|
|
|
|
|
(blog--url "https://judah.freedomland.xyz")
|
|
|
|
|
|
|
|
(blog--static-attachment-extensions (regexp-opt '("jpg" "jpeg" "gif" "png" "svg" "pdf" "css"))))
|
|
|
|
|
|
|
|
(setq org-publish-project-alist
|
|
|
|
|
|
|
|
(list
|
|
|
|
|
|
|
|
(list "blog-posts"
|
|
|
|
|
|
|
|
:auto-sitemap t
|
|
|
|
|
|
|
|
:base-directory blog--root
|
|
|
|
|
|
|
|
:exclude (regexp-opt '("rss.org"))
|
|
|
|
|
|
|
|
:html-htmlized-css-url "static/style.css"
|
|
|
|
|
|
|
|
:html-head-include-default-style nil
|
|
|
|
|
|
|
|
:publishing-directory blog--public-root
|
|
|
|
|
|
|
|
:publishing-function 'org-html-publish-to-html
|
|
|
|
|
|
|
|
:recursive nil
|
|
|
|
|
|
|
|
:sitemap-filename "index.org"
|
|
|
|
|
|
|
|
:sitemap-title "Judah Sotomayor's Blog"
|
|
|
|
|
|
|
|
:sitemap-sort-files 'anti-chronologically
|
|
|
|
|
|
|
|
:sitemap-style 'tree)
|
|
|
|
|
|
|
|
(list "blog-static"
|
|
|
|
|
|
|
|
:base-directory (expand-file-name "static" blog--root)
|
|
|
|
|
|
|
|
:base-extension blog--static-attachment-extensions
|
|
|
|
|
|
|
|
:publishing-directory (expand-file-name "static" blog--public-root)
|
|
|
|
|
|
|
|
:publishing-function 'org-publish-attachment
|
|
|
|
|
|
|
|
:recursive t)
|
|
|
|
|
|
|
|
(list "blog-rss"
|
|
|
|
|
|
|
|
:auto-sitemap t
|
|
|
|
|
|
|
|
:base-directory blog--root
|
|
|
|
|
|
|
|
:exclude (regexp-opt '("rss.org" "index.org" "404.org"))
|
|
|
|
|
|
|
|
:html-link-home blog--url
|
|
|
|
|
|
|
|
:html-link-use-abs-url t
|
|
|
|
|
|
|
|
:html-link-org-files-as-html t
|
|
|
|
|
|
|
|
:publishing-directory blog--public-root
|
|
|
|
|
|
|
|
:publishing-function 'rw/org-rss-publish-to-rss
|
|
|
|
|
|
|
|
:rss-extension "xml"
|
|
|
|
|
|
|
|
:sitemap-filename "rss.org"
|
|
|
|
|
|
|
|
:sitemap-format-entry 'rw/format-rss-feed-entry
|
|
|
|
|
|
|
|
:sitemap-function 'rw/format-rss-feed
|
|
|
|
|
|
|
|
:sitemap-sort-files 'anti-chronologically
|
|
|
|
|
|
|
|
:sitemap-style 'list)
|
|
|
|
|
|
|
|
(list "blog"
|
|
|
|
|
|
|
|
:components '("blog-posts" "blog-rss" "blog-static")))))
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
** Automatic Citations with *citar* and *org-cite*
|
|
|
|
** Automatic Citations with *citar* and *org-cite*
|
|
|
|
:PROPERTIES:
|
|
|
|
:PROPERTIES:
|
|
|
@ -681,14 +677,16 @@ We want a general [[file:~/org/references.bib][bibliography file]], a [[file:~/Z
|
|
|
|
and a default set of styles.
|
|
|
|
and a default set of styles.
|
|
|
|
*** Citar setup
|
|
|
|
*** Citar setup
|
|
|
|
First of all, we must configure citar.
|
|
|
|
First of all, we must configure citar.
|
|
|
|
|
|
|
|
#+begin_src elisp :tangle packages.el
|
|
|
|
|
|
|
|
(package! citar-org-roam)
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package! citar
|
|
|
|
(use-package! citar
|
|
|
|
:ensure t
|
|
|
|
|
|
|
|
:demand t
|
|
|
|
|
|
|
|
:custom
|
|
|
|
:custom
|
|
|
|
(citar-bibliography "~/org/references.bib")
|
|
|
|
(citar-bibliography "~/10-19-personal-projects/11-zettelkasten/references.bib")
|
|
|
|
(citar-file-note-extensions '(".org"))
|
|
|
|
(citar-file-note-extensions '(".org"))
|
|
|
|
(org-cite-global-bibliography '("~/org/references.bib"))
|
|
|
|
(org-cite-global-bibliography '("~/10-19-personal-projects/11-zettelkasten/references.bib"))
|
|
|
|
|
|
|
|
|
|
|
|
(org-cite-csl-styles-dir
|
|
|
|
(org-cite-csl-styles-dir
|
|
|
|
(expand-file-name "~/Zotero/styles/"))
|
|
|
|
(expand-file-name "~/Zotero/styles/"))
|
|
|
@ -698,7 +696,6 @@ First of all, we must configure citar.
|
|
|
|
:hook
|
|
|
|
:hook
|
|
|
|
(LaTeX-mode . citar-capf-setup)
|
|
|
|
(LaTeX-mode . citar-capf-setup)
|
|
|
|
(org-mode . citar-capf-setup))
|
|
|
|
(org-mode . citar-capf-setup))
|
|
|
|
(citar-org-roam-mode)
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
*** Icons for some prettification
|
|
|
|
*** Icons for some prettification
|
|
|
@ -743,7 +740,7 @@ First of all, we must configure citar.
|
|
|
|
:padding " "
|
|
|
|
:padding " "
|
|
|
|
:tag "is:cited"))
|
|
|
|
:tag "is:cited"))
|
|
|
|
|
|
|
|
|
|
|
|
(setq citar-indicators
|
|
|
|
(setq citar-indicators
|
|
|
|
(list citar-indicator-files-icons
|
|
|
|
(list citar-indicator-files-icons
|
|
|
|
citar-indicator-links-icons
|
|
|
|
citar-indicator-links-icons
|
|
|
|
citar-indicator-notes-icons
|
|
|
|
citar-indicator-notes-icons
|
|
|
@ -759,6 +756,7 @@ Let's use a package or two to set a decent document class:
|
|
|
|
"\\documentclass[stu]{apa7}
|
|
|
|
"\\documentclass[stu]{apa7}
|
|
|
|
\\usepackage[]{multicol}
|
|
|
|
\\usepackage[]{multicol}
|
|
|
|
\\usepackage{mathptmx}
|
|
|
|
\\usepackage{mathptmx}
|
|
|
|
|
|
|
|
\\usepackage{times}
|
|
|
|
[NO-DEFAULT-PACKAGES]
|
|
|
|
[NO-DEFAULT-PACKAGES]
|
|
|
|
[NO-PACKAGES]"
|
|
|
|
[NO-PACKAGES]"
|
|
|
|
("\\section{%s}" . "\\section*{%s}")
|
|
|
|
("\\section{%s}" . "\\section*{%s}")
|
|
|
@ -793,7 +791,7 @@ Let's use a package or two to set a decent document class:
|
|
|
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
|
|
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
|
|
|
("\\subparagraph{%s}" . "\\subparagraph*{%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
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
*** Engraving Faces
|
|
|
|
*** Engraving Faces
|
|
|
@ -809,9 +807,8 @@ Ever wonder why code export sucks with \LaTeX ? Me neither! Let's fix it!
|
|
|
|
Org-roam enables features essential to a Zettelkasten such as inter-ID linking.
|
|
|
|
Org-roam enables features essential to a Zettelkasten such as inter-ID linking.
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package! org-roam
|
|
|
|
(use-package! org-roam
|
|
|
|
:after md-roam
|
|
|
|
:after md-roam)
|
|
|
|
:init (setq org-roam-directory "~/org/")) :custom
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
I use several capture templates to make it easy to get notes into my various sections.
|
|
|
|
I use several capture templates to make it easy to get notes into my various sections.
|
|
|
@ -900,10 +897,10 @@ I use =r= for this purpose. It is close and goes well with *roam*.
|
|
|
|
|
|
|
|
|
|
|
|
(use-package! org-roam-ui
|
|
|
|
(use-package! org-roam-ui
|
|
|
|
:after org-roam ;; or :after org
|
|
|
|
:after org-roam ;; or :after org
|
|
|
|
;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have
|
|
|
|
;; 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
|
|
|
|
;; a hookable mode anymore, you're advised to pick something yourself
|
|
|
|
;; if you don't care about startup time, use
|
|
|
|
;; if you don't care about startup time, use
|
|
|
|
;; :hook (after-init . org-roam-ui-mode)
|
|
|
|
;; :hook (after-init . org-roam-ui-mode)
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(setq org-roam-ui-sync-theme t
|
|
|
|
(setq org-roam-ui-sync-theme t
|
|
|
|
org-roam-ui-follow t
|
|
|
|
org-roam-ui-follow t
|
|
|
@ -923,21 +920,22 @@ I use =r= for this purpose. It is close and goes well with *roam*.
|
|
|
|
|
|
|
|
|
|
|
|
))))
|
|
|
|
))))
|
|
|
|
#+END_SRC
|
|
|
|
#+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
|
|
|
|
** Journal Environment with org-roam
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(after! org-roam
|
|
|
|
(after! org-roam
|
|
|
|
(setq org-roam-dailies-capture-templates
|
|
|
|
(setq org-roam-dailies-capture-templates
|
|
|
|
`(("d" "default" entry
|
|
|
|
`(("d" "default" entry "* %?"
|
|
|
|
"* %?"
|
|
|
|
|
|
|
|
:target (file+head "%<%Y-%m-%d>.sec.org.age"
|
|
|
|
:target (file+head "%<%Y-%m-%d>.sec.org.age"
|
|
|
|
"#+title: %<%Y-%m-%d>\n")))))
|
|
|
|
"#+title: %<%Y-%m-%d %A>\n* Where was I today?\n* Where am I at now?\n* Where will I be tomorrow?")))))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#+RESULTS:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Where was I today?
|
|
|
|
|
|
|
|
* Where am I at now?
|
|
|
|
|
|
|
|
* Where will I be tomorrow?) |
|
|
|
|
|
|
|
|
|
|
|
|
*** Property getters and setters
|
|
|
|
*** Property getters and setters
|
|
|
|
These are to fulfill my need to get property values for generating my [[id:6672f401-32a1-49ef-8004-ac77ece67f5b][journal index]].
|
|
|
|
These are to fulfill my need to get property values for generating my [[id:6672f401-32a1-49ef-8004-ac77ece67f5b][journal index]].
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
@ -967,13 +965,13 @@ Adding up values for one key is supported."
|
|
|
|
(concat ret " " val)
|
|
|
|
(concat ret " " val)
|
|
|
|
val)))
|
|
|
|
val)))
|
|
|
|
ret))
|
|
|
|
ret))
|
|
|
|
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
** Resume setup for a stellar CV
|
|
|
|
** Resume setup for a stellar CV
|
|
|
|
*** ox-extra for ":ignore:" tags
|
|
|
|
*** ox-extra for ":ignore:" tags
|
|
|
|
I want to be able to ignore headings on export.
|
|
|
|
I want to be able to ignore headings on export.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package! ox-extra
|
|
|
|
(use-package! ox-extra
|
|
|
|
:after (org)
|
|
|
|
:after (org)
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(ox-extras-activate '(latex-header-blocks ignore-headlines)))
|
|
|
|
(ox-extras-activate '(latex-header-blocks ignore-headlines)))
|
|
|
@ -1219,7 +1217,7 @@ SVGBob is an ASCII art renderer. It can do all kinds of nifty things with just a
|
|
|
|
|
|
|
|
|
|
|
|
* Archiving
|
|
|
|
* Archiving
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-archive-location "/home/user/org/archive.org::")
|
|
|
|
(setq org-archive-location "/home/judah/10-19-personal-projects/11-zettelkasten/archive.sec.org.age::")
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
* Init.el
|
|
|
|
* Init.el
|
|
|
@ -1259,7 +1257,7 @@ I like to have all my config in one place.
|
|
|
|
doom ; what makes DOOM look the way it does
|
|
|
|
doom ; what makes DOOM look the way it does
|
|
|
|
doom-dashboard ; a nifty splash screen for Emacs
|
|
|
|
doom-dashboard ; a nifty splash screen for Emacs
|
|
|
|
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
|
|
|
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
|
|
|
;;(emoji +unicode) ; 🙂
|
|
|
|
(emoji +unicode) ; 🙂
|
|
|
|
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
|
|
|
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
|
|
|
;;hydra
|
|
|
|
;;hydra
|
|
|
|
indent-guides ; highlighted indent columns
|
|
|
|
indent-guides ; highlighted indent columns
|
|
|
@ -1286,7 +1284,7 @@ I like to have all my config in one place.
|
|
|
|
(format ) ; automated prettiness
|
|
|
|
(format ) ; automated prettiness
|
|
|
|
;;god ; run Emacs commands without modifier keys
|
|
|
|
;;god ; run Emacs commands without modifier keys
|
|
|
|
;;lispy ; vim for lisp, for people who don't like vim
|
|
|
|
;;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
|
|
|
|
;;objed ; text object editing for the innocent
|
|
|
|
;;parinfer ; turn lisp into python, sort of
|
|
|
|
;;parinfer ; turn lisp into python, sort of
|
|
|
|
;;rotate-text ; cycle region at point between text candidates
|
|
|
|
;;rotate-text ; cycle region at point between text candidates
|
|
|
@ -1303,7 +1301,7 @@ I like to have all my config in one place.
|
|
|
|
:term
|
|
|
|
:term
|
|
|
|
;;eshell ; the elisp shell that works everywhere
|
|
|
|
;;eshell ; the elisp shell that works everywhere
|
|
|
|
;;shell ; simple shell REPL for Emacs
|
|
|
|
;;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
|
|
|
|
vterm ; the best terminal emulation in Emacs
|
|
|
|
|
|
|
|
|
|
|
|
:checkers
|
|
|
|
:checkers
|
|
|
@ -1312,10 +1310,10 @@ I like to have all my config in one place.
|
|
|
|
grammar ; tasing grammar mistake every you make
|
|
|
|
grammar ; tasing grammar mistake every you make
|
|
|
|
|
|
|
|
|
|
|
|
:tools
|
|
|
|
:tools
|
|
|
|
;;ansible
|
|
|
|
ansible
|
|
|
|
(biblio +icons) ; Writes a PhD for you (citation needed)
|
|
|
|
(biblio +icons) ; Writes a PhD for you (citation needed)
|
|
|
|
;;debugger ; FIXME stepping through code, to help you add bugs
|
|
|
|
;;debugger ; FIXME stepping through code, to help you add bugs
|
|
|
|
;;direnv
|
|
|
|
direnv
|
|
|
|
;;docker
|
|
|
|
;;docker
|
|
|
|
editorconfig ; let someone else argue about tabs vs spaces
|
|
|
|
editorconfig ; let someone else argue about tabs vs spaces
|
|
|
|
;;ein ; tame Jupyter notebooks with emacs
|
|
|
|
;;ein ; tame Jupyter notebooks with emacs
|
|
|
@ -1332,7 +1330,7 @@ I like to have all my config in one place.
|
|
|
|
;;taskrunner ; taskrunner for all your projects
|
|
|
|
;;taskrunner ; taskrunner for all your projects
|
|
|
|
;;terraform ; infrastructure as code
|
|
|
|
;;terraform ; infrastructure as code
|
|
|
|
;;tmux ; an API for interacting with tmux
|
|
|
|
;;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
|
|
|
|
;;upload ; map local to remote projects via ssh/ftp
|
|
|
|
|
|
|
|
|
|
|
|
:os
|
|
|
|
:os
|
|
|
@ -1341,10 +1339,10 @@ I like to have all my config in one place.
|
|
|
|
|
|
|
|
|
|
|
|
:lang
|
|
|
|
:lang
|
|
|
|
;;agda ; types of types of types of types...
|
|
|
|
;;agda ; types of types of types of types...
|
|
|
|
(beancount +lsp) ; mind the GAAP
|
|
|
|
;;(beancount +lsp) ; mind the GAAP
|
|
|
|
(cc +lsp) ; C > C++ == 1
|
|
|
|
(cc +lsp) ; C > C++ == 1
|
|
|
|
;;clojure ; java with a lisp
|
|
|
|
;;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
|
|
|
|
;;coq ; proofs-as-programs
|
|
|
|
;;crystal ; ruby at the speed of c
|
|
|
|
;;crystal ; ruby at the speed of c
|
|
|
|
;;csharp ; unity, .NET, and mono shenanigans
|
|
|
|
;;csharp ; unity, .NET, and mono shenanigans
|
|
|
@ -1362,7 +1360,7 @@ I like to have all my config in one place.
|
|
|
|
;;fsharp ; ML stands for Microsoft's Language
|
|
|
|
;;fsharp ; ML stands for Microsoft's Language
|
|
|
|
;;fstar ; (dependent) types and (monadic) effects and Z3
|
|
|
|
;;fstar ; (dependent) types and (monadic) effects and Z3
|
|
|
|
;;gdscript ; the language you waited for
|
|
|
|
;;gdscript ; the language you waited for
|
|
|
|
;;(go +lsp) ; the hipster dialect
|
|
|
|
(go +lsp) ; the hipster dialect
|
|
|
|
;;(graphql +lsp) ; Give queries a REST
|
|
|
|
;;(graphql +lsp) ; Give queries a REST
|
|
|
|
;;(haskell +lsp) ; a language that's lazier than I am
|
|
|
|
;;(haskell +lsp) ; a language that's lazier than I am
|
|
|
|
;;hy ; readability of scheme w/ speed of python
|
|
|
|
;;hy ; readability of scheme w/ speed of python
|
|
|
@ -1378,9 +1376,9 @@ I like to have all my config in one place.
|
|
|
|
lua ; one-based indices? one-based indices
|
|
|
|
lua ; one-based indices? one-based indices
|
|
|
|
markdown ; writing docs for people to ignore
|
|
|
|
markdown ; writing docs for people to ignore
|
|
|
|
;;nim ; python + lisp at the speed of c
|
|
|
|
;;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
|
|
|
|
;;ocaml ; an objective camel
|
|
|
|
(org +roam2 +gnuplot +hugo +pomodoro +noter +present +pretty) ; organize your plain life in plain text
|
|
|
|
(org +roam2 +gnuplot +pomodoro +noter +present +pretty) ; organize your plain life in plain text
|
|
|
|
;;php ; perl's insecure younger brother
|
|
|
|
;;php ; perl's insecure younger brother
|
|
|
|
;;plantuml ; diagrams for confusing people more
|
|
|
|
;;plantuml ; diagrams for confusing people more
|
|
|
|
;;purescript ; javascript, but functional
|
|
|
|
;;purescript ; javascript, but functional
|
|
|
@ -1399,8 +1397,8 @@ I like to have all my config in one place.
|
|
|
|
;;solidity ; do you need a blockchain? No.
|
|
|
|
;;solidity ; do you need a blockchain? No.
|
|
|
|
;;swift ; who asked for emoji variables?
|
|
|
|
;;swift ; who asked for emoji variables?
|
|
|
|
;;terra ; Earth and Moon in alignment for performance.
|
|
|
|
;;terra ; Earth and Moon in alignment for performance.
|
|
|
|
web ; the tubes
|
|
|
|
(web +lsp) ; the tubes
|
|
|
|
;;yaml ; JSON, but readable
|
|
|
|
yaml ; JSON, but readable
|
|
|
|
;zig ; C, but simpler
|
|
|
|
;zig ; C, but simpler
|
|
|
|
|
|
|
|
|
|
|
|
:email
|
|
|
|
:email
|
|
|
@ -1419,22 +1417,20 @@ I like to have all my config in one place.
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
literate
|
|
|
|
literate
|
|
|
|
(default +bindings +smartparens)
|
|
|
|
(default +bindings +smartparens)
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
* Footnotes
|
|
|
|
* Footnotes
|
|
|
|
[fn:1] Stolen from Tecosaur's [[https://git.tecosaur.net/tec/emacs-config][config]]
|
|
|
|
[fn:1] Stolen from Tecosaur's [[https://git.tecosaur.net/tec/emacs-config][config]]
|
|
|
|
* Other Editing
|
|
|
|
* Other Editing
|
|
|
|
** Lillypond
|
|
|
|
** Lilypond :COMMENT:noexport:
|
|
|
|
|
|
|
|
*** package
|
|
|
|
*** ob-lilypond
|
|
|
|
|
|
|
|
**** package
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp :tangle "packages.el"
|
|
|
|
#+begin_src emacs-lisp :tangle "packages.el"
|
|
|
|
(package! ob-lilypond
|
|
|
|
(package! ob-lilypond
|
|
|
|
:recipe (:host github :type git :repo "mjago/ob-lilypond"))
|
|
|
|
:recipe (:host github :type git :repo "mjago/ob-lilypond"))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
**** config
|
|
|
|
|
|
|
|
|
|
|
|
*** config
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package! ob-lilypond)
|
|
|
|
(use-package! ob-lilypond)
|
|
|
|
(setq ly-arrange-mode t)
|
|
|
|
(setq ly-arrange-mode t)
|
|
|
|