From: Al Haji-Ali <abdo.haji.ali@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-refile-get-location a symlinked file [9.7-pre (release_9.6.29-1443-gb4d17c)]
Date: Mon, 17 Jun 2024 22:52:20 +0100 [thread overview]
Message-ID: <m2v827p78r.fsf@gmail.com> (raw)
In-Reply-To: <87sexba3aa.fsf@localhost>
On 17/06/2024, Ihor Radchenko wrote:
> Makes sense.
> May you prepare a patch with the proposed change?
> See https://orgmode.org/worg/org-contribute.html#first-patch
It's not really a long patch, just involves calling `file-truename` instead of `expand-file-name` in a couple of places.
diff --git a/lisp/org-refile.el b/lisp/org-refile.el
index 20b5fbd02..7c463bc67 100644
--- a/lisp/org-refile.el
+++ b/lisp/org-refile.el
@@ -324,7 +324,7 @@ When `org-refile-use-cache' is nil, just return POS."
(progn
(when (bufferp f)
(setq f (buffer-file-name (buffer-base-buffer f))))
- (setq f (and f (expand-file-name f)))
+ (setq f (and f (file-truename f)))
(when (eq org-refile-use-outline-path 'file)
(push (list (and f (file-name-nondirectory f)) f nil nil) tgs))
(when (eq org-refile-use-outline-path 'buffer-name)
@@ -666,7 +666,7 @@ this function appends the default value from
#'completing-read))
(extra (if org-refile-use-outline-path "/" ""))
(cbnex (concat (buffer-name) extra))
- (filename (and cfn (expand-file-name cfn)))
+ (filename (and cfn (file-truename cfn)))
(tbl (mapcar
(lambda (x)
(if (and (not (member org-refile-use-outline-path
-- Al
next prev parent reply other threads:[~2024-06-17 22:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 15:51 [BUG] org-refile-get-location a symlinked file [9.7-pre (release_9.6.29-1443-gb4d17c)] Al Haji-Ali
2024-06-17 17:26 ` Ihor Radchenko
2024-06-17 21:52 ` Al Haji-Ali [this message]
2024-06-18 12:56 ` Ihor Radchenko
2024-06-18 18:53 ` Al Haji-Ali
2024-06-19 14:25 ` Ihor Radchenko
2024-06-20 8:00 ` Al Haji-Ali
2024-06-20 14:56 ` Ihor Radchenko
2024-06-20 15:13 ` Al Haji-Ali
2024-06-20 15:26 ` Ihor Radchenko
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=m2v827p78r.fsf@gmail.com \
--to=abdo.haji.ali@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@posteo.net \
/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).