Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets
Yes, 2906e50177d47 is needed on maint. However, my understanding is that on maint we still escape filesystem slashes in the outline path? If so, org-protect-path will be needed around the file-truename in 2906e50177d4 My workflow recently changed such that I no longer need to set org-refile-use-outline-path to full-file-path, so my interest in this bug has dropped accordingly, but it is still a bug on maint that breaks refiling, so I think the fix should be backported unless there are plans for a main -> maint merge soon. On Sun, Jul 2, 2017 at 11:44 PM, Nicolas Goaziou wrote: > Hello, > > Allen Li writes: > >> I just realized that this patch was applied to the master branch, not >> the maint branch. >> >> The absence of this patch results in the continued life of a bug in >> the maint branch where it is not possible to refile to the top level >> of an agenda file when using full-file-path for >> org-refile-use-outline-path. >> >> Is it possible to backport this to the maint branch? This will >> require adding the org-protect-slash that I mentioned earlier in this >> thread. Otherwise, refile is basically unusable for me when >> full-file-path is set. > > Wouldn't 2906e50177d47b4f4a0e75532a0c9dcc9cf72824 be sufficient in your > case? > > If not, what commits are required? > > Regards, > > -- > Nicolas Goaziou
Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets
Hello, Allen Li writes: > I just realized that this patch was applied to the master branch, not > the maint branch. > > The absence of this patch results in the continued life of a bug in > the maint branch where it is not possible to refile to the top level > of an agenda file when using full-file-path for > org-refile-use-outline-path. > > Is it possible to backport this to the maint branch? This will > require adding the org-protect-slash that I mentioned earlier in this > thread. Otherwise, refile is basically unusable for me when > full-file-path is set. Wouldn't 2906e50177d47b4f4a0e75532a0c9dcc9cf72824 be sufficient in your case? If not, what commits are required? Regards, -- Nicolas Goaziou
Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets
I just realized that this patch was applied to the master branch, not the maint branch. The absence of this patch results in the continued life of a bug in the maint branch where it is not possible to refile to the top level of an agenda file when using full-file-path for org-refile-use-outline-path. Is it possible to backport this to the maint branch? This will require adding the org-protect-slash that I mentioned earlier in this thread. Otherwise, refile is basically unusable for me when full-file-path is set. On Wed, Jun 21, 2017 at 1:01 AM, Allen Li wrote: > Thanks for the info. I was chasing down this bug in org-20170606, > where it still required `org-protect-slash`, so I was anxious about > its absence in your patch. > > On Wed, Jun 21, 2017 at 12:55 AM, Sebastian Reuße wrote: >> Hello Allen, >> >> Allen Li writes: >> >>> On Mon, May 15, 2017 at 5:54 AM, Sebastian Reuße wrote: * org.el (org-refile-get-targets): Setting org-refile-use-outline-path to `file' or `buffer-name' causes an additional target for the file’s root node to be inserted. This functionality was absent when using `full-file-path'. We now add this since it is convenient and makes the behavior more consistent. --- lisp/org.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 97713c523..28277e352 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11563,6 +11563,8 @@ (defun org-refile-get-targets (&optional default-buffer) (push (list (file-name-nondirectory f) f nil nil) tgs)) (when (eq org-refile-use-outline-path 'buffer-name) (push (list (buffer-name (buffer-base-buffer)) f nil nil) tgs)) + (when (eq org-refile-use-outline-path 'full-file-path) +(push (list (file-truename (buffer-file-name (buffer-base-buffer))) f nil nil) tgs)) (org-with-wide-buffer (goto-char (point-min)) (setq org-outline-path-cache nil) -- 2.13.0 >>> >>> If I'm not mistaken, the full file path needs to be wrapped in >>> org-protect-slash? >> >> Slashes that are part of file paths aren’t escaped anymore, as of >> 53bcf91a9. The only reason to escape slashes is to indicate they are not >> part of the outline or file path, but part of the headline instead. >> >> In fact it looks like Nicolas removed ‘org-protect-slash’ in 2b44a1a74 >> and inlined it at its only use site. >> >> Kind regards, >> >> Sebastian >> >> -- >> Insane cobra split the wood >> Trader of the lowland breed >> Call a jittney, drive away >> In the slipstream we will stay
Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets
Thanks for the info. I was chasing down this bug in org-20170606, where it still required `org-protect-slash`, so I was anxious about its absence in your patch. On Wed, Jun 21, 2017 at 12:55 AM, Sebastian Reuße wrote: > Hello Allen, > > Allen Li writes: > >> On Mon, May 15, 2017 at 5:54 AM, Sebastian Reuße wrote: >>> * org.el (org-refile-get-targets): Setting org-refile-use-outline-path >>> to `file' or `buffer-name' causes an additional target for the file’s >>> root node to be inserted. This functionality was absent when using >>> `full-file-path'. We now add this since it is convenient and makes the >>> behavior more consistent. >>> --- >>> lisp/org.el | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/lisp/org.el b/lisp/org.el >>> index 97713c523..28277e352 100644 >>> --- a/lisp/org.el >>> +++ b/lisp/org.el >>> @@ -11563,6 +11563,8 @@ (defun org-refile-get-targets (&optional >>> default-buffer) >>> (push (list (file-name-nondirectory f) f nil nil) tgs)) >>>(when (eq org-refile-use-outline-path 'buffer-name) >>> (push (list (buffer-name (buffer-base-buffer)) f nil nil) >>> tgs)) >>> + (when (eq org-refile-use-outline-path 'full-file-path) >>> +(push (list (file-truename (buffer-file-name >>> (buffer-base-buffer))) f nil nil) tgs)) >>>(org-with-wide-buffer >>> (goto-char (point-min)) >>> (setq org-outline-path-cache nil) >>> -- >>> 2.13.0 >>> >>> >> >> If I'm not mistaken, the full file path needs to be wrapped in >> org-protect-slash? > > Slashes that are part of file paths aren’t escaped anymore, as of > 53bcf91a9. The only reason to escape slashes is to indicate they are not > part of the outline or file path, but part of the headline instead. > > In fact it looks like Nicolas removed ‘org-protect-slash’ in 2b44a1a74 > and inlined it at its only use site. > > Kind regards, > > Sebastian > > -- > Insane cobra split the wood > Trader of the lowland breed > Call a jittney, drive away > In the slipstream we will stay
Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets
Hello Allen, Allen Li writes: > On Mon, May 15, 2017 at 5:54 AM, Sebastian Reuße wrote: >> * org.el (org-refile-get-targets): Setting org-refile-use-outline-path >> to `file' or `buffer-name' causes an additional target for the file’s >> root node to be inserted. This functionality was absent when using >> `full-file-path'. We now add this since it is convenient and makes the >> behavior more consistent. >> --- >> lisp/org.el | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/lisp/org.el b/lisp/org.el >> index 97713c523..28277e352 100644 >> --- a/lisp/org.el >> +++ b/lisp/org.el >> @@ -11563,6 +11563,8 @@ (defun org-refile-get-targets (&optional >> default-buffer) >> (push (list (file-name-nondirectory f) f nil nil) tgs)) >>(when (eq org-refile-use-outline-path 'buffer-name) >> (push (list (buffer-name (buffer-base-buffer)) f nil nil) >> tgs)) >> + (when (eq org-refile-use-outline-path 'full-file-path) >> +(push (list (file-truename (buffer-file-name >> (buffer-base-buffer))) f nil nil) tgs)) >>(org-with-wide-buffer >> (goto-char (point-min)) >> (setq org-outline-path-cache nil) >> -- >> 2.13.0 >> >> > > If I'm not mistaken, the full file path needs to be wrapped in > org-protect-slash? Slashes that are part of file paths aren’t escaped anymore, as of 53bcf91a9. The only reason to escape slashes is to indicate they are not part of the outline or file path, but part of the headline instead. In fact it looks like Nicolas removed ‘org-protect-slash’ in 2b44a1a74 and inlined it at its only use site. Kind regards, Sebastian -- Insane cobra split the wood Trader of the lowland breed Call a jittney, drive away In the slipstream we will stay
Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets
On Mon, May 15, 2017 at 5:54 AM, Sebastian Reuße wrote: > * org.el (org-refile-get-targets): Setting org-refile-use-outline-path > to `file' or `buffer-name' causes an additional target for the file’s > root node to be inserted. This functionality was absent when using > `full-file-path'. We now add this since it is convenient and makes the > behavior more consistent. > --- > lisp/org.el | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lisp/org.el b/lisp/org.el > index 97713c523..28277e352 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -11563,6 +11563,8 @@ (defun org-refile-get-targets (&optional > default-buffer) > (push (list (file-name-nondirectory f) f nil nil) tgs)) >(when (eq org-refile-use-outline-path 'buffer-name) > (push (list (buffer-name (buffer-base-buffer)) f nil nil) > tgs)) > + (when (eq org-refile-use-outline-path 'full-file-path) > +(push (list (file-truename (buffer-file-name > (buffer-base-buffer))) f nil nil) tgs)) >(org-with-wide-buffer > (goto-char (point-min)) > (setq org-outline-path-cache nil) > -- > 2.13.0 > > If I'm not mistaken, the full file path needs to be wrapped in org-protect-slash?
Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets
Hello, Sebastian Reuße writes: > * org.el (org-refile-get-targets): Setting org-refile-use-outline-path > to `file' or `buffer-name' causes an additional target for the file’s > root node to be inserted. This functionality was absent when using > `full-file-path'. We now add this since it is convenient and makes the > behavior more consistent. Applied. Thank you. Regards, -- Nicolas Goaziou
[O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets
* org.el (org-refile-get-targets): Setting org-refile-use-outline-path to `file' or `buffer-name' causes an additional target for the file’s root node to be inserted. This functionality was absent when using `full-file-path'. We now add this since it is convenient and makes the behavior more consistent. --- lisp/org.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 97713c523..28277e352 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11563,6 +11563,8 @@ (defun org-refile-get-targets (&optional default-buffer) (push (list (file-name-nondirectory f) f nil nil) tgs)) (when (eq org-refile-use-outline-path 'buffer-name) (push (list (buffer-name (buffer-base-buffer)) f nil nil) tgs)) + (when (eq org-refile-use-outline-path 'full-file-path) +(push (list (file-truename (buffer-file-name (buffer-base-buffer))) f nil nil) tgs)) (org-with-wide-buffer (goto-char (point-min)) (setq org-outline-path-cache nil) -- 2.13.0