Created
May 27, 2020 16:56
-
-
Save gahag/603fb1c9dabc8e7a29836af18fb94597 to your computer and use it in GitHub Desktop.
This file contains 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
(defun org-refile-to (headline) | |
"Move current subtree to specified headline" | |
(org-refile nil | |
nil | |
(list headline | |
(buffer-file-name) | |
nil | |
(org-find-exact-headline-in-buffer (capitalize headline))))) | |
(defun org-refile-todo () | |
"Move current subtree to the corresponding todo heading" | |
(interactive) | |
(when (and (eq (org-current-level) 2) | |
(not (member "pin" (org-get-tags)))) | |
(org-refile-to (org-get-todo-state)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment