Editing linear s-expressions

I have been wanting to edit some s-expressions on single lines, like for instance to edit org-mode macros. This is a very short blog post but I just wanted to share this function that allows to edit a linearised s-expression quite trivially. For instance in a certain buffer I have a local variable like this # Local Variables: # eval: (add-hook 'after-save-hook (let ((name (buffer-name (current-buffer)))) (lambda () (message "Automatically committing %s" buffer-name) (ale/scratchpad/stage-and-commit))) nil t) # End: and of course this is extremely annoying to edit....

November 28, 2022 · 3 min · 493 words · Alejandro Gallo