Created
July 27, 2017 10:00
-
-
Save allencch/12945a4c18b7b4ae63ce6c8fad7fbfe3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; org-mode-extend --- Extra org-mode functions | |
;;; Commentary: | |
;;; Code: | |
(defun org-outline-to-checklist (start end) | |
"Convert outline to checklist from START to END." | |
(interactive "r") | |
(save-restriction | |
(narrow-to-region start end) | |
(goto-char (point-min)) | |
(while (re-search-forward "^*+" nil t) | |
(replace-match "- [ ]") nil t))) | |
(defun org-outline-to-plainlist (start end) | |
"Convert outline to plain list from START to END." | |
(interactive "r") | |
(save-restriction | |
(narrow-to-region start end) | |
(goto-char (point-min)) | |
(while (re-search-forward "^*+" nil t) | |
(replace-match "-") nil t))) | |
(defun org-plainlist-to-outline (start end) | |
"Convert plain list to outline from START to END." | |
(interactive "r") | |
(save-restriction | |
(narrow-to-region start end) | |
(goto-char (point-min)) | |
(while (re-search-forward "^[:space:]*\\- " nil t) | |
(replace-match "* ") nil t))) | |
(defun org-plainlist-to-checklist (start end) | |
"Convert plain list to checklist from START to END." | |
(interactive "r") | |
(save-restriction | |
(narrow-to-region start end) | |
(goto-char (point-min)) | |
(while (re-search-forward "^[:space:]*\\- " nil t) | |
(replace-match "- [ ] ") nil t))) | |
(defun org-checklist-to-plainlist (start end) | |
"Convert checklist to plain list from START to END." | |
(interactive "r") | |
(save-restriction | |
(narrow-to-region start end) | |
(goto-char (point-min)) | |
(while (re-search-forward "^[:space:]*\\- \\[.] " nil t) | |
(replace-match "- ") nil t))) | |
(defun org-checklist-to-outline (start end) | |
"Convert checklist to outline from START to END." | |
(interactive "r") | |
(save-restriction | |
(narrow-to-region start end) | |
(goto-char (point-min)) | |
(while (re-search-forward "^[:space:]*\\- \\[.] " nil t) | |
(replace-match "* ") nil t))) | |
(provide 'org-mode-extend) | |
;;; org-mode-extend.el ends here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment