From 86c2a140a5ef01ff4e781793bf05d90356d323c2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 24 Apr 2022 15:00:58 -0500 Subject: Change `+org-before-save@prettify-buffer' --- lisp/+org.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lisp/+org.el') diff --git a/lisp/+org.el b/lisp/+org.el index 9af2dda..0324cd5 100644 --- a/lisp/+org.el +++ b/lisp/+org.el @@ -339,11 +339,13 @@ Return as a list." (defun +org-before-save@prettify-buffer () (when +org-before-save-prettify-buffer (save-mark-and-excursion - (mark-whole-buffer) - ;;(org-fill-paragraph nil t) - (+org-unsmartify) - (+org-fix-blank-lines t) - (org-align-tags t)))) + (+org-unsmartify) + (+org-fix-blank-lines t) + (org-align-tags t) + (when (buffer-narrowed-p) + (goto-char (point-min)) + (forward-line 1) + (org-narrow-to-subtree))))) (defun +org-delete-backward-char (N) "Keep tables aligned while deleting N characters backward. -- cgit 1.4.1-21-gabe81