Add 'SPC m r f' for refiling to specific org file
This commit is contained in:
parent
1fd18b88dd
commit
558e906b2b
2 changed files with 15 additions and 2 deletions
|
@ -3,15 +3,27 @@
|
||||||
;; REVIEW These are all proof-of-concept. Refactor me!
|
;; REVIEW These are all proof-of-concept. Refactor me!
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +org/refile-to-current-file (arg)
|
(defun +org/refile-to-current-file (arg &optional file)
|
||||||
"TODO"
|
"TODO"
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(let ((org-refile-targets `((nil :maxlevel . 10)))
|
(let ((org-refile-targets `((,file :maxlevel . 10)))
|
||||||
(org-refile-use-outline-path nil)
|
(org-refile-use-outline-path nil)
|
||||||
(org-refile-keep arg)
|
(org-refile-keep arg)
|
||||||
current-prefix-arg)
|
current-prefix-arg)
|
||||||
(call-interactively #'org-refile)))
|
(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
|
;;;###autoload
|
||||||
(defun +org/refile-to-other-window (arg)
|
(defun +org/refile-to-other-window (arg)
|
||||||
"TODO"
|
"TODO"
|
||||||
|
|
|
@ -679,6 +679,7 @@ between the two."
|
||||||
"." #'+org/refile-to-current-file
|
"." #'+org/refile-to-current-file
|
||||||
"c" #'+org/refile-to-running-clock
|
"c" #'+org/refile-to-running-clock
|
||||||
"l" #'+org/refile-to-last-location
|
"l" #'+org/refile-to-last-location
|
||||||
|
"f" #'+org/refile-to-file
|
||||||
"o" #'+org/refile-to-other-window
|
"o" #'+org/refile-to-other-window
|
||||||
"O" #'+org/refile-to-other-buffers
|
"O" #'+org/refile-to-other-buffers
|
||||||
"v" #'+org/refile-to-visible
|
"v" #'+org/refile-to-visible
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue