From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id mElHEzDqcmakzgAAqHPOHw:P1 (envelope-from ) for ; Wed, 19 Jun 2024 14:24:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id mElHEzDqcmakzgAAqHPOHw (envelope-from ) for ; Wed, 19 Jun 2024 16:24:48 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RuZ8e9js; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718807088; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=z+g2VsKXrGm56AIFGkmTLVL6xc42maGJAk1NI9aBAEY=; b=Lu/mGzk1lROCcNGQXODFSiSVrpugwjRmQL3ZMrXpC0je5G1FAYJ3wMwtbIWbTMQHNbU+BG 302LK0N8SQjKusyOq8wBULMPGxjjEYRTpTCiPOMKo4NKEh80I0GIqx880vZPex6y7uOfpr Su3vsvM+N6eeRpQWI+rnw2aOXE3k4vZFY2qpbyR13qNBzUFpetmejat1I9wiDZbJlZ8onI tqTBhvdX42ByfNpwHxO/2+usCJ1NflrzXuTBFXidDxJAYYrPIz0dg30PwSe0LZGAJe5e5G XmIb73esGrgLy6iGiz/QgGm4qiJsS47PQbOMJkB6b/HB2s3tIFvlKJrRSBh/lw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RuZ8e9js; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718807088; a=rsa-sha256; cv=none; b=eowUlGgqmw8AUt16o0BL1c5i+RvhjCQZgu374kcclrNfYsOaX7JDCV0+euIeRiNRlF9aFS Xfzl3Z0jPYuDiFXmDUVxV20CJ7SfCL3Oe7AtPSLfq9dpCv5+sS3YmhjEY2K/HC2smCoOsu kid3ESRWtMUkbErW3WU2SW+J727g9I7DL6yK6dscc38EydiJsihjc5Pj8/YnZ55sWDDLwy /RDJpQqEjexx5h3aXmhQdsfrX1X7bfBCYkTHUX5gUTUEa/yxgKChZHID5yRT6iI+HH03Pl DSvxFMQ3N04dOiL7h70CUIfBCJavolR+1ls/dA7wAiA4w0SsQ9MKvNe5fF/PpQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 05B1FF9D9 for ; Wed, 19 Jun 2024 16:24:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJwEH-00031W-Uf; Wed, 19 Jun 2024 10:24:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJwEG-000319-8H for emacs-orgmode@gnu.org; Wed, 19 Jun 2024 10:24:04 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJwED-0001Hz-M7 for emacs-orgmode@gnu.org; Wed, 19 Jun 2024 10:24:04 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 98FFA240101 for ; Wed, 19 Jun 2024 16:23:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718807037; bh=WJybovEyNdl1qAvloLKRrPgyJxIFw0FB/58gQ+ubaic=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=RuZ8e9jscGnE5ROeqeenrFvhRzmZyFZkhCNU8pXu4YBfJgxl+IpX73WNuDq7V+E+z Cpp3rl6XurDwx8O4deY8CIFzk5GD5xSgQhgJ5u0VIaHXX2DXzvPHqiVlkIgYz/q1Q1 a6EwzKmxeGw+yy87PUQgup1b9zeCWyQ1cmfu+HORwzrEhcwyMKgO/G8vFi/4T6rz5o P3xvwYMUX99VwgRTxQ3PKENyXv0bZdn1pZQAMYw2f9x68qIPbmd3AoW+MXpoTJtHyZ WbYgqseXplnhyyzLvLUku3uxAUtbPil0vT0W8HmqQAzJDiNAGaAKR5ICa+CPEl5LQR iU6crrMG7htlQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W45TS5qSJz9rxB; Wed, 19 Jun 2024 16:23:56 +0200 (CEST) From: Ihor Radchenko To: Al Haji-Ali Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-refile-get-location a symlinked file [9.7-pre (release_9.6.29-1443-gb4d17c)] In-Reply-To: References: <87sexba3aa.fsf@localhost> <87le32s93z.fsf@localhost> Date: Wed, 19 Jun 2024 14:25:40 +0000 Message-ID: <87v8259fh7.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.58 X-Migadu-Queue-Id: 05B1FF9D9 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.58 X-TUID: H83U/r18L7Im --=-=-= Content-Type: text/plain Al Haji-Ali writes: > On 18/06/2024, Ihor Radchenko wrote: >> Hmm. Thanks, but the patch does not apply on my side. >> May you instead create a patch as a separate file, add the commit >> message, and attach that patch file in the email reply? > > See attached. Thanks. Although this is a different kind of patch. And it is doing too much - we do not want to expand all the names via `file-truename' because you may have a situation like /path/to/file1.org /path/to/symlinks/name-is-completely-different.org Then, using `file-truename' may be confusing for people who expect the symlink name to be displayed. I am thus attaching an alternative patch. May you please test if it fixes the problem on your side? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-refile-get-location-Fix-outline-path-to-a-symlin.patch >From 8e0c1dbaa54322029c6cf1389bf5a43340738da2 Mon Sep 17 00:00:00 2001 Message-ID: <8e0c1dbaa54322029c6cf1389bf5a43340738da2.1718806993.git.yantar92@posteo.net> From: Ihor Radchenko Date: Wed, 19 Jun 2024 16:18:41 +0200 Subject: [PATCH] org-refile-get-location: Fix outline path to a symlink of current buffer * lisp/org-refile.el (org-refile-get-location): When current buffer file is a symlink to refile location, do not append the file name to the outline path, just as we do when current buffer is the same as refile location file. Reported-by: Al Haji-Ali Link: https://orgmode.org/list/m2ed8vr2io.fsf@gmail.com --- lisp/org-refile.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 20b5fbd02..4a9cc8c01 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -670,8 +670,8 @@ (defun org-refile-get-location (&optional prompt default-buffer new-nodes) (tbl (mapcar (lambda (x) (if (and (not (member org-refile-use-outline-path - '(file full-file-path title))) - (not (equal filename (nth 1 x)))) + '(file full-file-path title))) + (not (equal filename (file-truename (nth 1 x))))) (cons (concat (car x) extra " (" (file-name-nondirectory (nth 1 x)) ")") (cdr x)) -- 2.45.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--