From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sJFMFyeycGb+XwEAe85BDQ:P1 (envelope-from ) for ; Mon, 17 Jun 2024 22:01:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id sJFMFyeycGb+XwEAe85BDQ (envelope-from ) for ; Tue, 18 Jun 2024 00:01:11 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=e8+8R9Uc; 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=1718661671; 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=KnH8WzxrNl2tsY/BTTUVIStTW0Gg6dGxNvwhzeOdS3k=; b=kSl9OyDrnU03vB1eg+RW7Rz4aEs25TQgzhk19UttvqqLKsNlcrAucsRvETrhKZeRjGQZve uvqAY+ANpnE47t48hDNXXmJ+wnEosPbKJs95eB4rbYpR3OZEgEEDacrbKCuo940y6tunhj cFA7gubeLZJAoUbEBuKX3CNZV+38GGR5wXY9uQZfB/mYSGu4QI8tchnzjo2ZYwzMkRuHc/ xZ9pSpJvPquC6O3ptVT+XF4Rfeh1chTzhMSaY2hmkKMaRST37yo5ZRZsPECXmlWwkZxCHQ U1dEDHenoS20nFh9FFOcKf4q6mhPyWNMKIP8EYTaOuGM93thJ4P/tKfsWn4+zg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718661671; a=rsa-sha256; cv=none; b=VhiUab8MB2Ui6GT+0mYnQEsLWZ7Guh3frAWxvNA2kvBuRk2rguN63dv5YcmGPQSZ38uMU3 V4U9ZjQ2bk62e/orzY0xoJ9G8TtCkUaiXrcBCIw8eCUiG9pjqKe+JQvqr74Nv76q9B0iGq PeRQs6qNEpN8FFstge0Hs9i10xNWBmmXaGoXfwRSJLBYcuh6ITTeXY29sDCQDBQHyzgfN0 gyB9rOwYmryR+a1Yb/QCYHP9CBwcLv4JbjE+cFVbrOYOyrzy8A4t/1dCqG85JkAyGdGCYV GMpyPWSY2WxiBUTGPtfQepTc8udzgO2xas8RB6tLZs7Dv8dhfQpzmP14KnDCwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=e8+8R9Uc; 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" 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 229EDE6E5 for ; Tue, 18 Jun 2024 00:01:11 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJKOX-0006Ci-AF; Mon, 17 Jun 2024 18:00:09 -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 1sJKOV-0006CY-GY for emacs-orgmode@gnu.org; Mon, 17 Jun 2024 18:00:07 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJKOS-0002pS-Dw for emacs-orgmode@gnu.org; Mon, 17 Jun 2024 18:00:07 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-35f1e35156cso4200597f8f.1 for ; Mon, 17 Jun 2024 15:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718661602; x=1719266402; 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=KnH8WzxrNl2tsY/BTTUVIStTW0Gg6dGxNvwhzeOdS3k=; b=e8+8R9UcK5pgfTbryqli2R6Bqi+jhoFEdu9O/hwzds6faZ7WGtkT3sJvZX/v2ewrnr 7s57TKz26tara2UePDdgsU3qloK/HrpX//pk/eb37TnPg5NyQ57ek/0N62/2FJHXXci4 dkQ1f2Md9KrWd7IpLXuLPvapy+o7cMMB7uVJMAGslUSOBxdhcy6F2E/kN+hvcvzheEsd T2mtayknnX6YSbfN4P4VmJHj1oBbToqev/yb4FLImiYgKH/RQ4YzO0pFyUZjnJx17DY5 1h0xJX4SHd9NqdbLApzL5O6q74Z+4EqCxsOQ9ecrufJOig9LhIWr7/BVI1KxMLRzFFPi oYRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718661602; x=1719266402; 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=KnH8WzxrNl2tsY/BTTUVIStTW0Gg6dGxNvwhzeOdS3k=; b=xAMBvbsT7mkAZMJSYmd8u2No08Re3yMkLKt0qwHwLIU41eHeGz9qyO9s40KOfZrlbi Dfd8LgORmBHF8W+AVdc2U0TkTXP6DM3XSqFBxR9f0fQSr8UmWKwvWFREP1BCaykfaPjk amqYlFqDWeA21R8VDdzrqvudGloz98qG8kYefDihImXhgQHN+23JC0MoS1UN9HZealfx I0oa32tiqd7d+snrGMAyPeTrIthOf+KR83sM4mKjh1sgRzI2U5rKzZh9/RNf7B+HBkws nGBOrGLKPwODhtMn6e3BkB/O0L6vyO93jMZ5a7NiU33ZBEIW1uwvvpFl5ugnA96rQKbx 5xZQ== X-Gm-Message-State: AOJu0YwZxCVR6ahaSLLHkswqHvoOZ+K7dC5XBzRSPXYC32ADp41TKykd R29rmIjGWKdQ1IXYpfFH9Y04L/i4oABWRCrIv5CmXUVJoHGfdUmpUvf3+Q== X-Google-Smtp-Source: AGHT+IHG4vMSEdGLZv1ko3hLKhO6KvK4OcDFs2oeUDPJGNexvd6uiYSienTlr/KH7wowSIShSRKU7g== X-Received: by 2002:a5d:6ac8:0:b0:360:9bd2:a22c with SMTP id ffacd0b85a97d-3609bd2a4dfmr1669115f8f.13.1718661601868; Mon, 17 Jun 2024 15:00:01 -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-36075104c17sm12681863f8f.106.2024.06.17.15.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 15: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: <87sexba3aa.fsf@localhost> References: <87sexba3aa.fsf@localhost> Date: Mon, 17 Jun 2024 22:52:20 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=abdo.haji.ali@gmail.com; helo=mail-wr1-x434.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: -6.70 X-Spam-Score: -6.70 X-Migadu-Queue-Id: 229EDE6E5 X-Migadu-Scanner: mx11.migadu.com X-TUID: 8tHcZ13an6bK 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