;; https://github.com/lassik/emacs-format-all-the-code (use-package format-all) (use-package org :config (defun my/format-all-advice () (ignore-errors ; in case there's no language support (call-interactively #'format-all-buffer))) (advice-add #'org-edit-src-exit :before #'my/format-all-advice))