Fixed minor bugs

This commit is contained in:
Howard Abrams 2024-08-07 22:15:53 -07:00
parent 086725397a
commit 285bf2d86c
4 changed files with 12 additions and 8 deletions

View file

@ -141,7 +141,7 @@ And lets see the results:
** My Code Location ** My Code Location
Much of my more complicated code comes from my website essays and other projects. The destination shows up here: Much of my more complicated code comes from my website essays and other projects. The destination shows up here:
#+begin_src emacs-lisp #+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 #+end_src
Hopefully, this will tie me over while I transition. Hopefully, this will tie me over while I transition.

View file

@ -477,14 +477,17 @@ Using [[https://github.com/joaotavora/yasnippet][yasnippet]] to expand templates
(expand-file-name "snippets" user-emacs-directory)) (expand-file-name "snippets" user-emacs-directory))
(yas-global-mode +1)) (yas-global-mode +1))
#+end_src #+end_src
Check out [[http://joaotavora.github.io/yasnippet/][the documentation]] for writing them. Check out [[http://joaotavora.github.io/yasnippet/][the documentation]] for writing them.
Since I have troubles installing Dooms [[https://github.com/hlissner/doom-snippets][collection of snippets]], lets use the [[http://github.com/AndreaCrotti/yasnippet-snippets][yasnippet-snippets]] package: Since I have troubles installing Dooms [[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 #+begin_src emacs-lisp
(use-package yasnippet-snippets) (use-package yasnippet-snippets)
#+end_src #+end_src
*** Auto Insert Templates *** 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? 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 #+begin_src emacs-lisp
(use-package autoinsert (use-package autoinsert
:init :init
@ -509,6 +512,7 @@ Since auto insertion requires entering data for particular fields, and for that
#+end_src #+end_src
And since I'll be associating snippets with new files all over my configuration, let's make a helper function: And since I'll be associating snippets with new files all over my configuration, let's make a helper function:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun ha-auto-insert-file (filename-re snippet-name) (defun ha-auto-insert-file (filename-re snippet-name)
"Autofill file buffer matching FILENAME-RE regular expression. "Autofill file buffer matching FILENAME-RE regular expression.

View file

@ -280,7 +280,7 @@ Im 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 Im editing YAML files, I actually want to pull up the Ansible documentation, and probably the Jinja ones too. The =devdocs-lookup= command attempts to guess which documentation it should display based on the mode, but if Im 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 () (defun ha-devdocs-major-mode ()
"My mapping of major mode to Devdocs slug." "My mapping of major mode to Devdocs slug."
(interactive) (interactive)
@ -1143,8 +1143,8 @@ With the =markdown-header-scaling= set, we no longer need to color the headers i
:after org :after org
:config :config
(let ((default-color (face-attribute 'default :foreground))) (let ((default-color (face-attribute 'default :foreground)))
(set-face-attribute 'markdown-italic-face nil :foreground nil) (set-face-attribute 'markdown-italic-face nil :foreground 'unspecified)
(set-face-attribute 'markdown-bold-face nil :foreground nil) (set-face-attribute 'markdown-bold-face nil :foreground 'unspecified)
(set-face-attribute 'markdown-pre-face nil (set-face-attribute 'markdown-pre-face nil
:foreground (face-attribute 'org-code :foreground)) :foreground (face-attribute 'org-code :foreground))
(set-face-attribute 'markdown-code-face nil (set-face-attribute 'markdown-code-face nil