~thecatster/.emacs.d

203e765a12350e58c305573e70b705f3d16d96ad — Daniel Rose 2 years ago ae199b1 + 9f55479
Merge branch 'master' of git.sr.ht:~thecatster/.emacs.d
2 files changed, 127 insertions(+), 69 deletions(-)

M emacs.org
M init.el
M emacs.org => emacs.org +97 -51
@@ 792,6 792,7 @@ Allows for annotations of commands, files, and more.
*** Corfu
#+BEGIN_SRC emacs-lisp
(use-package corfu
  :hook ((prog-mode hy-mode) . corfu-mode)
  :custom
  (corfu-cycle t)            ;; Enable cycling for `corfu-next/previous'
  (corfu-auto t)             ;; Enable auto completion


@@ 801,9 802,7 @@ Allows for annotations of commands, files, and more.
          ("TAB" . corfu-next)
          ([tab] . corfu-next)
          ("S-TAB" . corfu-previous)
          ([backtab] . corfu-previous))
  :init
  (corfu-global-mode))
          ([backtab] . corfu-previous)))

(use-package orderless
  :init


@@ 2108,7 2107,6 @@ Even more features to org-mode!
These are defaults that I have found make Org mode more enjoyable to use.

#+BEGIN_SRC emacs-lisp
  ;; Much better defaults for Orgmode, these will be modified shortly
  (defun +org|setup-ui ()
    "Configures the UI for `org-mode'."
    (org-indent-mode)


@@ 2151,51 2149,63 @@ These are defaults that I have found make Org mode more enjoyable to use.
  (font-lock-add-keywords 'org-mode
                          '(("^ *\\([-]\\) "
                             (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
#+END_SRC

  (custom-theme-set-faces
   'user
   '(org-block ((t (:inherit fixed-pitch))))
   '(org-code ((t (:inherit (shadow fixed-pitch)))))
   '(org-document-info ((t (:foreground "dark orange"))))
   '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch)))))
   '(org-indent ((t (:inherit (org-hide fixed-pitch)))))
   '(org-link ((t (:foreground "royal blue" :underline t))))
   '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch)))))
   '(org-property-value ((t (:inherit fixed-pitch))) t)
   '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
   '(org-table ((t (:inherit fixed-pitch :foreground "#83a598"))))
   '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8))))
   '(org-verbatim ((t (:inherit (shadow fixed-pitch))))))

  (defun ck/org-confirm-babel-evaluate (lang body)
    (not (or (string= lang "latex") (string= lang "emacs-lisp"))))
  (setq org-confirm-babel-evaluate 'ck/org-confirm-babel-evaluate)

  ;; Change colours for headings
  (custom-set-faces
   '(default     ((t (:foreground "#BBC2CF"))))
   '(org-level-1 ((t (:foreground "#BF9D7A"))))
   '(org-level-2 ((t (:foreground "#E4E9CD"))))
   '(org-level-3 ((t (:foreground "#EBF2EA"))))
   '(org-level-4 ((t (:foreground "#0ABDA0"))))
   '(org-level-5 ((t (:foreground "#80ADD7")))))

  ;; Use ~tectonic~ instead of pdflatex in org
  (setq org-latex-pdf-process
        '("tectonic %f"))

  ;; I really like the look of UTF-8 bullets, however, they were causing major slowdown in Org mode!
  ;; But I'm willing to try it again!
  (use-package org-bullets
    :config
    (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
Change the fonts and colours of headings.

#+BEGIN_SRC emacs-lisp
(custom-theme-set-faces
 'user
 '(org-block ((t (:inherit fixed-pitch))))
 '(org-code ((t (:inherit (shadow fixed-pitch)))))
 '(org-document-info ((t (:foreground "dark orange"))))
 '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch)))))
 '(org-indent ((t (:inherit (org-hide fixed-pitch)))))
 '(org-link ((t (:foreground "royal blue" :underline t))))
 '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch)))))
 '(org-property-value ((t (:inherit fixed-pitch))) t)
 '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
 '(org-table ((t (:inherit fixed-pitch :foreground "#83a598"))))
 '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8))))
 '(org-verbatim ((t (:inherit (shadow fixed-pitch))))))

(defun ck/org-confirm-babel-evaluate (lang body)
  (not (or (string= lang "latex") (string= lang "emacs-lisp") (string= lang "ledger"))))
(setq org-confirm-babel-evaluate 'ck/org-confirm-babel-evaluate)

;; Change colours for headings
(custom-set-faces
 '(default     ((t (:foreground "#BBC2CF"))))
 '(org-level-1 ((t (:foreground "#BF9D7A"))))
 '(org-level-2 ((t (:foreground "#E4E9CD"))))
 '(org-level-3 ((t (:foreground "#EBF2EA"))))
 '(org-level-4 ((t (:foreground "#0ABDA0"))))
 '(org-level-5 ((t (:foreground "#80ADD7")))))

  ;; Hide emphasis markings
  (use-package org-appear
    :straight '(org-appear :type git :host github :repo "awth13/org-appear")
    :hook (org-mode . org-appear-mode))
#+END_SRC

Use ~tectonic~ instead of ~pdflatex~ in when exporting to PDF.

  ;; Better options
#+BEGIN_SRC emacs-lisp
(setq org-latex-pdf-process
      '("tectonic %f"))
#+END_SRC

Hide emphasis markers and make stars UTF-8 bullets!

#+BEGIN_SRC emacs-lisp
(use-package org-superstar
  :diminish org-superstar-mode
  :hook (org-mode . org-superstar-mode))

(use-package org-appear
  :diminish org-appear-mode
  :hook (org-mode . org-appear-mode))
#+END_SRC

Some more good options.

#+BEGIN_SRC emacs-lisp
  (setq org-directory "~/Nextcloud/org/" ; This way, all org mode files are synced across devices
        org-agenda-files '("~/Nextcloud/org/")
        org-default-notes-file (expand-file-name "notes.org" org-directory)


@@ 2210,8 2220,6 @@ These are defaults that I have found make Org mode more enjoyable to use.
        org-log-done 'time
        org-journal-date-format "%B %d, %Y (%A) "
        org-hide-emphasis-markers t
        ;; ex. of org-link-abbrev-alist in action
        ;; [[arch-wiki:Name_of_Page][Description]]
        org-link-abbrev-alist    ; This overwrites the default Doom org-link-abbrev-list
        '(("google" . "http://www.google.com/search?q=")
          ("arch-wiki" . "https://wiki.archlinux.org/index.php/")


@@ 2228,13 2236,19 @@ These are defaults that I have found make Org mode more enjoyable to use.
           "|"                 ; The pipe necessary to separate "active" states and "inactive" states
           "DONE(d)"           ; Task has been completed
           "CANCELLED(c)"))) ; Task has been cancelled
#+END_SRC

F**K YEAH Radians over Degrees.

  ;; FUCK YEAH Radians over Degrees.
#+BEGIN_SRC emacs-lisp
  (setq calc-angle-mode 'rad  ; radians are rad, fuck degrees
        calc-symbolic-mode t) ; keeps expressions like \sqrt{2} irrational for as long as possible
#+END_SRC

Properly indent headings in org mode.

  ;; Indent properly in Org mode
  (org-indent-mode 1)
#+BEGIN_SRC emacs-lisp
(org-indent-mode 1)
#+END_SRC

** Blog, Agenda, and Capture


@@ 2300,6 2314,38 @@ they really are quite useful to knowing what I did on a certain day
        org-journal-date-format "%A, %d %B %Y"))
#+END_SRC

** Org Babel
Babel allows for literate programming ala JupyterLab with the power of
Emacs and Org. I've almost completely replaced my usage of JupyterLab
with it!

Enabling necessary languages.

#+BEGIN_SRC emacs-lisp
(use-package ob-hy)
(use-package ob-rust)
(use-package ob-clojurescript)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((arduino . t)
   (C . t)
   (clojure . t)
   (clojurescript . t)
   (emacs-lisp . t)
   (gnuplot . t)
   (haskell . t)
   (hy . t)
   (js . t)
   (latex . t)
   (ledger . t)
   (lilypond . t)
   (lisp . t)
   (python . t)
   (rust . t)
   (shell . t)))
#+END_SRC

** Org Roam
This section is admittedly a bit small, as I haven't gotten quite used
to using Org Roam yet. I'm sure I'll add more as I use this more

M init.el => init.el +30 -18
@@ 495,6 495,7 @@
  (embark-collect-mode . consult-preview-at-point-mode))

(use-package corfu
  :hook ((prog-mode hy-mode) . corfu-mode)
  :custom
  (corfu-cycle t)            ;; Enable cycling for `corfu-next/previous'
  (corfu-auto t)             ;; Enable auto completion


@@ 504,9 505,7 @@
          ("TAB" . corfu-next)
          ([tab] . corfu-next)
          ("S-TAB" . corfu-previous)
          ([backtab] . corfu-previous))
  :init
  (corfu-global-mode))
          ([backtab] . corfu-previous)))

(use-package orderless
  :init


@@ 1430,7 1429,6 @@
(use-package lsp-metals
  :disabled)

;; Much better defaults for Orgmode, these will be modified shortly
(defun +org|setup-ui ()
  "Configures the UI for `org-mode'."
  (org-indent-mode)


@@ 1490,7 1488,7 @@
 '(org-verbatim ((t (:inherit (shadow fixed-pitch))))))

(defun ck/org-confirm-babel-evaluate (lang body)
  (not (or (string= lang "latex") (string= lang "emacs-lisp"))))
  (not (or (string= lang "latex") (string= lang "emacs-lisp") (string= lang "ledger"))))
(setq org-confirm-babel-evaluate 'ck/org-confirm-babel-evaluate)

;; Change colours for headings


@@ 1502,22 1500,17 @@
 '(org-level-4 ((t (:foreground "#0ABDA0"))))
 '(org-level-5 ((t (:foreground "#80ADD7")))))

;; Use ~tectonic~ instead of pdflatex in org
(setq org-latex-pdf-process
      '("tectonic %f"))

;; I really like the look of UTF-8 bullets, however, they were causing major slowdown in Org mode!
;; But I'm willing to try it again!
(use-package org-bullets
  :config
  (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
(use-package org-superstar
  :diminish org-superstar-mode
  :hook (org-mode . org-superstar-mode))

;; Hide emphasis markings
(use-package org-appear
  :straight '(org-appear :type git :host github :repo "awth13/org-appear")
  :diminish org-appear-mode
  :hook (org-mode . org-appear-mode))

;; Better options
(setq org-directory "~/Nextcloud/org/" ; This way, all org mode files are synced across devices
      org-agenda-files '("~/Nextcloud/org/")
      org-default-notes-file (expand-file-name "notes.org" org-directory)


@@ 1532,8 1525,6 @@
      org-log-done 'time
      org-journal-date-format "%B %d, %Y (%A) "
      org-hide-emphasis-markers t
      ;; ex. of org-link-abbrev-alist in action
      ;; [[arch-wiki:Name_of_Page][Description]]
      org-link-abbrev-alist    ; This overwrites the default Doom org-link-abbrev-list
      '(("google" . "http://www.google.com/search?q=")
        ("arch-wiki" . "https://wiki.archlinux.org/index.php/")


@@ 1551,11 1542,9 @@
         "DONE(d)"           ; Task has been completed
         "CANCELLED(c)"))) ; Task has been cancelled

;; FUCK YEAH Radians over Degrees.
(setq calc-angle-mode 'rad  ; radians are rad, fuck degrees
      calc-symbolic-mode t) ; keeps expressions like \sqrt{2} irrational for as long as possible

;; Indent properly in Org mode
(org-indent-mode 1)

(use-package ox-gemini)


@@ 1605,6 1594,29 @@
  (setq org-journal-dir "~/Nextcloud/org/journal/"
        org-journal-date-format "%A, %d %B %Y"))

(use-package ob-hy)
(use-package ob-rust)
(use-package ob-clojurescript)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((arduino . t)
   (C . t)
   (clojure . t)
   (clojurescript . t)
   (emacs-lisp . t)
   (gnuplot . t)
   (haskell . t)
   (hy . t)
   (js . t)
   (latex . t)
   (ledger . t)
   (lilypond . t)
   (lisp . t)
   (python . t)
   (rust . t)
   (shell . t)))

(use-package org-roam
      :custom
      (org-roam-db-gc-threshold most-positive-fixnum)