From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id OJ8dH3jecWYdgwAAqHPOHw:P1 (envelope-from ) for ; Tue, 18 Jun 2024 19:22:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id OJ8dH3jecWYdgwAAqHPOHw (envelope-from ) for ; Tue, 18 Jun 2024 21:22:32 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OIS2Mio8; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718737265; a=rsa-sha256; cv=none; b=iWdGH/vx6FYzSu5JgWzr14lUJz24W95wf3FY20ygrv+RtodsmKlwPbtQhKr2/YWiEQWqss rnJ5KmSyEjT2iptmF22csza8N3EN6fGZAxr2stb6sNst+5lbFK2zDQM1jojFfUAIumxSeS Wj4qjey87GvN2uXwx01eiXqGFOvjVhdBr0yhLBMXmcPuAoex2Ed2ftkBVXg55UIJaOE2gc jzOlKvkTl6gdRPMdFxgXOPYU4CWwJElRuxcnAXJMRljeSd24mpFWvkF44WQiZMq7oWR/ur aZ/4i6kbriv9uKI2CKq127IpXeIGo0nofYrx47dFIddBxlKIOh1LWOdW/m0q0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OIS2Mio8; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718737265; 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=GoB5lc917PbyPOV58A2Q9v98aiNUVTbIzo861fu0UA0=; b=X43MwSu7++iZijgKIPYo1a8scGRt2QHTUfNTr/8Tfign6o442qkQQ0VguOYyF/zraiF4/W C3nDlbn/SGh+Tb6fAKuXO9Ji6YwfPg52tYIijihTmaYlqh+H0nVjDHaY6Um3inHGzVv29F klkB1zZcYqYCcTsMtm2frTnjwJ/x3toL86g+Ne2CdcTwCq9l0GNn7PFUIO0lVlHJaRaWkH l3AfJqmM197h3bRztTmMHRi3r3uurpW9Q4YmWwL6Y03MdUSPe9xXGyYjqfy+3kys5u/aRY cxDKIwR3l2lZWr+95FxPWJ8ogvbI7YLfb30NRuPE9BXi7aW7LhWAz+DN8QLvUA== 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 C96D130E13 for ; Tue, 18 Jun 2024 21:01:05 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJe3v-0000Zy-AL; Tue, 18 Jun 2024 15:00:11 -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 1sJe3t-0000ZE-Hm for emacs-orgmode@gnu.org; Tue, 18 Jun 2024 15:00:09 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJe3p-0003a9-BL for emacs-orgmode@gnu.org; Tue, 18 Jun 2024 15:00:09 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4230366ad7bso52697945e9.1 for ; Tue, 18 Jun 2024 12:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718737202; x=1719342002; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=GoB5lc917PbyPOV58A2Q9v98aiNUVTbIzo861fu0UA0=; b=OIS2Mio8THO6AHNiHgcAN1bQcc9k498h7eI3JFgL226FtnHwfUqoEG4BT+8Qd7cD0v 1rCAjY5OrCNKcPTP8ljMEeryAOiUJjRscUigIxjuWLzNZZjqJ5bVTwU28BnXY+ufKe8O uJ0CAnFaXDxdXYS+PTqkXIxe7/rVnREHybZXLKLMh3Ndw1e58AEAKlvhtwrKJFp/KrkE BBaWop6+IJr9Ay8gsJDfPi7B5bXVPsC/lZzpJk9GHPFbKgpQl9cZXqnexn6DfQRECdhV tlyJ+dtQtTQZ0qQh5UnKR4ljTJdVDSLhbASjCqxyQw12M/YyU9cIX+AlXqTZ/BGbvEYx HaoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718737202; x=1719342002; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GoB5lc917PbyPOV58A2Q9v98aiNUVTbIzo861fu0UA0=; b=d16Ktmd4zIWaKjU/YEfx798FcAWkuijjVwTVU14VvnBjo5p8MFdm2dUP/sJxTzxNlP bFnCU2HKZ50J+FfuYnadR5YgYIwqKHB4Cz0I3nUKkWNsmzBrfIS9rDhAQf8klhgBR5mW 2tfZcaJqQmwa/F/mPzOPE1pzZ0BKNUoBUdyb6Wdv09CbcEqNoQ+9u++Ajjdu3afS0952 fjk3QoD6ELbQtf65NrVzo8cVuZ+TmGMEe/om90HbeicOiv6hy+O4lo8ITezi9dbY1XNB ymkULuNwSATMUr4LHnE3SkzUj7P4Lq0GDGRbzKX4eNZf2VdCuUwORPrTEpTEmChYqgym +EzA== X-Gm-Message-State: AOJu0YwUbMZHTkpAInmA7DTL/H6C9B0bigMyWVftj94MfwXkNEKgZSvu TE2m1XIyQsm9mouwoEEvkQv8Br2WfU2bBsMp+3NAa+JD3bGEfp0E X-Google-Smtp-Source: AGHT+IEj4k4PBQhMhyfcLfK1PxhuoTBDriIHezjHcOO+a84f/BJkxoCwJbXJCTzmHaLuXq5L8NZ5Cg== X-Received: by 2002:a5d:6088:0:b0:35f:1f06:3d9d with SMTP id ffacd0b85a97d-36319990ebemr355655f8f.70.1718737202087; Tue, 18 Jun 2024 12:00:02 -0700 (PDT) Received: from localhost (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3632d8562a1sm249172f8f.2.2024.06.18.12.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 12:00:01 -0700 (PDT) From: Al Haji-Ali To: Ihor Radchenko 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: <87le32s93z.fsf@localhost> References: <87sexba3aa.fsf@localhost> <87le32s93z.fsf@localhost> Date: Tue, 18 Jun 2024 19:53:35 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=abdo.haji.ali@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.70 X-Migadu-Scanner: mx12.migadu.com X-Spam-Score: -9.70 X-Migadu-Queue-Id: C96D130E13 X-TUID: D3xmKzDBXyEc --=-=-= Content-Type: text/plain 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. Best regards, -- Al --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=org-refile-targets.patch >From 0efafc38b404bace9ff87e38349a6c64fc7be903 Mon Sep 17 00:00:00 2001 From: Al Haji-Ali Date: Tue, 18 Jun 2024 19:27:56 +0100 Subject: [PATCH] Use file-truename for files of refile targets. Ensures that comparing filenames works even when symlinks are used. --- 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..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 -- 2.39.3 (Apple Git-145) --=-=-=--