config.el 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814
  1. ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
  2. ;; Place your private configuration here! Remember, you do not need to run 'doom
  3. ;; sync' after modifying this file!
  4. ;;
  5. ;; I am getting this error in the console a lot. I need to disable centaur-tabs-line in the console, or try to fix it.
  6. ;;QuitError during redisplay: (eval (centaur-tabs-line)) signaled (wrong-type-argument stringp (Git "~/prog/gnu/guix/guix-config/linode-guix-system-configuration/"))
  7. ;;
  8. (setq-hook! company-mode-hook company-minimum-prefix-length 3)
  9. (setq auth-sources '("~/.authinfo.gpg" "~/.authinfo"))
  10. ;; prefer utf-8
  11. (setq locale-coding-system 'utf-8)
  12. (set-terminal-coding-system 'utf-8)
  13. (set-keyboard-coding-system 'utf-8)
  14. (set-selection-coding-system 'utf-8)
  15. (prefer-coding-system 'utf-8)
  16. (when (display-graphic-p)
  17. (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)))
  18. ;; Some functionality uses this to identify you, e.g. GPG configuration, email
  19. ;; clients, file templates and snippets.
  20. (setq user-full-name "Joshua Branson"
  21. user-mail-address "jbranso@dismail.de")
  22. ;; the menu bar is helpful. I don't always remember the options.
  23. (menu-bar-mode 1)
  24. ;; There are two ways to load a theme. Both assume the theme is installed and
  25. ;; available. You can either set `doom-theme' or manually load a theme with the
  26. ;; `load-theme' function. This is the default:
  27. ;;(setq doom-theme 'doom-one)
  28. (setq doom-theme 'doom-zenburn)
  29. ;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
  30. ;; are the three important ones:
  31. ;;
  32. ;; + `doom-font'
  33. ;; + `doom-variable-pitch-font'
  34. ;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
  35. ;; presentations or streaming.
  36. ;;
  37. ;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
  38. ;; font string. You generally only need these two:
  39. ;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
  40. ;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
  41. ;;(setq doom-font (font-spec :family "Hack" :size 14))
  42. (after! gnus
  43. (evil-set-initial-state 'gnus-group-mode 'emacs)
  44. (evil-set-initial-state 'gnus-article-mode 'emacs)
  45. (evil-set-initial-state 'gnus-summary-mode 'emacs))
  46. (after! debbugs
  47. (evil-set-initial-state 'debbugs-gnu-mode 'emacs)
  48. (evil-set-initial-state 'woman-mode 'emacs)
  49. (evil-set-initial-state 'info-mode 'emacs))
  50. (after! magit
  51. (evil-set-initial-state 'git-rebase-mode 'emacs))
  52. ;; I need to use imap to read my dismail inbox...for some reason, my local gnus
  53. ;; cannot read my local dovecot Inbox...No idea why.
  54. (setq gnus-select-method '(nnimap "imap.dismail.de"))
  55. (setq gnus-secondary-select-methods
  56. '(
  57. ;; I would like to use gnus as my maildir, but imap works just fine for now.
  58. ;; (nnmaildir "dismail.de"
  59. ;; (nnir-search-engine notmuch)
  60. ;; (nnir-notmuch-additional-switches "search")
  61. ;; (directory "~/.mail/dismail/"))
  62. ;; (nnmaildir "fastmail" (directory "~/.mail/"))
  63. ;; (nntp "news.gwene.org")
  64. (nntp "news.gmane.io")
  65. ;; this makes gnus startup super slow!!! (nnmaildir
  66. ;; "dismail.de" (directory "~/.mail/dismail.de/"))
  67. (nnimap "gnucode.me"
  68. (nnimap-stream ssl)
  69. (nnimap-address "imap.gnucode.me")
  70. (nnimap-user "joshua"))
  71. ;; this is the right config, but I'm not certain how to set up a dovecot username and password
  72. (nnimap "localDismail"
  73. (nnimap-address "localhost")
  74. (nnimap-stream network)
  75. (nnimap-server-port 143)
  76. )))
  77. ;; The below bit of code is supposed to be the "best" way to make Gnus archive email into
  78. ;; the email Sent folder. But it does not seem to work.
  79. ;; This should help: https://lists.gnu.org/archive/html/info-gnus-english/2016-03/msg00004.html
  80. ;; (setq gnus-message-archive-method "archive"
  81. ;; gnus-message-archive-group "Sent"
  82. ;; ;; ALWAYS SET THIS NEXT LINE. Otherwise, gnus might not use the current
  83. ;; ;; value of archive-method
  84. ;; gnus-update-message-archive-method 't)
  85. ;; save email replies to my Sent folder
  86. (setq gnus-posting-styles
  87. `((".*"
  88. (gcc "\"nnimap+imap.dismail.de:Sent\"")
  89. ;; I use this next line for my dismail filter to mark as read archived messages
  90. ;; that gnus sends to my Sent folder.
  91. ("X-Gnus-Sucks" "I know man")
  92. )))
  93. ;; use msmtp
  94. ;; from the emacs wiki: https://www.emacswiki.org/emacs/GnusMSMTP
  95. ;; send mail function so "C" (mark the bug as done) and "R" in the debbugs-gnu-mode works
  96. (setq message-send-mail-function 'message-send-mail-with-sendmail)
  97. ;; we substitute sendmail with msmtp
  98. (setq sendmail-program "/home/joshua/.guix-profile/bin/msmtp")
  99. ;; This is needed to allow msmtp to do its magic:
  100. (setq message-sendmail-f-is-evil 't)
  101. ;;need to tell msmtp which account we're using
  102. (setq message-sendmail-extra-arguments '("--read-envelope-from"))
  103. ;; TODO check that ~/.doom.d/custom.el DOES not have:
  104. ;; (send-mail-function 'mailclient-send-it) that will cause issues when I try
  105. ;; to send control messages with debbugs.
  106. (setq send-mail-function 'message-send-mail-with-sendmail)
  107. (after! geiser
  108. (evil-set-initial-state 'geiser-repl-mode 'emacs))
  109. ;; setting up my guix development environment
  110. (add-hook 'geiser-repl-mode-hook 'visual-line-mode)
  111. (setq geiser-repl-per-project-p t)
  112. (with-eval-after-load 'geiser-guile
  113. (add-to-list 'geiser-guile-load-path "~/prog/gnu/guix/guix-src")
  114. (add-to-list 'geiser-guile-load-path "~/prog/gnu/guix/guixrus")
  115. (add-to-list 'geiser-guile-load-path "~/prog/gnu/guix/guix-config")
  116. (add-to-list 'geiser-guile-load-path "~/prog/gnu/guix/guix-config/linode-guix-system-configuration"))
  117. (map!
  118. :map scheme-mode-map
  119. :localleader
  120. (:desc "jump to symbol at point"
  121. "j" #'geiser-edit-symbol-at-point)
  122. (:desc "jump to sybmol I type"
  123. "J" #'geiser-edit-symbol))
  124. ;; this below is NOT working. I cannot use the scheme-mode snippets.
  125. (with-eval-after-load 'yasnippet
  126. (add-to-list 'yas-snippet-dirs "~/prog/gnu/guix/guix-src"))
  127. ;; I would also like TAB in company mode to select that option.
  128. ;; and C-n and C-p to go to the previous option
  129. (load-file "~/prog/gnu/guix/guix-src/etc/copyright.el")
  130. (setq copyright-names-regexp
  131. (format "%s <%s>" user-full-name user-mail-address))
  132. (add-hook 'after-save-hook 'copyright-update)
  133. ;; the below doesn't seem to work for debbugs-gnu-search, because it doesn't.
  134. ;; with other debbugs function it does work.
  135. (setq debbugs-gnu-default-packages '("guix" "guix-patches"))
  136. ; vertigo is giving me odd issues when I use debbugs-gnu-bugs directly.
  137. (defun debbugs-get-bug-by-id ()
  138. (interactive)
  139. (debbugs-gnu-bugs (read-number "What is the bug number: ")))
  140. (defun debbugs-gnu-copy-debbugs-url ()
  141. "Add to the kill ring the URL of the Debbugs issue at point."
  142. (interactive)
  143. (let ((url1 (concat "https://bugs.gnu.org"
  144. (number-to-string (debbugs-gnu-current-id))))
  145. (url2 (concat "https://issues.guix.gnu.org"
  146. (number-to-string (debbugs-gnu-current-id)))))
  147. (kill-new url1)
  148. (kill-new url2)
  149. (message "Copied %s and %s" url1 url2)))
  150. (defmacro defun-bug->url (name url &optional docstring)
  151. "Macro returning yankage #bug URL.
  152. The `interactive' function that the macro returns is then referred by NAME.
  153. Please provide a DOCSTRING."
  154. (let ((fun (intern (symbol-name name)))
  155. (doc (concat docstring "\n\n"
  156. (format "Yankable result: `%sNUMBER'." url))))
  157. `(defun ,fun (number)
  158. ,doc
  159. (interactive
  160. (list
  161. (progn
  162. (when (not (boundp 'debbugs-gnu-bug-number))
  163. (setq debbugs-gnu-bug-number -2))
  164. (read-string
  165. (format "Bug number (%s): " debbugs-gnu-bug-number)
  166. nil nil debbugs-gnu-bug-number))))
  167. (let ((str (format "%s%s" ,url number)))
  168. (kill-new str)
  169. (when current-prefix-arg
  170. (browse-url str))
  171. (message (format "%s killed." str))))))
  172. (defun-bug->url my/guix-issues "http://issues.guix.gnu.org/issue/"
  173. "Add URL of bug NUMBER to `kill-ring'.")
  174. (defun-bug->url my/guix-debbugs "https://debbugs.gnu.org/cgi/bugreport.cgi?bug="
  175. "Add (old) URL of bug NUMBER to `kill-ring'.")
  176. (defun my/guix-data (package)
  177. "Add URL of PACKAGE to `kill-ring'.
  178. Yankable result:
  179. `https://data.guix.gnu.org/repository/1/branch/master/package/PACKAGE/output-history'.
  180. With `universal-argument', load URL using `browse-url'."
  181. (interactive "sPackage: ")
  182. (let ((url
  183. (format
  184. "https://data.guix.gnu.org/repository/1/branch/master/package/%s/output-history" package)))
  185. (kill-new url)
  186. (when current-prefix-arg
  187. (browse-url url))
  188. (message (format "%s killed." url))))
  189. ;; add in a hook for debbugs, after you search for bugs, run the command,
  190. ;; debbugs-gnu-toggle-suppress (bound to x). Then will hide closed bug reports.
  191. ;; TODO make it so that you can press x by default
  192. ;; aka hide all of the closed bugs. The below line doesn't work
  193. ;;(add-hook 'debbugs-gnu-mode 'debbugs-gnu-toggle-suppress)
  194. ;; the highlight line in the console make it hard to read the text.
  195. ;;(remove-hook 'doom-first-buffer-hook 'global-hl-line-mode)
  196. (global-set-key (kbd "C-c t") #'transpose-chars)
  197. (global-set-key (kbd "C-c T") #'transpose-words)
  198. (defun delete-this-file-and-buffer ()
  199. "Kill the current buffer and deletes the file it is visiting."
  200. (interactive)
  201. (let ((filename (buffer-file-name)))
  202. (when filename
  203. (if (vc-backend filename)
  204. (vc-delete-file filename)
  205. (progn
  206. (delete-file filename)
  207. (message "Deleted file %s" filename)
  208. (kill-buffer))))))
  209. (defun rename-this-file-and-buffer ()
  210. "Rename the current buffer and file it is visiting."
  211. (interactive)
  212. (let ((filename (buffer-file-name)))
  213. (if (not (and filename (file-exists-p filename)))
  214. (message "Buffer is not visiting a file!")
  215. (let ((new-name (read-file-name "New name: " filename)))
  216. (cond
  217. ((vc-backend filename) (vc-rename-file filename new-name))
  218. (t
  219. (rename-file filename new-name t)
  220. (set-visited-file-name new-name t t)))))))
  221. (global-set-key (kbd "C-x C-k") #'delete-this-file-and-buffer)
  222. (global-set-key (kbd "C-x C-r") #'rename-this-file-and-buffer)
  223. (setq auto-save-timeout 5)
  224. (defun paredit-barf-all-the-way-backward ()
  225. (interactive)
  226. (paredit-split-sexp)
  227. (paredit-backward-down)
  228. (paredit-splice-sexp))
  229. (defun paredit-barf-all-the-way-forward ()
  230. (interactive)
  231. (paredit-split-sexp)
  232. (paredit-forward-down)
  233. (paredit-splice-sexp)
  234. (if (eolp) (delete-horizontal-space)))
  235. (defun paredit-slurp-all-the-way-backward ()
  236. (interactive)
  237. (catch 'done
  238. (while (not (bobp))
  239. (save-excursion
  240. (paredit-backward-up)
  241. (if (eq (char-before) ?\()
  242. (throw 'done t)))
  243. (paredit-backward-slurp-sexp))))
  244. (defun paredit-slurp-all-the-way-forward ()
  245. (interactive)
  246. (catch 'done
  247. (while (not (eobp))
  248. (save-excursion
  249. (paredit-forward-up)
  250. (if (eq (char-after) ?\))
  251. (throw 'done t)))
  252. (paredit-forward-slurp-sexp))))
  253. (add-hook! 'emacs-lisp-mode-hook #'paredit-mode)
  254. (add-hook! 'emacs-lisp-mode-hook #'evil-paredit-mode)
  255. (add-hook! 'emacs-lisp-mode-hook #'display-fill-column-indicator-mode)
  256. (after! emacs-lisp
  257. (define-key emacs-lisp-mode-map (kbd "C-c ^") 'raise-sexp)
  258. (define-key emacs-lisp-mode-map (kbd "C-c 0") 'paredit-forward-slurp-sexp)
  259. (define-key emacs-lisp-mode-map (kbd "C-c 9") 'paredit-backward-slurp-sexp)
  260. (define-key emacs-lisp-mode-map (kbd "C-c ]") 'paredit-forward-barf-sexp)
  261. (define-key emacs-lisp-mode-map (kbd "C-c [") 'paredit-backward-barf-sexp)
  262. (define-key emacs-lisp-mode-map (kbd "C-c )") 'paredit-slurp-all-the-way-forward)
  263. (define-key emacs-lisp-mode-map (kbd "C-c }") 'paredit-barf-all-the-way-forward)
  264. (define-key emacs-lisp-mode-map (kbd "C-c (") 'paredit-slurp-all-the-way-backward)
  265. (define-key emacs-lisp-mode-map (kbd "C-c {") 'paredit-barf-all-the-way-backward))
  266. (add-hook! 'scheme-mode-hook #'paredit-mode)
  267. (add-hook! 'scheme-mode-hook #'evil-paredit-mode)
  268. ;; display the 80th column. My code should NOT exceed that.
  269. (add-hook! 'scheme-mode-hook #'display-fill-column-indicator-mode)
  270. (after! scheme
  271. (define-key scheme-mode-map (kbd "C-c D") #'geiser-edit-symbol-at-point)
  272. (define-key scheme-mode-map (kbd "C-c ^") 'raise-sexp)
  273. (define-key scheme-mode-map (kbd "C-c 0") 'paredit-forward-slurp-sexp)
  274. (define-key scheme-mode-map (kbd "C-c 9") 'paredit-backward-slurp-sexp)
  275. (define-key scheme-mode-map (kbd "C-c ]") 'paredit-forward-barf-sexp)
  276. (define-key scheme-mode-map (kbd "C-c [") 'paredit-backward-barf-sexp)
  277. (define-key scheme-mode-map (kbd "C-c )") 'paredit-slurp-all-the-way-forward)
  278. (define-key scheme-mode-map (kbd "C-c }") 'paredit-barf-all-the-way-forward)
  279. (define-key scheme-mode-map (kbd "C-c (") 'paredit-slurp-all-the-way-backward)
  280. (define-key scheme-mode-map (kbd "C-c {") 'paredit-barf-all-the-way-backward))
  281. ;; some of my global key bindings
  282. (global-set-key (kbd "C-c TAB") #'indent-whole-buffer)
  283. ;; when point is between two words, delete the space between them
  284. (global-set-key (kbd "C-c \\") #'delete-horizontal-space)
  285. (global-set-key (kbd "C-c SPC") #'just-one-space)
  286. (global-set-key (kbd "C-c $") #'org-archive-subtree)
  287. (with-eval-after-load 'flyspell
  288. (define-key flyspell-mode-map (kbd "C-c $") nil))
  289. ;; some modes my default / in normal mode is NOT bound to helm-swoop, BUT I REALLY LIKE helm-swoop
  290. (global-set-key (kbd "C-c /") #'helm-swoop)
  291. (global-set-key (kbd "C-c C-o") #'org-open-at-point-global)
  292. (global-set-key (kbd "C-c ;") #'comment-dwim)
  293. (global-set-key (kbd "C-c a") 'org-agenda)
  294. (global-set-key (kbd "C-c b") #'(lambda ()
  295. "Switch to the previous buffer"
  296. (interactive)
  297. (switch-to-buffer nil)))
  298. (global-set-key (kbd "C-c B") #'browse-kill-ring)
  299. (global-set-key (kbd "C-c C") #'hydra-org-timer/body)
  300. ;;org-capture is SOOO helpful!!
  301. (global-set-key (kbd "C-c c") 'org-capture)
  302. ;;open up a new dired window for the current directory
  303. (global-set-key (kbd "C-c d") #'dired-jump)
  304. ;; find the current tag smart. Just know what I mean.
  305. ;; For example, with point on the following javascript function upcaseWord
  306. ;; var upcase = upcaseWord (string);
  307. ;; And you type C-c D, ggtags, when open the buffer where that function is defined
  308. ;;(global-set-key (kbd "C-c D") 'ggtags-find-tag-dwim)
  309. (global-set-key (kbd "C-c D") #'dumb-jump-go)
  310. (global-set-key (kbd "C-c e") #'helm-M-x)
  311. (global-set-key (kbd "C-c E") #'eshell)
  312. (global-set-key (kbd "C-c f") #'isearch-forward-regexp)
  313. (global-set-key (kbd "C-c F") #'isearch-backward-regexp)
  314. ;; open up email mail program
  315. (global-set-key (kbd "C-c h") #'helm-command-prefix)
  316. (global-set-key (kbd "C-c i") #'info-display-manual)
  317. ;; type this with point at the end of an elisp expression like
  318. ;; (print 5)<point>
  319. ;; the result will be 5 printed in the minibuffer
  320. (global-set-key (kbd "C-c l") #'eval-last-sexp)
  321. ;;this lets you store an org link from pretty much any file
  322. ;;then type C-c C-l in an org buffer and it'll put that link it
  323. (global-set-key (kbd "C-c L") #'org-store-link)
  324. (global-set-key (kbd "C-c I") #'org-insert-link)
  325. (global-set-key (kbd "C-c m") #'helm-mini)
  326. ;;print the working directory in the minibuffer
  327. ;; I should make these commands copy the output of pwd into the clipboard
  328. (global-set-key (kbd "C-c P") #'pwd)
  329. ;;(global-set-key (kbd "C-c p") #'pwd)
  330. ;;This does recursive find and replace. But I think it only works when you are in a dired buffer
  331. (global-set-key (kbd "C-c R") #'find-name-dired)
  332. (after! mu4e
  333. ;; (setq sendmail-program (executable-find "msmtp")
  334. ;; send-mail-function #'smtpmail-send-it
  335. ;; message-sendmail-f-is-evil t
  336. ;; message-sendmail-extra-arguments '("--read-envelope-from")
  337. ;; message-send-mail-function #'message-send-mail-with-sendmail)
  338. (set-email-account! "jbranso@dismail.de"
  339. '((mu4e-sent-folder . "/Sent")
  340. (mu4e-drafts-folder . "/Drafts")
  341. (mu4e-trash-folder . "/Trash")
  342. (smtpmail-smtp-user . "jbranso@dismail.de")
  343. (user-mail-address . "jbranso@dismail.de")
  344. (mu4e-compose-signature . "---\nYou have greatness within you.\n -Les Brown"))
  345. t))
  346. ;; EMMS is cool, but the web interface to libre.fm is better.
  347. ;; make mpv be the player that plays the songs. Emacs is not so great with audio.
  348. ;;(setq emms-player-list '(emms-player-mpv))
  349. ;; set up emms to let me play libre.fm songs.
  350. ;;(emms-all)
  351. ;; to enable the scrobbler
  352. ;;(emms-librefm-scrobbler-enable)
  353. ;;Then invoke emms-librefm-stream and enter the URL of the station you wish to listen to, for example “librefm://globaltags/Classical”.
  354. ;;; Org customizations
  355. ;; org-babel-load-languages and org-export-backends can be commented out
  356. ;; when doom emacs' org-mode works again. For now, I have to use emacs-org.
  357. ;; (org-babel-do-load-languages
  358. ;; 'org-babel-load-languages
  359. ;; '((emacs-lisp . t)
  360. ;; (shell . t)
  361. ;; (scheme . t)))
  362. ;;(setq org-export-backends '(ascii html latex md texinfo odt))
  363. ;; If you use `org' and don't want your org files in the default location below,
  364. ;; change `org-directory'. It must be set before org loads!
  365. (setq org-directory "~/prog/org/")
  366. (setq org-agenda-include-diary t
  367. diary-file "~/.doom.d/diary")
  368. (add-hook! 'org-mode-hook 'auto-fill-mode)
  369. (add-hook! 'texinfo-mode-hook 'auto-fill-mode)
  370. (add-hook! 'Texinfo-mode-hook 'auto-fill-mode)
  371. (add-hook! 'texinfo-mode-hook #'display-fill-column-indicator-mode)
  372. ;; this bit of code is causing org-mode to NOT work.
  373. ;; I used it to generate a letter for Marcin in gtd.org
  374. ;; (add-hook 'org-mode-hook
  375. ;; (lambda ()
  376. ;; (add-to-list 'org-latex-classes
  377. ;; '("letter"
  378. ;; "\\documentclass{letter}"
  379. ;; ("\\section{%s}" . "\\section*{%s}")
  380. ;; ("\\subsection{%s}" . "\\subsection*{%s}")
  381. ;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))))
  382. (after! org
  383. ;; If I have any other org files that I want to add,
  384. ;; just add the file's parent directory here.
  385. (setq org-agenda-files (list org-directory
  386. (concat org-directory "projects/")))
  387. (setq eucharist-head
  388. "<nav>
  389. <a href=\"/\">&lt; Home</a>
  390. </nav>
  391. <div id=\"updated\">Updated: %C</div>")
  392. (setq eucharist-footer
  393. "<footer>
  394. <div class=\"copyright-container\">
  395. <div class=\"copyright\">
  396. Copyright &copy; 2017-2020 Thomas Ingram some rights reserved<br/>
  397. Content is available under
  398. <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/4.0/\">
  399. CC-BY-SA 4.0
  400. </a> unless otherwise noted
  401. </div>
  402. <div class=\"cc-badge\">
  403. <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/4.0/\">
  404. <img alt=\"Creative Commons License\"
  405. src=\"https://i.creativecommons.org/l/by-sa/4.0/88x31.png\" />
  406. </a>
  407. </div>
  408. </div>
  409. <div class=\"generated\">
  410. Created with %c on <a href=\"https://www.gnu.org\">GNU</a>/<a href=\"https://www.kernel.org/\">Linux</a>
  411. </div>
  412. </footer>")
  413. (setq org-publish-project-alist
  414. `(
  415. ("eucharist.org pages" :base-directory "~/prog/org/projects/eucharist/"
  416. :publishing-directory "~/prog/org/projects/eucharist/site/"
  417. :html-doctype "html5"
  418. :html-html5-fancy t
  419. :html-head "<link rel=\"stylesheet\" href=\"./media/style.css\" type=\"text/css\"/>"
  420. :with-toc nil
  421. :section-numbers nil
  422. :html-preamble ,eucharist-head
  423. :html-postamble ,eucharist-footer
  424. :recursive nil)
  425. ("eucharist.org blog" :base-directory "~/prog/org/projects/eucharist/blog/"
  426. :publishing-directory "~/prog/org/projects/eucharist/site/blog/"
  427. :auto-sitemap t
  428. :sitemap-title "Blog"
  429. :sitemap-filename "index.org"
  430. :sitemap-sort-files anti-chronologically
  431. :html-doctype "html5"
  432. :html-html5-fancy t
  433. :html-head "<link rel=\"stylesheet\" href=\"./media/style.css\" type=\"text/css\"/>"
  434. :with-toc nil
  435. :section-numbers nil
  436. :html-preamble ,eucharist-head
  437. :html-postamble ,eucharist-footer)
  438. ("eucharist.org media" :base-directory "~/prog/org/projects/eucharist/media"
  439. :base-extension "css\\|txt\\|jpg\\|gif\\|png"
  440. :recursive t
  441. :publishing-directory "~/prog/org/projects/eucharist/site/media"
  442. :publishing-function org-publish-attachment)
  443. ("eucharist.org" :components ("eucharist.org pages" "eucharist.org media"
  444. "eucharist.org blog"))))
  445. ;;(setq org-export-backends '(ascii html latex odt md texinfo))
  446. (setq my-base-dir "~/prog/org/projects/"
  447. my-todo-string "* TODO %?\nEntered on %U\n %i\n %a"
  448. my-someday-string "* %?\nEntered on %U\n %i\n %a"
  449. my-reference-string "* %?\nEntered on %U\n %i\n %a"
  450. org-capture-templates
  451. `(
  452. ("B" "Things I want to buy" entry
  453. (file+headline ,(concat my-base-dir "managing-my-monies.org")
  454. "things I want to buy")
  455. ,my-reference-string)
  456. ("c" "Computers Anything")
  457. ;; Emacs things
  458. ("ce" "Emacs")
  459. ("ceb" "bugs" entry
  460. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "Emacs bugs someday")
  461. ,my-someday-string)
  462. ("ceb" "evil-mode someday" entry
  463. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "evil someday")
  464. ,my-todo-string)
  465. ("cef" "flycheck someday" entry
  466. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "flycheck-mode")
  467. ,my-todo-string)
  468. ("ceo" "Org-mode someday" entry
  469. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "org mode someday")
  470. ,my-someday-string)
  471. ("ceR" "Emacs Reference")
  472. ("ceRR" "Emacs Reference" entry
  473. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "emacs reference")
  474. ,my-reference-string)
  475. ("ceRe" "emacs evil reference" entry
  476. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "evil reference")
  477. ,my-todo-string)
  478. ("ceRg" "emacs gnus reference" entry
  479. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "gnus reference")
  480. ,my-reference-string)
  481. ("ceRo" "emacs org reference" entry
  482. (file+headline ,
  483. (concat my-base-dir "become-an-awesome-hacker.org") "org reference")
  484. ,my-reference-string)
  485. ("ceRm" "emacs magit reference" entry
  486. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "tags reference")
  487. ,my-reference-string)
  488. ("ceRt" "emacs tags reference" entry
  489. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "tags reference")
  490. ,my-reference-string)
  491. ("cet" "emacs Todo")
  492. ("cett" "emacs Todo" entry
  493. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "emacs someday")
  494. ,my-someday-string)
  495. ("cete" "emacs evil someday" entry
  496. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "evil someday")
  497. ,my-someday-string)
  498. ("cetf" "emacs flycheck someday" entry
  499. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "flycheck someday")
  500. ,my-someday-string)
  501. ("cetg" "emacs gnus someday" entry
  502. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "gnus someday")
  503. ,my-someday-string)
  504. ("ceth" "emacs helm someday" entry
  505. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "helm someday")
  506. ,my-someday-string)
  507. ("ceto" "emacs org someday" entry
  508. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "org someday")
  509. ,my-someday-string)
  510. ("cetT" "emacs tags someday" entry
  511. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "tags someday")
  512. ,my-todo-string)
  513. ("cetw" "web-mode someday" entry
  514. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "web-mode someday")
  515. ,my-todo-string)
  516. ;;End Emacs things
  517. ("cG" "Gimp Basics Reference" entry
  518. (file+headline "~/prog/cheatsheets/gimp.org" "Basic Concepts")
  519. ,my-reference-string)
  520. ("cg" "Guix someday" entry
  521. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "Guix someday")
  522. ,my-someday-string)
  523. ("cH" "The GNU HURD")
  524. ("cHt" "Hurd" entry
  525. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org")
  526. "Hurd")
  527. ,my-someday-string)
  528. ("ct" "General Computer TODO"
  529. entry
  530. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "General TODO")
  531. ,my-someday-string)
  532. ("ch" "high star todo"
  533. entry
  534. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "make high star an android app")
  535. "* todo %?\n %i\n %a")
  536. ("cl" "linux TODO" entry
  537. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "linux someday")
  538. ,my-someday-string)
  539. ("cL" "Linux Reference" entry
  540. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "linux reference")
  541. ,my-reference-string)
  542. ("co" "organ TODO" entry
  543. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "make organ an android app")
  544. ,my-someday-string)
  545. ("cf" "Free the world" entry
  546. (file+headline "~/prog/org/gtd.org" "free the world free content")
  547. ,my-reference-string)
  548. ("cW" "Web")
  549. ("cWB" "Bootstrap Reference" entry
  550. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "Bootstrap reference")
  551. ,my-reference-string)
  552. ("cWW" "Web reference" entry
  553. (file+headline ,(concat my-base-dir "become-an-awesome-hacker.org") "Web reference")
  554. ,my-reference-string)
  555. ;; make a HTML reference or CSS reference
  556. ("C" "Community")
  557. ("Cc" "community TODO" entry
  558. (file+headline ,(concat my-base-dir "being-social.org") "community someday")
  559. ,my-someday-string)
  560. ("Cn" "nice things to say" entry
  561. (file+headline "~/prog/org/projects/get-close-to-God.org" "nice things to say")
  562. ,my-someday-string)
  563. ("Cs" "Social Skills Notes" entry
  564. (file+headline ,(concat my-base-dir "being-social.org") "Social Skills Notes")
  565. ,my-reference-string)
  566. ("A" "Calendar TODO" entry
  567. (file+headline "~/prog/org/gtd.org" "Calendar")
  568. ,my-todo-string)
  569. ("e" "entertainment")
  570. ("eb" "Books to Read" entry
  571. (file+headline ,(concat my-base-dir "whatever-I-want.org")
  572. "Books to Read") "* %i\n %a")
  573. ("eM" "Good Movies Reference" entry
  574. (file+headline ,(concat my-base-dir "whatever-I-want.org") "Good Movies") "* %i\n %a")
  575. ("em" "movies to watch" entry
  576. (file+headline ,(concat my-base-dir "whatever-I-want.org") "movies to watch") "* %i\n %a")
  577. ("eU" "good music reference" entry
  578. (file+headline ,(concat my-base-dir "whatever-I-want.org")
  579. "good music reference") "* %i\n %a")
  580. ("eg" "games to play" entry
  581. (file+headline ,(concat my-base-dir "whatever-I-want.org")
  582. "games to play") "* %i\n %a")
  583. ("g" "getting close to God")
  584. ("gg" "get a close friend" entry
  585. (file+headline "/home/joshua/prog/org/projects/get-close-to-God.org"
  586. "get a close friend") ,my-someday-string)
  587. ("gb" "Boundaries")
  588. ("gbn" "Boundary Notes" entry
  589. (file+headline "~/prog/org/gtd.org" "Boundary Notes")
  590. ,my-reference-string)
  591. ("gbl" "Lowering My Expectations of Myself" entry
  592. (file+headline "~/prog/org/gtd.org"
  593. "Lowering My Expectations of Myself")
  594. ,my-reference-string)
  595. ("gbs" "Boundaries To Enforce" entry
  596. (file+headline "~/prog/org/projects/get-close-to-God.org" "Setting Boundaries")
  597. ,my-someday-string)
  598. ("M" "Math")
  599. ("Mf" "fun math problems" entry
  600. (file+headline "/home/joshua/prog/org/projects/math.org" "fun math problems") ,my-someday-string)
  601. ("p" "payless TODO" entry
  602. (file+headline "~/prog/org/gtd.org" "shopping todo")
  603. ,my-someday-string)
  604. ("r" "Reference" entry
  605. (file+headline "~/prog/org/gtd.org" "general reference")
  606. ,my-reference-string)
  607. ("t" "TODO" entry
  608. (file+headline "~/prog/org/gtd.org" "general todo")
  609. ,my-todo-string)
  610. ("w" "Weblink" entry
  611. (file (expand-file-name "~/prog/org/gtd.org" "org capture"))
  612. "* %c\n :PROPERTIES:\n :CREATED: %U\n :END:\n - Quote:\n %i" :unnarrowed)
  613. ("q" "Quotations" entry
  614. (file+headline "~/prog/org/quotes.org" "Quotations")
  615. ,my-reference-string)
  616. ))
  617. (setq org-startup-folded t))
  618. ;; This determines the style of line numbers in effect. If set to `nil', line
  619. ;; numbers are disabled. For relative line numbers, set this to `relative'.
  620. (setq display-line-numbers-type t)
  621. ;; irc stuff.
  622. ;; M-x irc to use rcirc, which is more lightweight.
  623. ;; Change user info
  624. ;;(setq rcirc-default-nick "gnucode")
  625. ;;(setq rcirc-default-user-name "jab")
  626. ;;(setq rcirc-default-full-name "Joshua Branson")
  627. ;;
  628. ;;(setq rcirc-server-alist
  629. ;; '(("irc.libera.chat" :port 6697 :encryption tls
  630. ;; :channels ("#openbsd" "#emacs" "#hurd #guix"))))
  631. (setq projectile-project-search-path '("~/prog/"))
  632. (after! projectile
  633. (setq projectile-project-root-files-bottom-up
  634. (remove ".git" projectile-project-root-files-bottom-up)))
  635. ;; hide join/quit messages in irc
  636. ;; circe by default shows you which channels have new messages.
  637. ;; I would prefer it to only show channels where someone has sent me a message.
  638. (after! circe
  639. (set-company-backend! 'circe-mode nil)
  640. (setq circe-reduce-lurker-spam t)
  641. (set-irc-server! "irc.libera.chat"
  642. `(:tls t
  643. :port 6697
  644. :nick "gnucode"
  645. :sasl-username "jab"
  646. :sasl-password "babbages"
  647. :channels ("#hurd" "#emacs" "#guix" "#openbsd" "#whereiseveryone"))))
  648. ;; FIX this so it works. I still get messages for anyone who talks in the rooms,
  649. ;; which is kind of annoying.
  650. ;; (after! erc
  651. ;; (setq erc-autojoin-channels-alist '(
  652. ;; ;;("freenode.net" "#archlinux")
  653. ;; ;;("ircs://irc.oftc.net:6697" "#awesome")
  654. ;; ;;("freenode.net" "#deskthority")
  655. ;; ;;("freenode.net" "#erc")
  656. ;; ("libera.chat" "#emacs")
  657. ;; ;;("libera.chat" "#fsf")
  658. ;; ;;("libera.chat" "#gnupg")
  659. ;; ("libera.chat" "#gnus")
  660. ;; ("libera.chat" "#guix")
  661. ;; ("libera.chat" "#guile")
  662. ;; ("libera.chat" "#hurd")
  663. ;; ("libera.chat" "#org-mode")
  664. ;; ;;("libera.chat" "#openhatch")
  665. ;; ("libera.chat" "#nginx")
  666. ;; ;;regular meeting take place every thursday at 19:00 UTC
  667. ;; ;; get questions answered about building your own keyboard
  668. ;; ;; https://www.parabola.nu/
  669. ;; ;;("libera.chat" "#parabola")
  670. ;; ;;purdue users group
  671. ;; ;;("libera.chat" "#purduelug")
  672. ;; ("libera.chat" "#wordpress")
  673. ;; ;;("libera.chat" "#znc")
  674. ;; ;;("libera.chat" "#debian-hurd")
  675. ;; ("irc.w3.org" "#social") ; Chris web's social incubator group for activity pub
  676. ;; )
  677. ;; ;; Rename server buffers to reflect the current network name instead
  678. ;; ;; of SERVER:PORT. (e.g. "freenode" instead of "irc.freenode.net:6667"). This
  679. ;; ;; is useful when using a bouncer like ZNC where you have multiple
  680. ;; ;; connections to the same server.
  681. ;; erc-rename-buffers t
  682. ;; ;; set the default nick
  683. ;; erc-nick "gnucode"
  684. ;; ;;erc-prompt-for-password t
  685. ;; erc-hide-list '("JOIN" "PART" "QUIT")
  686. ;; ;; don't let erc switch the active buffer when it connects to a new channel when erc is starting up
  687. ;; ;; this gets annoying because when I'm starting up emacs, it'll switch to "#arch", then "#hurd", then "#org-mode".
  688. ;; ;; it's very weird. But after erc has loaded and those initial buffers come up, I want erc to jump to a new channel
  689. ;; ;; when I try to join it
  690. ;; erc-join-buffer 'bury
  691. ;; erc-port 6697
  692. ;; ;; Interpret mIRC-style color commands in IRC chats
  693. ;; erc-interpret-mirc-color t)
  694. ;; (defun my/connect-to-erc ()
  695. ;; (interactive)
  696. ;; (erc-tls :server "irc.libera.chat" :port "6697"
  697. ;; :nick "jab")))
  698. (setq flycheck-global-modes (list 'scheme-mode 'emacs-lisp-mode))
  699. ;; Here are some additional functions/macros that could help you configure Doom:
  700. ;;
  701. ;; - `load!' for loading external *.el files relative to this one
  702. ;; - `use-package!' for configuring packages
  703. ;; - `after!' for running code after a package has loaded
  704. ;; - `add-load-path!' for adding directories to the `load-path', relative to
  705. ;; this file. Emacs searches the `load-path' when you load packages with
  706. ;; `require' or `use-package'.
  707. ;; - `map!' for binding new keys
  708. ;;
  709. ;; To get information about any of these functions/macros, move the cursor over
  710. ;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
  711. ;; This will open documentation for it, including demos of how they are used.
  712. ;;
  713. ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
  714. ;; they are implemented.