emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastian Reuße" <seb@wirrsal.net>
To: Allen Li <vianchielfaura@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets
Date: Wed, 21 Jun 2017 09:55:09 +0200	[thread overview]
Message-ID: <87o9thsrky.fsf@wirrsal.net> (raw)
In-Reply-To: <CAJr1M6dvszi+xPTUG3kiM_XKFbMGpnP1rwq2beWKsnCwvZV99Q@mail.gmail.com>

Hello Allen,

Allen Li <vianchielfaura@gmail.com> writes:

> On Mon, May 15, 2017 at 5:54 AM, Sebastian Reuße <seb@wirrsal.net> 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

  reply	other threads:[~2017-06-21  7:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 12:54 [PATCH 1/2] Add tests for org-refile-get-targets Sebastian Reuße
2017-05-15 12:54 ` [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets Sebastian Reuße
2017-05-17 12:54   ` Nicolas Goaziou
2017-06-21  7:05   ` Allen Li
2017-06-21  7:55     ` Sebastian Reuße [this message]
2017-06-21  8:01       ` Allen Li
2017-06-28 22:03         ` Allen Li
2017-07-03  6:44           ` Nicolas Goaziou
2017-07-07  6:55             ` Allen Li
2017-05-15 16:38 ` [PATCH 1/2] Add tests for org-refile-get-targets Nicolas Goaziou
2017-05-17 18:43   ` Sebastian Reuße
2017-05-22  0:38     ` Nicolas Goaziou
2017-05-22  6:46       ` Sebastian Reuße
2017-05-22  6:55         ` Nicolas Goaziou
2017-05-17 18:44   ` [PATCH] " Sebastian Reuße

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9thsrky.fsf@wirrsal.net \
    --to=seb@wirrsal.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=vianchielfaura@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).