diff --git a/bootstrap.org b/bootstrap.org index 6901bbd..f7b8437 100644 --- a/bootstrap.org +++ b/bootstrap.org @@ -141,7 +141,7 @@ And let’s see the results: ** My Code Location Much of my more complicated code comes from my website essays and other projects. The destination shows up here: #+begin_src emacs-lisp -(add-to-list 'load-path (expand-file-name "~/.emacs.d/elisp")) + (add-to-list 'load-path (expand-file-name "elisp" user-emacs-directory)) #+end_src Hopefully, this will tie me over while I transition. @@ -227,12 +227,12 @@ With this function, we can test/debug/reload any individual file, via: "Load or reload an org-mode FILE containing literate Emacs configuration code." (interactive (list (completing-read "Org file: " - (ha-hamacs-files :all)))) + (ha-hamacs-files :all)))) ;; TODO: Replace concat here: (let ((full-file (file-name-concat hamacs-source-dir file))) (when (file-exists-p full-file) - (ignore-errors - (org-babel-load-file full-file))))) + (ignore-errors + (org-babel-load-file full-file))))) #+end_src ** Tangling the Hamacs diff --git a/ha-config.org b/ha-config.org index 0a93458..80bdf16 100644 --- a/ha-config.org +++ b/ha-config.org @@ -477,14 +477,17 @@ Using [[https://github.com/joaotavora/yasnippet][yasnippet]] to expand templates (expand-file-name "snippets" user-emacs-directory)) (yas-global-mode +1)) #+end_src + Check out [[http://joaotavora.github.io/yasnippet/][the documentation]] for writing them. Since I have troubles installing Doom’s [[https://github.com/hlissner/doom-snippets][collection of snippets]], lets use the [[http://github.com/AndreaCrotti/yasnippet-snippets][yasnippet-snippets]] package: + #+begin_src emacs-lisp (use-package yasnippet-snippets) #+end_src *** Auto Insert Templates The [[https://www.emacswiki.org/emacs/AutoInsertMode][auto-insert]] feature is a wee bit complicated. All I want is to associate a filename regular expression with a YASnippet template. I'm stealing some ideas from Henrik Lissner's [[https://github.com/hlissner/doom-emacs/blob/develop/modules/editor/file-templates/autoload.el][set-file-template!]] macro, but simpler? + #+begin_src emacs-lisp (use-package autoinsert :init @@ -509,6 +512,7 @@ Since auto insertion requires entering data for particular fields, and for that #+end_src And since I'll be associating snippets with new files all over my configuration, let's make a helper function: + #+begin_src emacs-lisp (defun ha-auto-insert-file (filename-re snippet-name) "Autofill file buffer matching FILENAME-RE regular expression. diff --git a/ha-org-journaling.org b/ha-org-journaling.org index 68e5d94..54acd3f 100644 --- a/ha-org-journaling.org +++ b/ha-org-journaling.org @@ -58,7 +58,7 @@ In normal Org file, I like large headers, but in my Journal, where each task is But new files could use /my formatting/ (which is different than the options available in the project): #+begin_src emacs-lisp -(ha-auto-insert-file (rx "journal/" (zero-or-more any) (= 8 digit)) "journal") + (ha-auto-insert-file (rx "journal/" (zero-or-more any) (= 8 digit)) "journal") #+end_src This depends on the following [[file:~/.doom.d/snippets/org-journal-mode/__journal][snippet/template file]]: diff --git a/ha-programming.org b/ha-programming.org index f485fec..419f772 100644 --- a/ha-programming.org +++ b/ha-programming.org @@ -280,7 +280,7 @@ I’m interested in using [[https://devdocs.io/][devdocs.io]] instead, which is The =devdocs-lookup= command attempts to guess which documentation it should display based on the mode, but if I’m editing YAML files, I actually want to pull up the Ansible documentation, and probably the Jinja ones too. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (defun ha-devdocs-major-mode () "My mapping of major mode to Devdocs slug." (interactive) @@ -1143,8 +1143,8 @@ With the =markdown-header-scaling= set, we no longer need to color the headers i :after org :config (let ((default-color (face-attribute 'default :foreground))) - (set-face-attribute 'markdown-italic-face nil :foreground nil) - (set-face-attribute 'markdown-bold-face nil :foreground nil) + (set-face-attribute 'markdown-italic-face nil :foreground 'unspecified) + (set-face-attribute 'markdown-bold-face nil :foreground 'unspecified) (set-face-attribute 'markdown-pre-face nil :foreground (face-attribute 'org-code :foreground)) (set-face-attribute 'markdown-code-face nil