From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Li Subject: Re: [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets Date: Wed, 21 Jun 2017 01:01:26 -0700 Message-ID: References: <20170515125455.18251-1-seb@wirrsal.net> <20170515125455.18251-2-seb@wirrsal.net> <87o9thsrky.fsf@wirrsal.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNaZt-0001MF-0C for emacs-orgmode@gnu.org; Wed, 21 Jun 2017 04:01:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNaZs-0006zp-3O for emacs-orgmode@gnu.org; Wed, 21 Jun 2017 04:01:29 -0400 Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]:36572) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNaZr-0006zb-Uz for emacs-orgmode@gnu.org; Wed, 21 Jun 2017 04:01:28 -0400 Received: by mail-oi0-x232.google.com with SMTP id p187so27811622oif.3 for ; Wed, 21 Jun 2017 01:01:27 -0700 (PDT) In-Reply-To: <87o9thsrky.fsf@wirrsal.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: =?UTF-8?Q?Sebastian_Reu=C3=9Fe?= Cc: emacs-orgmode@gnu.org 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=C3=9Fe wr= ote: > Hello Allen, > > Allen Li writes: > >> On Mon, May 15, 2017 at 5:54 AM, Sebastian Reu=C3=9Fe = 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=E2= =80=99s >>> 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 defaul= t-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 n= il) tgs)) >>> + (when (eq org-refile-use-outline-path 'full-file-path) >>> + (push (list (file-truename (buffer-file-name (buffer-b= ase-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=E2=80=99t 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 =E2=80=98org-protect-slash=E2=80=99= 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