diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-12-16 01:14:12 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-12-16 01:14:12 -0500 |
commit | 8f6e15f84ca640f77c0592a7d25675f439f00714 (patch) | |
tree | 446dd7edce9cc9688a9ab70aff28098fbbfe6ed2 | |
parent | 1d24308bbfa7c2620e6c54b7f2ad703e3097099d (diff) | |
download | emacs.d-8f6e15f84ca640f77c0592a7d25675f439f00714.tar.gz |
Add command org-add-blank-before-heading
-rw-r--r-- | lisp/init-org.el | 10 |
1 files changed, 10 insertions, 0 deletions
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++) |