From 2a6aff6f4929d0abd75f62432933351ec802990c Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Mon, 6 Sep 2021 20:34:57 -0700 Subject: Beautify Org. --- smart-documents.org | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/smart-documents.org b/smart-documents.org index 88c79d7..11a8889 100644 --- a/smart-documents.org +++ b/smart-documents.org @@ -1514,7 +1514,8 @@ PDF. The binding is defined in Section [[Export to PDF]]. #+END_SRC -**** COMMENT For Org mode, specifically + +**** TODO COMMENT For Org mode, specifically #+BEGIN_SRC emacs-lisp :tangle yes (defun sd-org-fix-headlines-spacing () @@ -1522,13 +1523,20 @@ PDF. The binding is defined in Section [[Export to PDF]]. (save-excursion (progn (goto-char (point-min)) - (mark-whole-buffer) - (delete-blank-lines) - (org-next-visible-heading) - (re-search-backward "^$"))) + (flush-lines "^[[:space:]]*$") + (while (re-search-forward "^*" nil t) + (beginning-of-line) + (newline 2) + (next-line) + (newline)))) #+END_SRC + ** Smart quitting +:PROPERTIES: +:test: t +:END: + *** Window -- cgit v1.2.3