From 8f6e15f84ca640f77c0592a7d25675f439f00714 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 16 Dec 2014 01:14:12 -0500 Subject: Add command org-add-blank-before-heading --- lisp/init-org.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/init-org.el b/lisp/init-org.el index 8c21123..0300d1a 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -236,6 +236,16 @@ to (replace-match "" nil nil nil 4) (org-set-tags nil t))))) +(defun km/org-add-blank-before-heading () + "Add a blank line before Org headings in buffer." + (interactive) + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "[^\n]\n\\*" nil t) + (when (org-at-heading-p) + (beginning-of-line) + (open-line 1))))) + ;;; Org in other modes (defun km/load-orgstruct () (turn-on-orgstruct++) -- cgit v1.2.3