From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Sebastian=20Reu=C3=9Fe?= Subject: [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets Date: Mon, 15 May 2017 14:54:55 +0200 Message-ID: <20170515125455.18251-2-seb@wirrsal.net> References: <20170515125455.18251-1-seb@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]:60738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAFWm-0001st-7X for emacs-orgmode@gnu.org; Mon, 15 May 2017 08:55:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAFWj-0003vu-6L for emacs-orgmode@gnu.org; Mon, 15 May 2017 08:55:08 -0400 Received: from wirrsal.net ([188.68.36.149]:55964 helo=mail.wirrsal.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dAFWi-0003vf-WE for emacs-orgmode@gnu.org; Mon, 15 May 2017 08:55:05 -0400 In-Reply-To: <20170515125455.18251-1-seb@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: emacs-orgmode@gnu.org Cc: =?UTF-8?q?Sebastian=20Reu=C3=9Fe?= * 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 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) --=20 2.13.0