emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sylvain Rousseau <thisirs@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [bug] Refile to file when 'full-file-path
Date: Wed, 20 Jun 2012 15:58:16 +0200	[thread overview]
Message-ID: <CAJ8n830iVVLbRMrFN6nTwu-5Cpzhw+teABWNzkbgW2-0zku8tA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 202 bytes --]

Hi,

i wanted to refile to files that have the same name so I set
'org-refile-use-outline-path to 'full-file-path. Targets as files are not
available anymore!

Here is a patch that fixes it.


Sylvain.

[-- Attachment #1.2: Type: text/html, Size: 240 bytes --]

[-- Attachment #2: 0001-Refiling-Fix-targets-when-using-full-file-path.patch --]
[-- Type: application/octet-stream, Size: 1029 bytes --]

From ee89c803b2b7547979085ce4ecfa1c4a9d7e269c Mon Sep 17 00:00:00 2001
From: thisirs <thisirs@gmail.com>
Date: Wed, 20 Jun 2012 14:29:30 +0200
Subject: [PATCH] Refiling: Fix targets when using 'full-file-path

* lisp/org.el: (org-refile-get-targets): Fix targets when using
  'full-file-path.

When `org-refile-use-outline-path' is set to 'full-file-path the file
target is no longer accessible.

TINYCHANGE
---
 lisp/org.el |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index b89889d..0b4812f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10556,7 +10556,8 @@ on the system \"/user@host:\"."
 					(buffer-base-buffer f))))
 	       (setq f (and f (expand-file-name f)))
 	       (if (eq org-refile-use-outline-path 'file)
-		   (push (list (file-name-nondirectory f) f nil nil) tgs))
+		   (push (list (file-name-nondirectory f) f nil nil) tgs)
+		 (push (list (org-protect-slash f) f nil nil) tgs))
 	       (save-excursion
 		 (save-restriction
 		   (widen)
-- 
1.7.9.4


                 reply	other threads:[~2012-06-20 13:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAJ8n830iVVLbRMrFN6nTwu-5Cpzhw+teABWNzkbgW2-0zku8tA@mail.gmail.com \
    --to=thisirs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).