> I have been using Emacs for quite a while, but never mastered elisp
You are not alone in that boat :-)
You are not alone in that boat :-)
I said I'd lean Spanish some_day® as well, according to duolingo that was 9 years ago :-)
I really dig that it's a full on language used for the configuration files. It just makes so much sense to do it that way. (I also like VSCode's json prefs)
Also I love sharing snippets of my .init.el:
40 │ ;; Taken from https://karl-voit.at/2017/02/11/my-system-is-foobar/
41 │ ;; Check if system is Darwin/macOS
42 │ (defun my-system-type-is-darwin ()
43 │ "Return non-nil if system is darwin-based (Mac OS X)."
44 │ (string-equal system-type "darwin")
45 │ )
...
65 │
66 │ (when (my-system-type-is-darwin)
67 │ ;; EXAMPLE: (global-set-key (kbd "C-z") 'shell)
68 │ ;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-Rebinding.html#Init-Rebinding
69 │ (global-set-key (kbd "s-/") 'comment-or-uncomment-region-or-line)
70 │ (global-set-key (kbd "s-<backspace>") '(lambda () (interactive) (kill-line 0)))
71 │ )The snippets you gave of your init.el are really basic but I do agree with you: working on init.el (and using Git to revert SNAFUs) helped me learn enough elisp to be dangerous too.
The elisp I write is certainly not idiomatic but it gets the job done. I have some functions I wrote more than a decade ago and they still "Just Work [TM]"!