Much Ado about Emacs 007
Working away in Emacs. This is an interesting and fun exercise. Learning new stuff. Playing with packages. Configuring Emacs. Need to calm down and use the product instead of spending all the time in making the environment better. This seems to be a never-ending exercise. Need knowledge. That is going to be the focus next. RTFM. Both for Emacs and Emacs lisp. Should be fun. Okay, you needn’t snicker. This is all the fun that is healthy at my age.
Defining the Look of Org-Levels and Markdown Header Faces
Using modus-operandi-theme and I didn’t like the look of the org-headers in it. Tried to change the look and decided that Markdown headers could also use a change.
#+begin_src emacs-lisp
(custom-set-faces
'(org-level-1 ((t (:inherit variable-pitch :height 1.1 :weight bold))))
'(org-level-2 ((t (:inherit variable-pitch :height 1.1 :weight bold))))
'(org-level-3 ((t (:inherit variable-pitch :height 1.1 :weight bold))))
'(org-level-4 ((t (:inherit variable-pitch :height 1.1 :weight bold))))
'(markdown-header-face-1 ((t (:inherit variable-pitch :height 1.1 :weight bold))))
'(markdown-header-face-2 ((t (:inherit variable-pitch :height 1.1 :weight bold))))
'(markdown-header-face-3 ((t (:inherit variable-pitch :height 1.1 :weight bold))))
'(markdown-header-face-4 ((t (:inherit variable-pitch :height 1.0 :weight bold)))))
(setq markdown-header-scaling-padding 1.0) ; Add padding around headers
#+end_src
Quick Window Pt. 4
James Dyer is busy. He is tweaking the functionality of his quick-window-jump
function. Emacs Quick Window Pt 4 - Further Tweaks · Emacs@ Dyerdwelling. I am following along, trying to learn from what he is doing.
Marked 2
Howard Melman, clued me in to the following:
#+begin_src emacs-lisp
(defun my/my-open-Marked ()
"Open the current file in Marked 2."
(interactive)
(if (not buffer-file-name)
(error "Must be visiting a file")
(call-process-shell-command (format "open -a \"Marked 2\" \"%s\"" buffer-file-name))))
#+end_src
Check Parenthesis
When I am trying to write elisp, or trying to edit my configuration, I often struggle with parenthesis. This is a piece of elisp I got Claude.ai to generate for me.
#+begin_src emacs-lisp
(defun check-parens-in-file (filename)
"Check parenthesis matching in specified file.
Returns t if all parentheses match, nil otherwise.
Also shows detailed error location if mismatches are found."
(interactive "fFile to check: ")
(with-temp-buffer
(insert-file-contents filename)
(emacs-lisp-mode)
(condition-case err
(progn
(check-parens)
(message "All parentheses match correctly!")
t)
(error
(message "Parenthesis mismatch found: %s" (error-message-string err))
nil))))
#+end_src
I run it on an elisp buffer to find out whether the parenthesis are matched.
Sundry Items
- I am using Denote. Not certain that I need to, but it is nice and I am using it.
- Still considering a move away from
god mode
toevil-mode
. Little intimidated by the inevitable introduction of a new learning curve to the whole exercise. Things are working out for me with plain-vanilla Emacs andgod mode
, do I really need to complicate this exercise? What are the pay-offs? Not sure about that. That is what is keeping me from switching. Looking at other people’s configuration files leads me to the conclusion that general.el is fantastic when you are inevil-mode
. You can organize commands in a way which makes sense to you. I love what people are doing with that. Like I said, I am intrigued, but hesitant. I moved away fromgod mode
. But haven’t moved intoevil-mode
yet. - I am slowing down on the configuration and getting into the act of reading the manual on Emacs. Need to know what is possible before I blunder into more changes. Have a system here which is good enough. I don’t know what perfection is. So it doesn’t make much sense to chase it. I will come back to it when something bugs me.
Found this interesting: How Emacs changed my life PPT
macosxguru at the gmail thingie.