[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH 1/2] org-refile: Escape slashes only in headline of refile ta
From: |
Sebastian Reuße |
Subject: |
[O] [PATCH 1/2] org-refile: Escape slashes only in headline of refile target |
Date: |
Sat, 6 May 2017 08:38:44 +0200 |
* org.el (org-refile-get-targets): Only escape slashes in headline
part of refile target; leave any file-system path component (when
enabled) unescaped.
The reason to escape slashes in refile targets is to make it clear
when a slash was part of a headline vs. part of the outline path. It
makes sense to treat slashes in the file system part the same way as
outline paths, since this won’t result in any confusion and serves to
make target selection less noisy.
---
lisp/org.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 0d83b4cbd..5d8166c99 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11576,7 +11576,7 @@ (defun org-refile-get-targets (&optional default-buffer)
(target
(if (not org-refile-use-outline-path) heading
(mapconcat
- #'org-protect-slash
+ #'identity
(append
(pcase org-refile-use-outline-path
(`file (list (file-name-nondirectory
@@ -11586,7 +11586,8 @@ (defun org-refile-get-targets (&optional default-buffer)
(list (buffer-file-name
(buffer-base-buffer))))
(_ nil))
- (org-get-outline-path t t))
+ (mapcar #'org-protect-slash
+ (org-get-outline-path t t)))
"/"))))
(push (list target f re (org-refile-marker (point)))
tgs)))
--
2.12.2
- [O] [PATCH 2/2] org-refile: optionally prefix refile targets with buffer name, (continued)
- [O] [PATCH 2/2] org-refile: optionally prefix refile targets with buffer name, Sebastian Reuße, 2017/05/05
- [O] [PATCH 1/2] org-refile: escape slashes only in headline of refile target, Sebastian Reuße, 2017/05/05
- Re: [O] [PATCH 1/2] org-refile: escape slashes only in headline of refile target, Kyle Meyer, 2017/05/05
- [O] [PATCH 1/2] org-refile: Escape slashes only in headline of refile target, Sebastian Reuße, 2017/05/06
- [O] [PATCH 2/2] org-refile: Optionally prefix refile targets with buffer name, Sebastian Reuße, 2017/05/06
- [O] [PATCH 1/2] org-refile: Escape slashes only in headline of refile target, Sebastian Reuße, 2017/05/06
- [O] [PATCH 2/2] org-refile: Optionally prefix refile targets with buffer name, Sebastian Reuße, 2017/05/06
- [O] [PATCH 1/2] org-refile: Escape slashes only in headline of refile target,
Sebastian Reuße <=
- [O] [PATCH 2/2] org-refile: Optionally prefix refile targets with buffer name, Sebastian Reuße, 2017/05/06
- Re: [O] [PATCH 1/2] org-refile: escape slashes only in headline of refile target, Sebastian Reuße, 2017/05/06
- Re: [O] [PATCH 1/2] org-refile: escape slashes only in headline of refile target, Kyle Meyer, 2017/05/06
- [O] [PATCH] ORG-NEWS: Update new features, Sebastian Reuße, 2017/05/06
- Re: [O] [PATCH] ORG-NEWS: Update new features, Kyle Meyer, 2017/05/06
- Re: [O] [PATCH] ORG-NEWS: Update new features, Nicolas Goaziou, 2017/05/07
- Re: [O] [PATCH 1/2] org-refile: escape slashes only in headline of refile target, Sebastian Reuße, 2017/05/06
- Re: [O] [PATCH 1/2] org-refile: escape slashes only in headline of refile target, Kyle Meyer, 2017/05/06