diff --git a/modules/lang/org/autoload/org-refile.el b/modules/lang/org/autoload/org-refile.el index ba4aa4101..a9ac3aaf9 100644 --- a/modules/lang/org/autoload/org-refile.el +++ b/modules/lang/org/autoload/org-refile.el @@ -3,15 +3,27 @@ ;; REVIEW These are all proof-of-concept. Refactor me! ;;;###autoload -(defun +org/refile-to-current-file (arg) +(defun +org/refile-to-current-file (arg &optional file) "TODO" (interactive "P") - (let ((org-refile-targets `((nil :maxlevel . 10))) + (let ((org-refile-targets `((,file :maxlevel . 10))) (org-refile-use-outline-path nil) (org-refile-keep arg) current-prefix-arg) (call-interactively #'org-refile))) +;;;###autoload +(defun +org/refile-to-file (arg file) + "Refile current heading to a particular org file." + (interactive + (list current-prefix-arg + (read-file-name "Select file to refile to: " + default-directory + buffer-file-name + t nil + (lambda (f) (string-match-p "\\.org$" f))))) + (+org/refile-to-current-file arg file)) + ;;;###autoload (defun +org/refile-to-other-window (arg) "TODO" diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index fd83be021..d2bd4feac 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -679,6 +679,7 @@ between the two." "." #'+org/refile-to-current-file "c" #'+org/refile-to-running-clock "l" #'+org/refile-to-last-location + "f" #'+org/refile-to-file "o" #'+org/refile-to-other-window "O" #'+org/refile-to-other-buffers "v" #'+org/refile-to-visible