Merge branch 'master' of gitlab.com:chriscochrun/dotemacs

This commit is contained in:
Chris Cochrun 2021-05-04 10:10:16 -05:00
commit 337d843930
2 changed files with 482 additions and 488 deletions

View file

@ -74,6 +74,7 @@ Let's start by making some basic ui changes like turning off the scrollbar, tool
(menu-bar-mode -1) (menu-bar-mode -1)
(blink-cursor-mode -1) (blink-cursor-mode -1)
(column-number-mode +1) (column-number-mode +1)
(setq-default indent-tabs-mode nil)
#+end_src #+end_src
In order to have this config work on both my desktop with regular joe-schmoe monitors and my laptop with new-hotness HiDPI monitor, I will set the font size if my system is the laptop to much higher. In order to have this config work on both my desktop with regular joe-schmoe monitors and my laptop with new-hotness HiDPI monitor, I will set the font size if my system is the laptop to much higher.
@ -183,6 +184,12 @@ To use straight we need to bootstrap it. This code is pulled right from Straight
(setq use-package-verbose t) (setq use-package-verbose t)
#+end_src #+end_src
Now let's make sure our package archives includes the newer org.
#+begin_src emacs-lisp :tangle no
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
#+end_src
Command-log-mode
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package command-log-mode (use-package command-log-mode
:commands command-log-mode) :commands command-log-mode)
@ -875,12 +882,14 @@ This is the use-package definition with a lot of customization. Need to setup au
Part of this config includes some special capture templates for my work as a youth minister. I create lessons through both org-mode and org-roam capture templates. The first part comes from org-roam, then the next is org-mode. Part of this config includes some special capture templates for my work as a youth minister. I create lessons through both org-mode and org-roam capture templates. The first part comes from org-roam, then the next is org-mode.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package org (use-package org
:defer 1 :straight t
:config :config
(setq org-startup-indented t (setq org-startup-indented t
org-edit-src-content-indentation 0 org-edit-src-content-indentation 0
org-agenda-sticky t org-agenda-sticky t
org-fontify-quote-and-verse-blocks t) org-fontify-quote-and-verse-blocks t
org-src-preserve-indentation t
org-src-window-setup 'other-frame)
(add-hook 'org-mode-hook 'chris/org-mode-setup) (add-hook 'org-mode-hook 'chris/org-mode-setup)
@ -941,19 +950,14 @@ Part of this config includes some special capture templates for my work as a you
org-capture-use-agenda-date t org-capture-use-agenda-date t
org-agenda-timegrid-use-ampm t) org-agenda-timegrid-use-ampm t)
;;(setq org-superstar-headline-bullets-list '("◉" "◈" "▸" "✬" "◎" "◇" "❉" "✙" "❖")) (setq org-imenu-depth 4
(setq org-imenu-depth 4) org-odt-styles-file "/home/chris/org/style.odt"
(setq org-odt-styles-file "/home/chris/org/style.odt") org-export-with-toc nil
org-export-with-author nil
(setq org-export-with-toc nil) org-todo-keywords
(setq org-export-with-author nil)
(setq org-todo-keywords
'((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)") '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)")
(sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))) (sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))
org-agenda-files
(setq org-agenda-files
'("/home/chris/org/inbox.org" '("/home/chris/org/inbox.org"
"/home/chris/org/notes.org" "/home/chris/org/notes.org"
"/home/chris/org/repetition.org" "/home/chris/org/repetition.org"
@ -963,19 +967,8 @@ Part of this config includes some special capture templates for my work as a you
"/home/chris/org/todo.org" "/home/chris/org/todo.org"
"/home/chris/org/newsletter.org" "/home/chris/org/newsletter.org"
"/home/chris/org/nvtfc_social_media.org" "/home/chris/org/nvtfc_social_media.org"
"/home/chris/org/lessons/")) "/home/chris/org/lessons/")
;; (add-to-list '("/home/chris/org/inbox.org" org-id-method 'ts)
;; "/home/chris/org/notes.org"
;; "/home/chris/org/repetition.org"
;; "/home/chris/org/tasks.org"
;; "/home/chris/org/tfc_plans.org"
;; "/home/chris/org/ministry_team.org"
;; "/home/chris/org/todo.org"
;; "/home/chris/org/newsletter.org"
;; "/home/chris/org/lesson_*.org")
;; (expand-file-name ))
(setq org-id-method 'ts)
(defun chris/org-columns-view () (defun chris/org-columns-view ()
"Turn on org-columns overlay and turn off olivetti-mode" "Turn on org-columns overlay and turn off olivetti-mode"
@ -1032,7 +1025,10 @@ Part of this config includes some special capture templates for my work as a you
"q" 'chris/org-columns-quit) "q" 'chris/org-columns-quit)
('normal org-mode-map ('normal org-mode-map
"RET" 'chris/org-dwim-at-point "RET" 'chris/org-dwim-at-point
"gC" 'chris/org-columns-view)) "gC" 'chris/org-columns-view
"ge" 'org-edit-src-code)
('normal 'org-src-mode-map
"q" 'org-edit-src-abort))
#+end_src #+end_src
We need to create a lesson capture function to find our lesson files differently each time we run our TFC plan capture. This is the most unique part of my capture template. This function uses =org-roam-find-file= to pick the lesson file that I need to add my lesson plan to. This way the lesson itself is created before the plan. We need to create a lesson capture function to find our lesson files differently each time we run our TFC plan capture. This is the most unique part of my capture template. This function uses =org-roam-find-file= to pick the lesson file that I need to add my lesson plan to. This way the lesson itself is created before the plan.
@ -1102,13 +1098,17 @@ We also need to setup some capture templates to use some specific setups with my
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package org-roam (use-package org-roam
:after org :after org
;; :ensure t
:commands (org-roam org-roam-find-file org-roam-insert) :commands (org-roam org-roam-find-file org-roam-insert)
:hook
(org-load . org-roam-mode)
:config :config
(setq org-roam-directory "~/org") (setq org-roam-directory "~/org"
(setq org-roam-buffer-width 0.25) org-roam-buffer-width 0.25
(setq org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*") org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*"
(setq org-roam-db-location "~/.dotemacs/org-roam.db") org-roam-db-location "~/.dotemacs/org-roam.db"
(setq org-roam-capture-templates org-roam-completion-everywhere t
org-roam-capture-templates
'(("d" "default" plain (function org-roam--capture-get-point) '(("d" "default" plain (function org-roam--capture-get-point)
"%?" "%?"
:file-name "${slug}" :file-name "${slug}"
@ -1120,9 +1120,9 @@ We also need to setup some capture templates to use some specific setups with my
("l" "TFC Lesson" plain (function org-roam--capture-get-point) ("l" "TFC Lesson" plain (function org-roam--capture-get-point)
(file ".templates/lessontemplate.org") (file ".templates/lessontemplate.org")
:file-name "lessons/${slug}" :file-name "lessons/${slug}"
:head "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n"))) :head "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n"))
(setq org-roam-dailies-capture-templates org-roam-dailies-capture-templates
'(("d" "daily" plain #'org-roam-capture--get-point "" '(("d" "daily" plain #'org-roam-capture--get-point ""
:immediate-finish t :immediate-finish t
:file-name "%<%Y-%m-%d>" :file-name "%<%Y-%m-%d>"

64
init.el
View file

@ -17,6 +17,7 @@
(menu-bar-mode -1) (menu-bar-mode -1)
(blink-cursor-mode -1) (blink-cursor-mode -1)
(column-number-mode +1) (column-number-mode +1)
(setq-default indent-tabs-mode nil)
(if (string-equal (system-name) "syl") (if (string-equal (system-name) "syl")
(defvar chris/default-font-size 240) (defvar chris/default-font-size 240)
@ -522,12 +523,14 @@ vertically."
visual-fill-column-center-text t)) visual-fill-column-center-text t))
(use-package org (use-package org
:defer 1 :straight t
:config :config
(setq org-startup-indented t (setq org-startup-indented t
org-edit-src-content-indentation 0 org-edit-src-content-indentation 0
org-agenda-sticky t org-agenda-sticky t
org-fontify-quote-and-verse-blocks t) org-fontify-quote-and-verse-blocks t
org-src-preserve-indentation t
org-src-window-setup 'other-frame)
(add-hook 'org-mode-hook 'chris/org-mode-setup) (add-hook 'org-mode-hook 'chris/org-mode-setup)
@ -588,19 +591,14 @@ vertically."
org-capture-use-agenda-date t org-capture-use-agenda-date t
org-agenda-timegrid-use-ampm t) org-agenda-timegrid-use-ampm t)
;;(setq org-superstar-headline-bullets-list '("◉" "◈" "▸" "✬" "◎" "◇" "❉" "✙" "❖")) (setq org-imenu-depth 4
(setq org-imenu-depth 4) org-odt-styles-file "/home/chris/org/style.odt"
(setq org-odt-styles-file "/home/chris/org/style.odt") org-export-with-toc nil
org-export-with-author nil
(setq org-export-with-toc nil) org-todo-keywords
(setq org-export-with-author nil)
(setq org-todo-keywords
'((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)") '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)")
(sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))) (sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))
org-agenda-files
(setq org-agenda-files
'("/home/chris/org/inbox.org" '("/home/chris/org/inbox.org"
"/home/chris/org/notes.org" "/home/chris/org/notes.org"
"/home/chris/org/repetition.org" "/home/chris/org/repetition.org"
@ -610,19 +608,8 @@ vertically."
"/home/chris/org/todo.org" "/home/chris/org/todo.org"
"/home/chris/org/newsletter.org" "/home/chris/org/newsletter.org"
"/home/chris/org/nvtfc_social_media.org" "/home/chris/org/nvtfc_social_media.org"
"/home/chris/org/lessons/")) "/home/chris/org/lessons/")
;; (add-to-list '("/home/chris/org/inbox.org" org-id-method 'ts)
;; "/home/chris/org/notes.org"
;; "/home/chris/org/repetition.org"
;; "/home/chris/org/tasks.org"
;; "/home/chris/org/tfc_plans.org"
;; "/home/chris/org/ministry_team.org"
;; "/home/chris/org/todo.org"
;; "/home/chris/org/newsletter.org"
;; "/home/chris/org/lesson_*.org")
;; (expand-file-name ))
(setq org-id-method 'ts)
(defun chris/org-columns-view () (defun chris/org-columns-view ()
"Turn on org-columns overlay and turn off olivetti-mode" "Turn on org-columns overlay and turn off olivetti-mode"
@ -679,7 +666,10 @@ vertically."
"q" 'chris/org-columns-quit) "q" 'chris/org-columns-quit)
('normal org-mode-map ('normal org-mode-map
"RET" 'chris/org-dwim-at-point "RET" 'chris/org-dwim-at-point
"gC" 'chris/org-columns-view)) "gC" 'chris/org-columns-view
"ge" 'org-edit-src-code)
('normal 'org-src-mode-map
"q" 'org-edit-src-abort))
(defun chris/org-roam-capture-lesson-file () (defun chris/org-roam-capture-lesson-file ()
"Function to return the lesson file that is needed for TFC plan capture and move to correct position for plan insertion" "Function to return the lesson file that is needed for TFC plan capture and move to correct position for plan insertion"
@ -726,13 +716,17 @@ vertically."
(use-package org-roam (use-package org-roam
:after org :after org
;; :ensure t
:commands (org-roam org-roam-find-file org-roam-insert) :commands (org-roam org-roam-find-file org-roam-insert)
:hook
(org-load . org-roam-mode)
:config :config
(setq org-roam-directory "~/org") (setq org-roam-directory "~/org"
(setq org-roam-buffer-width 0.25) org-roam-buffer-width 0.25
(setq org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*") org-roam-file-exclude-regexp ".stversion.*\|.stfolder.*\|.*~.*\|.*sync.*"
(setq org-roam-db-location "~/.dotemacs/org-roam.db") org-roam-db-location "~/.dotemacs/org-roam.db"
(setq org-roam-capture-templates org-roam-completion-everywhere t
org-roam-capture-templates
'(("d" "default" plain (function org-roam--capture-get-point) '(("d" "default" plain (function org-roam--capture-get-point)
"%?" "%?"
:file-name "${slug}" :file-name "${slug}"
@ -744,9 +738,9 @@ vertically."
("l" "TFC Lesson" plain (function org-roam--capture-get-point) ("l" "TFC Lesson" plain (function org-roam--capture-get-point)
(file ".templates/lessontemplate.org") (file ".templates/lessontemplate.org")
:file-name "lessons/${slug}" :file-name "lessons/${slug}"
:head "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n"))) :head "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n"))
(setq org-roam-dailies-capture-templates org-roam-dailies-capture-templates
'(("d" "daily" plain #'org-roam-capture--get-point "" '(("d" "daily" plain #'org-roam-capture--get-point ""
:immediate-finish t :immediate-finish t
:file-name "%<%Y-%m-%d>" :file-name "%<%Y-%m-%d>"