diff --git a/docs/daily/2021-02-03.org b/docs/daily/2021-02-03.org deleted file mode 100644 index 97d0a01..0000000 --- a/docs/daily/2021-02-03.org +++ /dev/null @@ -1,18 +0,0 @@ -#+TITLE: 2021-02-03 -#+AUTHOR: Christopher James Hayward - -* Benefits of Literate Programming - -In the textbook [[file:../notes/thinking-in-cpp.org][Thinking in C++]], *Eckel* uses a custom system for extracting and building all of the source code examples from the text, this is prefaced in the section *Begin and end comment tags*. I beleive he could have benefited here from a [[file:../notes/literate-programming.org][Literate Programming]] environment, automating much of this work without polluting the source code with tags. - -* DONE Dotfiles cleanup -CLOSED: [2021-02-03 Wed 15:51] SCHEDULED: <2021-02-03 Wed> - -I want to re-organize my [[roam:Dotfiles][Dotfiles]], namely move all ~org~ related directories to a ~docs~ subdirectory. - -#+begin_src emacs-lisp -dotfiles/home -#+end_src - -#+RESULTS: -: ~/.emacs.d/ diff --git a/docs/daily/2021-02-03.org.gpg b/docs/daily/2021-02-03.org.gpg new file mode 100644 index 0000000..ba25f6f Binary files /dev/null and b/docs/daily/2021-02-03.org.gpg differ diff --git a/docs/posts/hello.org b/docs/posts/hello.org deleted file mode 100644 index a1db04c..0000000 --- a/docs/posts/hello.org +++ /dev/null @@ -1,18 +0,0 @@ -#+TITLE: Hello, world! -#+AUTHOR: Christopher James Hayward -#+DATE: 2021-01-17 - -#+ROAM_KEY: https://chrishayward.xyz/posts/hello - -#+HUGO_BASE_DIR: ~/.local/source/website -#+HUGO_AUTO_SET_LASTMOD: t -#+HUGO_SECTION: posts - -#+begin_src c -#include - -int main() { - printf("Hello, world!"); - return 0; -} -#+end_src diff --git a/docs/posts/hello.org.gpg b/docs/posts/hello.org.gpg new file mode 100644 index 0000000..a35717f Binary files /dev/null and b/docs/posts/hello.org.gpg differ diff --git a/docs/posts/immutable-emacs.org b/docs/posts/immutable-emacs.org deleted file mode 100644 index 81c713d..0000000 --- a/docs/posts/immutable-emacs.org +++ /dev/null @@ -1,79 +0,0 @@ -#+TITLE: Immutable Emacs -#+AUTHOR: Christopher James Hayward -#+DATE: 2021-01-19 - -#+ROAM_KEY: https://chrishayward.xyz/posts/immutable-emacs/ - -#+HUGO_BASE_DIR: ~/.local/source/website -#+HUGO_AUTO_SET_LASTMOD: t -#+HUGO_SECTION: posts - -You can easily create an *Immutable* and *100% Reproducible* custom Emacs configuration with very little effort. My inspiration for this came from the =Emacs From Scratch= series by [[https://youtube.com/c/SystemCrafters][System Crafters]]. - -* Getting started -Emacs created *lots* of files relative to ~user-emacs-directory~, which are *not* part of this configuration and do not belong in the same directory. - -+ Disable lockfiles -+ Disable backup files - -To acheive this functionality, before anything else happens we change this directory to ~~/.cache/emacs~, while keeping the old value of ~user-emacs-directory~ in our own variable. - -#+begin_src emacs-lisp -(defvar dotfiles/home user-emacs-directory) -(defvar dotfiles/cache "~/.cache/emacs") - -(setq create-lockfiles nil - make-backup-files nil - user-emacs-directory dotfiles/cache) -#+end_src - -* Package management -[[https://github.com/raxod502/straight.el][Straight]] is a 100% functional package manager for Emacs, with integration for =use-package=, a common way to download / configure / install Emacs packages. - -+ Use the development branch -+ Integrate with =use-package= - -Apply the configurations prior to bootstrapping the package manager, by setting (writing) to the variables that =straight= will ultimately read from. - -#+begin_src emacs-lisp -(setq straight-repository-branch "develop" - straight-use-package-by-default t) -#+end_src - -Bootstrap the package manager, downloading, installing, or configuring depending on the state of the configuration. All packages are downloaded and built from source, and can be pinned to specific git commit hashes. - -#+begin_src emacs-lisp -(defvar bootstrap-version) -(let ((bootstrap-file - (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) - (bootstrap-version 5)) - (unless (file-exists-p bootstrap-file) - (with-current-buffer - (url-retrieve-synchronously - "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" - 'silent 'inhibit-cookies) - (goto-char (point-max)) - (eval-print-last-sexp))) - (load bootstrap-file nil 'nomessage)) -#+end_src - -Complete the integration with =use-package= by installing it with ~straight-use-package~: - -#+begin_src emacs-lisp -(straight-use-package 'use-package) -#+end_src - -* A E S T H E T I C S - -If you've ever looked at default Emacs, you know that it's one of the ugliest GUI applications out of the box. Including a few packages, cherry picked from ~Doom~ can bring Emacs out of the eightes! - -#+begin_src emacs-lisp -(use-package all-the-icons) -(use-package doom-modeline :init (doom-modeline-mode 1)) -(use-package doom-themes :init (load-theme 'doom-one t)) -#+end_src - -* Conclusion -Now that the *stateful* and *immutable* files are seperated, and the default look has been improved *slightly* you're left with a clean, immutable, and reproducible Emacs configuration to continue hacking on. - -Enjoy it! diff --git a/docs/posts/immutable-emacs.org.gpg b/docs/posts/immutable-emacs.org.gpg new file mode 100644 index 0000000..fd352ce Binary files /dev/null and b/docs/posts/immutable-emacs.org.gpg differ