small tweaks and the beginning of bible stuff

This commit is contained in:
Chris Cochrun 2023-12-18 10:00:04 -06:00
parent 45b94fd6a2
commit 36c35aa4b6
4 changed files with 83 additions and 33 deletions

View file

@ -43,7 +43,7 @@
- [[#magit][Magit]] - [[#magit][Magit]]
- [[#eshell][Eshell]] - [[#eshell][Eshell]]
- [[#vterm][Vterm]] - [[#vterm][Vterm]]
- [[#sly][Sly]] - [[#sly-common-lisp][Sly Common Lisp]]
- [[#pdf-tools][PDF-Tools]] - [[#pdf-tools][PDF-Tools]]
- [[#epub][EPUB]] - [[#epub][EPUB]]
- [[#eaf-emacs-application-framework][EAF (Emacs Application Framework)]] - [[#eaf-emacs-application-framework][EAF (Emacs Application Framework)]]
@ -395,6 +395,13 @@ Let's make parens and other delimiters easier to tell apart by making nested one
(eval (mini-echo-mode 0) (doom-modeline-mode 1)) (eval (mini-echo-mode 0) (doom-modeline-mode 1))
(eval (doom-modeline-mode 0) (mini-echo-mode 1))))) (eval (doom-modeline-mode 0) (mini-echo-mode 1)))))
#+end_src #+end_src
*** Searching
Let's make xref use ripgrep instead of grep for speed.
#+begin_src emacs-lisp
(setq xref-search-program "ripgrep")
#+end_src
** Fix NixOS ** Fix NixOS
I am currently using NixOS. In order for emacs to have access to certain programs, we need to set some environment variables I am currently using NixOS. In order for emacs to have access to certain programs, we need to set some environment variables
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
@ -1372,6 +1379,19 @@ In order to use it, I need to go to http://localhost:8080
org-roam-ui-open-on-start t)) org-roam-ui-open-on-start t))
#+END_SRC #+END_SRC
*** Denote
I might try switching to and using denote instead of Org Roam. Denote doesn't use a DB and instead uses a clever naming scheme to make sure that all files are connectable. The one downside of denote is that the links are specific to denote instead of plain org links.
#+begin_src emacs-lisp
(use-package denote
:config
(setq denote-directory "/home/chris/org"
denote-dired-directories "/home/chris/org"
denote-modules '(project xref ffap)
denote-known-keywords '("emacs" "bible" "jesus" "tfc" "lesson" "it" "dev"))
:general
(chris/leader-keys
"no" 'denote-open-or-create))
#+end_src
*** Org-Superstar *** Org-Superstar
Org-Superstar makes the stars at the beginning of the line in =org-mode= a lot prettier. Org-Superstar makes the stars at the beginning of the line in =org-mode= a lot prettier.
@ -3138,6 +3158,15 @@ Finally, here are some auto modes I'd like to setup
(add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode)) (add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode))
#+end_src #+end_src
*** Emacs Lisp
#+begin_src emacs-lisp
(general-def 'normal emacs-lisp-mode-map
"ge" 'eval-defun
"gE" 'eval-last-sexp
"gp" 'pp-eval-last-sexp)
#+end_src
*** Tree Sitter *** Tree Sitter
I'm gonna try this to speed up emacs and make it nicer I'm gonna try this to speed up emacs and make it nicer
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
@ -3716,15 +3745,19 @@ Ledger mode
tab-always-indent 'complete tab-always-indent 'complete
completion-cycle-threshold t completion-cycle-threshold t
ledger-complete-in-steps t) ledger-complete-in-steps t)
(defun chris/ledger-clean () (defun chris/ledger-clean ()
(interactive) (interactive)
(when (eq major-mode #'ledger-mode) (when (eq major-mode #'ledger-mode)
(ledger-mode-clean-buffer))) (ledger-mode-clean-buffer)))
(add-hook 'after-save-hook #'chris/ledger-clean) (add-hook 'after-save-hook #'chris/ledger-clean)
(add-hook 'ledger-reconcile-mode-hook #'(ledger-mode-clean-buffer))
(setq ledger-default-date-format "%Y-%m-%d")
:general :general
(general-def 'normal ledger-mode-map (general-def 'normal ledger-mode-map
"ga" 'ledger-add-transaction)) "ga" 'ledger-add-transaction
"gr" 'ledger-report))
#+end_src #+end_src
** MU4E ** MU4E
@ -4217,7 +4250,7 @@ Emulate a terminal
(display-line-numbers-mode -1)) (display-line-numbers-mode -1))
(add-hook 'vterm-mode-hook 'chris/vterm-setup) (add-hook 'vterm-mode-hook 'chris/vterm-setup)
#+end_src #+end_src
** Sly ** Sly Common Lisp
Using sly makes a lot better common-lisp interaction within emacs. Using sly makes a lot better common-lisp interaction within emacs.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package sly (use-package sly
@ -4932,6 +4965,10 @@ I am going to try and use LanguageTool to fix grammatical issues.
** MyBible ** MyBible
MyBible is going to be set of functions for creating and using a bible app within Emacs. Let's see if we can't make it work. MyBible is going to be set of functions for creating and using a bible app within Emacs. Let's see if we can't make it work.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defvar bible-books '(genesis exodus leviticus numbers dueteronomy joshua judges ruth 1-samuel 2-samuel 1-kings 2-kings 1-chronicles 2-chronicles ezra nehemiah esther job psalms proverbs ecclesiastes song-of-solomon isaiah jeremiah lamentations ezekiel daniel hosea joel amos obadiah jonah micah nahum habakkuk zephaniah haggai zechariah malachi matthew mark luke john acts romans 1-corinthians 2-corinthians galatians ephesians phillipians colossians 1-thessalonians 2-thessalonians 1-timothy 2-timothy titus philemon hebrews james 1-peter 2-peter 1-john 2-john 3-john jude revelation))
(org-list-get-subtree *genesis* idk)
(defun chris/find-verse () (defun chris/find-verse ()
(interactive) (interactive)
(find-file "/home/chris/org/bibles/esv.org") (find-file "/home/chris/org/bibles/esv.org")

8
bible.el Normal file
View file

@ -0,0 +1,8 @@
(defvar bible-books '(genesis exodus leviticus numbers dueteronomy joshua judges ruth 1-samuel 2-samuel 1-kings 2-kings 1-chronicles 2-chronicles ezra nehemiah esther job psalms proverbs ecclesiastes song-of-solomon isaiah jeremiah lamentations ezekiel daniel hosea joel amos obadiah jonah micah nahum habakkuk zephaniah haggai zechariah malachi matthew mark luke john acts romans 1-corinthians 2-corinthians galatians ephesians phillipians colossians 1-thessalonians 2-thessalonians 1-timothy 2-timothy titus philemon hebrews james 1-peter 2-peter 1-john 2-john 3-john jude revelation))
(org-list-get-subtree *genesis* idk)
(defun chris/find-verse ()
(interactive)
(find-file "/home/chris/org/bibles/esv.org")
(list (imenu-choose-buffer-index)))

49
init.el
View file

@ -195,6 +195,8 @@
(eval (mini-echo-mode 0) (doom-modeline-mode 1)) (eval (mini-echo-mode 0) (doom-modeline-mode 1))
(eval (doom-modeline-mode 0) (mini-echo-mode 1))))) (eval (doom-modeline-mode 0) (mini-echo-mode 1)))))
(setq xref-search-program "ripgrep")
(setenv "WAYLAND_DISPLAY" (if (string= (getenv "XDG_CURRENT_DESKTOP") "Hyprland") (setenv "WAYLAND_DISPLAY" (if (string= (getenv "XDG_CURRENT_DESKTOP") "Hyprland")
"wayland-1" "wayland-1"
"wayland-0")) "wayland-0"))
@ -1034,6 +1036,16 @@ much faster. The hope is to also make this a faster version of imenu."
org-roam-ui-update-on-save t org-roam-ui-update-on-save t
org-roam-ui-open-on-start t)) org-roam-ui-open-on-start t))
(use-package denote
:config
(setq denote-directory "/home/chris/org"
denote-dired-directories "/home/chris/org"
denote-modules '(project xref ffap)
denote-known-keywords '("emacs" "bible" "jesus" "tfc" "lesson" "it" "dev"))
:general
(chris/leader-keys
"no" 'denote-open-or-create))
(use-package org-present (use-package org-present
:commands org-present :commands org-present
:config :config
@ -2392,6 +2404,11 @@ targets."
(add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode)) (add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode))
(general-def 'normal emacs-lisp-mode-map
"ge" 'eval-defun
"gE" 'eval-last-sexp
"gp" 'pp-eval-last-sexp)
(defun astyle-this-buffer () (defun astyle-this-buffer ()
@ -2696,15 +2713,19 @@ targets."
tab-always-indent 'complete tab-always-indent 'complete
completion-cycle-threshold t completion-cycle-threshold t
ledger-complete-in-steps t) ledger-complete-in-steps t)
(defun chris/ledger-clean () (defun chris/ledger-clean ()
(interactive) (interactive)
(when (eq major-mode #'ledger-mode) (when (eq major-mode #'ledger-mode)
(ledger-mode-clean-buffer))) (ledger-mode-clean-buffer)))
(add-hook 'after-save-hook #'chris/ledger-clean) (add-hook 'after-save-hook #'chris/ledger-clean)
(add-hook 'ledger-reconcile-mode-hook #'(ledger-mode-clean-buffer))
(setq ledger-default-date-format "%Y-%m-%d")
:general :general
(general-def 'normal ledger-mode-map (general-def 'normal ledger-mode-map
"ga" 'ledger-add-transaction)) "ga" 'ledger-add-transaction
"gr" 'ledger-report))
(use-package mu4e (use-package mu4e
;; :load-path "~/.guix-home/profile/share/emacs/site-lisp/mu4e/" ;; :load-path "~/.guix-home/profile/share/emacs/site-lisp/mu4e/"
@ -3629,6 +3650,10 @@ interfere with the default `bongo-playlist-buffer'."
"v" 'chris/elfeed-bongo-insert-item "v" 'chris/elfeed-bongo-insert-item
"N" 'mastodon-notifications--timeline)) "N" 'mastodon-notifications--timeline))
(defvar bible-books '(genesis exodus leviticus numbers dueteronomy joshua judges ruth 1-samuel 2-samuel 1-kings 2-kings 1-chronicles 2-chronicles ezra nehemiah esther job psalms proverbs ecclesiastes song-of-solomon isaiah jeremiah lamentations ezekiel daniel hosea joel amos obadiah jonah micah nahum habakkuk zephaniah haggai zechariah malachi matthew mark luke john acts romans 1-corinthians 2-corinthians galatians ephesians phillipians colossians 1-thessalonians 2-thessalonians 1-timothy 2-timothy titus philemon hebrews james 1-peter 2-peter 1-john 2-john 3-john jude revelation))
(org-list-get-subtree *genesis* idk)
(defun chris/find-verse () (defun chris/find-verse ()
(interactive) (interactive)
(find-file "/home/chris/org/bibles/esv.org") (find-file "/home/chris/org/bibles/esv.org")
@ -3674,23 +3699,3 @@ interfere with the default `bongo-playlist-buffer'."
gcmh-verbose nil)) gcmh-verbose nil))
(setq warning-suppress-types '((comp))) (setq warning-suppress-types '((comp)))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ledger-reports
'(("bal Income" "ledger bal Income")
("bal" "%(binary) -f %(ledger-file) bal")
("reg" "%(binary) -f %(ledger-file) reg")
("payee" "%(binary) -f %(ledger-file) reg @%(payee)")
("account" "%(binary) -f %(ledger-file) reg %(account)")))
'(pdf-misc-print-program-args
'("-o media=Letter" "-o fitplot" "-o sides=two-sided-long-edge"))
'(pdf-misc-print-program-executable "lpr"))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-modern-tag ((t :background "#9aedfe" :foreground "#282a36"))))

View file

@ -177,4 +177,4 @@ nix-mode
ledger-mode ledger-mode
(contribution "2023-11-01 Contributions" n> "Income:Supporters:" (p "supporter") > n> "Assets:Core") (contribution "2023-10-01 Contributions" n> "Income:Supporters:" (p "supporter") > n> "Assets:Core")