Cleaned Emacs.org, Removed Unused Packages

This commit is contained in:
ry
2021-12-11 23:27:50 -08:00
parent ef2bb71849
commit 19a7a61ab0
3 changed files with 109 additions and 93 deletions

View File

@@ -1,15 +1,22 @@
(add-to-list 'load-path "~/bin/emacs-ob-racket") (add-to-list 'load-path "~/.guix-profile/bin/guile")
;; Match Emacs program path to be the same as user shell
(defun set-exec-path-from-shell-PATH ()
"Set up Emacs' `exec-path' and PATH environment variable to match
that used by the user's shell.
(interactive)
(let ((path-from-shell (replace-regexp-in-string
"[ \t\n]*$" "" (shell-command-to-string
"$SHELL --login -c 'echo $PATH'"))))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(set-exec-path-from-shell-PATH)
;; Setting general info ;; Setting general info
(setq user-full-name "Ry" (setq user-full-name "Ry"
user-mail-address "ry@opal.sh") user-mail-address "ry@opal.sh")
;; load theme
(setq doom-theme 'modus-operandi)
;; Set org agenda dir
(setq org-directory "~/org/")
;; Set line number ;; Set line number
(setq display-line-numbers-type t) (setq display-line-numbers-type t)
@@ -18,11 +25,6 @@
;; Add this hook to ERC if I run into trouble with truncated lines in other modes. ;; Add this hook to ERC if I run into trouble with truncated lines in other modes.
;; (add-hook 'erc-mode-hook (lambda () (setq-default truncate-lines nil))) ;; (add-hook 'erc-mode-hook (lambda () (setq-default truncate-lines nil)))
;; Set visible bell
(setq visible-bell t)
;; Enable clipboard
(setq x-select-enable-clipboard t)
;; Only enable line numbers for certain modes ;; Only enable line numbers for certain modes
(dolist (mode '(org-mode-hook (dolist (mode '(org-mode-hook
@@ -31,6 +33,12 @@
eshell-mode-hook)) eshell-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0)))) (add-hook mode (lambda () (display-line-numbers-mode 0))))
;; Enable clipboard
(setq x-select-enable-clipboard t)
;; load theme
(setq doom-theme 'modus-operandi)
;; Configure Modus theme ;; Configure Modus theme
(use-package modus-themes (use-package modus-themes
:init :init
@@ -83,7 +91,9 @@
(set-face-attribute 'line-number nil :inherit 'fixed-pitch) (set-face-attribute 'line-number nil :inherit 'fixed-pitch)
(set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch))
;; General setttings ;; Set org agenda dir
(setq org-directory "~/org/")
(defun rymacs/org-mode-setup () (defun rymacs/org-mode-setup ()
(org-indent-mode) (org-indent-mode)
(variable-pitch-mode 1) (variable-pitch-mode 1)
@@ -95,7 +105,6 @@
:hook (org-mode . rymacs/org-mode-setup) :hook (org-mode . rymacs/org-mode-setup)
:config :config
(setq org-ellipsis " ") (setq org-ellipsis " ")
(setq org-agenda-start-with-log-mode t) (setq org-agenda-start-with-log-mode t)
(setq org-log-done 'time) (setq org-log-done 'time)
(setq org-log-into-drawer t) (setq org-log-into-drawer t)
@@ -291,8 +300,8 @@
;; Refresh mail using isync every 5 minutes ;; Refresh mail using isync every 5 minutes
(setq mu4e-update-interval (* 5 60)) (setq mu4e-update-interval (* 5 60))
(setq mu4e-get-mail-command "mbsync -a -c ~/dotfiles/.config/mbsync/mbsyncrc") (setq mu4e-get-mail-command "mbsync -a -c ~/Dotfiles/.config/mbsync/mbsyncrc")
(setq mu4e-maildir "~/mail") (setq mu4e-maildir "~/Mail")
(setq mu4e-contexts (setq mu4e-contexts
(list (list
@@ -322,22 +331,10 @@
erc-track-shorten-start 8 erc-track-shorten-start 8
erc-kill-buffer-on-part t erc-kill-buffer-on-part t
erc-auto-query 'bury erc-auto-query 'bury
erc-fill-column 120 erc-fill-column 90
erc-fill-function 'erc-fill-static erc-fill-function 'erc-fill-static
erc-fill-static-center 20 erc-fill-static-center 20
erc-track-visibility nil erc-track-visibility nil
erc-interpret-mirc-color t erc-interpret-mirc-color t
erc-rename-buffers t erc-rename-buffers t
erc-track-exclude-server-buffer t) erc-track-exclude-server-buffer t)
(global-set-key (kbd "C-x w") 'elfeed) ; set elfeed keybind
(setq elfeed-feeds
'(; websites
"https://landchad.net/rss.xml"
"http://stallman.org/rss/rss.xml"
"https://guix.gnu.org/feeds/blog.atom"
; twitter/nitter
"https://nitter.net/fsf/rss"
; tube
"https://odysee.com/$/rss/@AlphaNerd:8"))

View File

@@ -84,7 +84,7 @@
grammar ; tasing grammar mistake every you make grammar ; tasing grammar mistake every you make
:tools :tools
ansible ;;ansible
;;debugger ; FIXME stepping through code, to help you add bugs ;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv ;;direnv
docker docker
@@ -131,13 +131,13 @@
;;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
;;(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
;;idris ; a language you can depend on ;;idris ; a language you can depend on
json ; At least it ain't XML ;;json ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome ;;(java +meghanada) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here)))))) ;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB ;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script) ;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun ;;latex ; writing papers in Emacs has never been so fun
@@ -158,7 +158,7 @@
;;raku ; the artist formerly known as perl6 ;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client ;;rest ; Emacs as a REST client
;;rst ; ReST in peace ;;rst ; ReST in peace
(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good ;;scala ; java, but good
(scheme +guile) ; a fully conniving family of lisps (scheme +guile) ; a fully conniving family of lisps

137
Emacs.org
View File

@@ -1,25 +1,64 @@
#+title: Emacs Custom Configuration File #+title: Emacs Custom Configuration File
#+PROPERTY: header-args:emacs-lisp :tangle ~/dotfiles/.config/doom/config.el :mkdirp yes :lexical yes #+PROPERTY: header-args:emacs-lisp :tangle ~/Dotfiles/.config/doom/config.el :mkdirp yes :lexical yes
* Preface * Configuration
:PROPERTIES:
:VISITBILITY: children
:END:
This document contains the fundamental elements of my Emacs configuration. Changes made to this file will reflect in init.el. ** Table of Contents :TOC_3_gh:
* General Configuration - [[#configuration][Configuration]]
- [[#general][General]]
- [[#load-paths][Load Paths]]
- [[#user-info][User Info]]
- [[#visual][Visual]]
- [[#misc][Misc]]
- [[#theme][Theme]]
- [[#fonts][Fonts]]
- [[#org][Org]]
- [[#fonts-and-symbols][Fonts and Symbols]]
- [[#general-1][General]]
- [[#better-heading-bullets][Better Heading Bullets]]
- [[#center-org-buffers][Center Org Buffers]]
- [[#org-babel][Org Babel]]
- [[#racket-specific-language][Racket Specific Language]]
- [[#babel-languages][Babel Languages]]
- [[#soure-block-creation-shortcuts][Soure Block Creation Shortcuts]]
- [[#babel-configuration-file-automation-hook][Babel Configuration File Automation Hook]]
- [[#org-roam][Org Roam]]
- [[#deft-configuration][Deft Configuration]]
- [[#mu4e-e-mail][Mu4e (E-mail)]]
- [[#erc-irc][ERC (IRC)]]
** General
*** Load Paths
#+begin_src emacs-lisp #+begin_src emacs-lisp
(add-to-list 'load-path "~/.guix-profile/bin/guile")
(add-to-list 'load-path "~/bin/emacs-ob-racket") ;; Match Emacs program path to be the same as user shell
(defun set-exec-path-from-shell-PATH ()
"Set up Emacs' `exec-path' and PATH environment variable to match
that used by the user's shell.
(interactive)
(let ((path-from-shell (replace-regexp-in-string
"[ \t\n]*$" "" (shell-command-to-string
"$SHELL --login -c 'echo $PATH'"))))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(set-exec-path-from-shell-PATH)
#+end_src
*** User Info
#+begin_src emacs-lisp
;; Setting general info ;; Setting general info
(setq user-full-name "Ry" (setq user-full-name "Ry"
user-mail-address "ry@opal.sh") user-mail-address "ry@opal.sh")
#+end_src
;; load theme *** Visual
(setq doom-theme 'modus-operandi) #+begin_src emacs-lisp
;; Set org agenda dir
(setq org-directory "~/org/")
;; Set line number ;; Set line number
(setq display-line-numbers-type t) (setq display-line-numbers-type t)
@@ -29,11 +68,6 @@ This document contains the fundamental elements of my Emacs configuration. Chang
;; Add this hook to ERC if I run into trouble with truncated lines in other modes. ;; Add this hook to ERC if I run into trouble with truncated lines in other modes.
;; (add-hook 'erc-mode-hook (lambda () (setq-default truncate-lines nil))) ;; (add-hook 'erc-mode-hook (lambda () (setq-default truncate-lines nil)))
;; Set visible bell
(setq visible-bell t)
;; Enable clipboard
(setq x-select-enable-clipboard t)
;; Only enable line numbers for certain modes ;; Only enable line numbers for certain modes
(dolist (mode '(org-mode-hook (dolist (mode '(org-mode-hook
@@ -41,15 +75,19 @@ This document contains the fundamental elements of my Emacs configuration. Chang
shell-mode-hook shell-mode-hook
eshell-mode-hook)) eshell-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0)))) (add-hook mode (lambda () (display-line-numbers-mode 0))))
#+end_src #+end_src
* Theme Configuration *** Misc
I am using [[https://protesilaos.com/modus-themes/][Modus Themes]], by [[https://protesilaos.com/][Protesilaos Stavrou]] as they are minimal, pleasant to the eye, and conform to accessibility standards as outlined in [[https://www.w3.org/WAI/WCAG2AAA-Conformance][WCAG AAA]].
** Modus Theme Configuration
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; Enable clipboard
(setq x-select-enable-clipboard t)
#+end_src
** Theme
#+begin_src emacs-lisp
;; load theme
(setq doom-theme 'modus-operandi)
;; Configure Modus theme ;; Configure Modus theme
(use-package modus-themes (use-package modus-themes
@@ -70,8 +108,7 @@ I am using [[https://protesilaos.com/modus-themes/][Modus Themes]], by [[https:/
#+end_src #+end_src
* Font Configuration ** Fonts
Using [[https://github.com/tonsky/FiraCode][Fira Code]] + Fira Code Retina. Using [[https://github.com/tonsky/FiraCode][Fira Code]] + Fira Code Retina.
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -83,8 +120,8 @@ Using [[https://github.com/tonsky/FiraCode][Fira Code]] + Fira Code Retina.
#+end_src #+end_src
* Org Mode Configuration ** Org
** Set Fonts and Symbols *** Fonts and Symbols
Here we are setting general font configuration in order to make editing in org mode a bit more streamlined to look at. Here we are setting general font configuration in order to make editing in org mode a bit more streamlined to look at.
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -121,13 +158,14 @@ Here we are setting general font configuration in order to make editing in org
#+end_src #+end_src
** General Configuration *** General
Main Org/Agenda configuration. Main Org/Agenda configuration.
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; Set org agenda dir
(setq org-directory "~/org/")
;; General setttings
(defun rymacs/org-mode-setup () (defun rymacs/org-mode-setup ()
(org-indent-mode) (org-indent-mode)
(variable-pitch-mode 1) (variable-pitch-mode 1)
@@ -139,7 +177,6 @@ Main Org/Agenda configuration.
:hook (org-mode . rymacs/org-mode-setup) :hook (org-mode . rymacs/org-mode-setup)
:config :config
(setq org-ellipsis "") (setq org-ellipsis "")
(setq org-agenda-start-with-log-mode t) (setq org-agenda-start-with-log-mode t)
(setq org-log-done 'time) (setq org-log-done 'time)
(setq org-log-into-drawer t) (setq org-log-into-drawer t)
@@ -210,7 +247,7 @@ Main Org/Agenda configuration.
#+end_src #+end_src
** Better Heading Bullets *** Better Heading Bullets
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -223,7 +260,7 @@ Main Org/Agenda configuration.
#+end_src #+end_src
** Center Org Buffers *** Center Org Buffers
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -238,9 +275,9 @@ Main Org/Agenda configuration.
#+end_src #+end_src
* Org Babel *** Org Babel
Org Babel allows us to evaluate source code blocks within org mode. With this functionality, we can tell org babel to insert the content of the source block codes into any file specified by using the org-babel-tangle function. Org Babel allows us to evaluate source code blocks within org mode. With this functionality, we can tell org babel to insert the content of the source block codes into any file specified by using the org-babel-tangle function.
** Racket Specific Language **** Racket Specific Language
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ob-racket (use-package ob-racket
@@ -250,7 +287,7 @@ Org Babel allows us to evaluate source code blocks within org mode. With this fu
#'ob-racket-raco-make-runtime-library)) #'ob-racket-raco-make-runtime-library))
#+end_src #+end_src
** Babel Languages **** Babel Languages
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -271,7 +308,7 @@ Org Babel allows us to evaluate source code blocks within org mode. With this fu
(setq geiser-default-implementation '(guile)) (setq geiser-default-implementation '(guile))
#+end_src #+end_src
** Soure Block Creation Shortcuts **** Soure Block Creation Shortcuts
Here we use a package called org-tempo. Here we use a package called org-tempo.
@@ -292,7 +329,7 @@ Here we use a package called org-tempo.
(add-to-list 'org-structure-template-alist '("rt" . "src racket"))) (add-to-list 'org-structure-template-alist '("rt" . "src racket")))
#+end_src #+end_src
** Babel Configuration File Automation Hook **** Babel Configuration File Automation Hook
TODO: This needs to be fixed, or find an equiv. TODO: This needs to be fixed, or find an equiv.
Since we don't want to have to manually use the org-babel-tangle function everytime we make changes to the corresponding .org file, we create an automation hook that executes the function every time we save. Since we don't want to have to manually use the org-babel-tangle function everytime we make changes to the corresponding .org file, we create an automation hook that executes the function every time we save.
@@ -311,8 +348,7 @@ Since we don't want to have to manually use the org-babel-tangle function everyt
#+end_src #+end_src
* Org Roam Configuration *** Org Roam
I use Org Roam as an alternative to writing traditional notes. Instead of long sprawling .org files, each note in Org roam is a excerpt of a specific idea or topic that has links to other notes made with Org Roam. Roam also allows you to pull up a buffer to look at which notes are linked in other notes. This creates a spawling network of information that is useful, quick to draw information from, and can create a notetaking experience that is interactive and seamless. I use Org Roam as an alternative to writing traditional notes. Instead of long sprawling .org files, each note in Org roam is a excerpt of a specific idea or topic that has links to other notes made with Org Roam. Roam also allows you to pull up a buffer to look at which notes are linked in other notes. This creates a spawling network of information that is useful, quick to draw information from, and can create a notetaking experience that is interactive and seamless.
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -367,7 +403,7 @@ I use Org Roam as an alternative to writing traditional notes. Instead of long s
#+end_src #+end_src
** Deft Configuration *** Deft Configuration
Deft is a package that helps browse and filter plain text files. I use it to search through org-roam notes. Deft is a package that helps browse and filter plain text files. I use it to search through org-roam notes.
@@ -385,7 +421,7 @@ Deft is a package that helps browse and filter plain text files. I use it to sea
#+end_src #+end_src
* Mu4e (E-mail) ** Mu4e (E-mail)
Account Information: Account Information:
- IMAP: imap.opal.sh -- 993 - IMAP: imap.opal.sh -- 993
@@ -400,8 +436,8 @@ Account Information:
;; Refresh mail using isync every 5 minutes ;; Refresh mail using isync every 5 minutes
(setq mu4e-update-interval (* 5 60)) (setq mu4e-update-interval (* 5 60))
(setq mu4e-get-mail-command "mbsync -a -c ~/dotfiles/.config/mbsync/mbsyncrc") (setq mu4e-get-mail-command "mbsync -a -c ~/Dotfiles/.config/mbsync/mbsyncrc")
(setq mu4e-maildir "~/mail") (setq mu4e-maildir "~/Mail")
(setq mu4e-contexts (setq mu4e-contexts
(list (list
@@ -427,7 +463,7 @@ Account Information:
#+end_src #+end_src
* ERC (IRC) ** ERC (IRC)
#+begin_src emacs-lisp #+begin_src emacs-lisp
@@ -437,7 +473,7 @@ Account Information:
erc-track-shorten-start 8 erc-track-shorten-start 8
erc-kill-buffer-on-part t erc-kill-buffer-on-part t
erc-auto-query 'bury erc-auto-query 'bury
erc-fill-column 120 erc-fill-column 90
erc-fill-function 'erc-fill-static erc-fill-function 'erc-fill-static
erc-fill-static-center 20 erc-fill-static-center 20
erc-track-visibility nil erc-track-visibility nil
@@ -449,20 +485,3 @@ Account Information:
#+RESULTS: #+RESULTS:
: t : t
* Elfeed (RSS)
#+begin_src emacs-lisp
(global-set-key (kbd "C-x w") 'elfeed) ; set elfeed keybind
(setq elfeed-feeds
'(; websites
"https://landchad.net/rss.xml"
"http://stallman.org/rss/rss.xml"
"https://guix.gnu.org/feeds/blog.atom"
; twitter/nitter
"https://nitter.net/fsf/rss"
; tube
"https://odysee.com/$/rss/@AlphaNerd:8"))
#+end_src