summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-04-13 22:57:19 -0400
committerKyle Meyer <kyle@kyleam.com>2014-04-13 22:57:19 -0400
commitc6a0f6e91241e877d5896e331fbe4c799015db36 (patch)
treeee5da9c750cd9cc4ec42050efae757444aa8600c /lisp
parentcd3703f0084d3c4fe609c14d8a5f8ea4d46bf627 (diff)
downloademacs.d-c6a0f6e91241e877d5896e331fbe4c799015db36.tar.gz
Cosmetic changes to Org refile functions
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-org.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el
index 7cf0421..1e9ab6b 100644
--- a/lisp/init-org.el
+++ b/lisp/init-org.el
@@ -196,23 +196,23 @@ be restored properly."
(defun km/org-refile-to-other-file (file &optional maxlevel)
"Refile with `org-refile-targets' set to FILE.
A numeric prefix can be given to set MAXLEVEL (defaults to 2)."
- (interactive "fFile:")
- (let* ((maxlevel (if current-prefix-arg
- (prefix-numeric-value current-prefix-arg)
- 2))
- (org-refile-targets
- `((,(substring-no-properties file) :maxlevel . ,maxlevel))))
+ (interactive "fFile: \nP")
+ (let* ((maxlevel (prefix-numeric-value (or maxlevel 2)))
+ (file (substring-no-properties file))
+ (org-refile-targets `((,file :maxlevel . ,maxlevel))))
(org-refile)))
(defun km/org-refile-to-other-org-buffer (buffer &optional maxlevel)
"Refile with `org-refile-targets' set to BUFFER file name.
A numeric prefix can be given to set MAXLEVEL (defaults to 2)."
- (interactive (list (km/get-org-file-buffer)))
- (km/org-refile-to-other-file (buffer-file-name (get-buffer buffer))))
+ (interactive (list (km/get-org-file-buffer) current-prefix-arg))
+ (let ((buffer-file (buffer-file-name buffer)))
+ (km/org-refile-to-other-file buffer-file maxlevel)))
(defun km/get-org-file-buffer ()
- (org-icompleting-read "Buffer: " (mapcar 'buffer-name
- (org-buffer-list 'files))))
+ (get-buffer
+ (org-icompleting-read "Buffer: " (mapcar 'buffer-name
+ (org-buffer-list 'files)))))
(eval-after-load 'org
'(add-to-list 'org-mode-hook