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 OBvBMRS69WaSjgAAe85BDQ:P1 (envelope-from ) for ; Thu, 26 Sep 2024 19:46:29 +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 OBvBMRS69WaSjgAAe85BDQ (envelope-from ) for ; Thu, 26 Sep 2024 21:46:28 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=runbox.eu header.s=selector1 header.b=AVonDqmz; dmarc=pass (policy=none) header.from=runbox.eu; 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=1727379988; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9zptxk4agUNAZCfuCbNxdbDCP1gpaYU7RBm9e4YKzFk=; b=Y0GgruDcYd/kWBJbmdi6TOuU6Fey36VUeG6loD9fcI6IWpBnZNq+IOSQEOErVsWbuJY4vq kIYL0eYYZTSMJM8/FYtsbWhXhog7g2z4iYKsy6L8HO7kT5l6ne9Ii6xCUBHoIb4XCgD0Qz 6X8Oy04qsRATkHqKfmaUf+VDQ1H9fu/ZpXUIbS/K5Om8ZVLMgWtLuwF51iKHRr5dzBwuR1 /ex8wgVTDXWXvWKdHEJTMdVtJFMClbO9xXawpV2v3c9GJbgNXcA9UawaJBdyVky4pTOSmp bhLNe+oEK6N1hsQ6Dc864gRj1OGVXWTYfFNoPo8kcUptMoETFYwwiFFXokeupg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727379988; a=rsa-sha256; cv=none; b=g5903tqKa6ZWb45DYRvkRxeKRXIBGfq0bY64i0bTKsW+bVBZw6uOksdjhSw37yQ7W+pDbp 7jXW+OPjxXX7JN7PD/1dlhzdef7mp/q8n+XYTaLVNCdEDU+ZEmq8kU7sT6rdoKq0OdIjai 49ePd9PoCSu+JsJ1AA5daBJVyMr2IYbuu9WylMTJEzgB6B078c0sgsBmKLSiGDaSiS3X7m 1v4Unkdqk3srVpgR7kFz38wBKLp+Xr8BpJT70unmPQHMkMbWLNXW9JtgTIANQ92vYStjkY XmPItdZUyZ7GBYr8qcYa9kH/llygCxDBlynG4gUSEvAt4lYMZl5polcVGB/i9Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=runbox.eu header.s=selector1 header.b=AVonDqmz; dmarc=pass (policy=none) header.from=runbox.eu; 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 4AB8B82826 for ; Thu, 26 Sep 2024 21:46:28 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stuQX-0007mh-Uc; Thu, 26 Sep 2024 15:45:25 -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 1stuQU-0007mP-1e for emacs-orgmode@gnu.org; Thu, 26 Sep 2024 15:45:22 -0400 Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stuQR-0006i2-C9 for emacs-orgmode@gnu.org; Thu, 26 Sep 2024 15:45:21 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1stuQI-008f3G-Sc for emacs-orgmode@gnu.org; Thu, 26 Sep 2024 21:45:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.eu; s=selector1; h=Message-Id:Date:Subject:To:From:MIME-Version: Content-Transfer-Encoding:Content-Type; bh=9zptxk4agUNAZCfuCbNxdbDCP1gpaYU7RBm9e4YKzFk=; b=AVonDqmz10aT7Y7TQA7uHE22sc 1FW/eUvQNQBPhtwvcMHD3Iett6sFqKFcjzLaD0O3+oeTTgAJ5DSBgnjx1Nvj66ugdCXO9L6ETiHF+ j8yKoF9lb6f7Jnjg4GNEGnpAAzY9nTLb6rDOUUfr0K921a1lZ/hjC/yE+K+hP/nhmtX99C/KwgIUT ++2HLQGNpwBNvs7FIpl178tpXZRJogApmq7RFIBAbROCyUEv7wBR/mi4gr9wTF//YGVZR0Pyto1sj 4mcBH/hJoiOLxE3u80X/YIrSQ49tcdQv8cdtnZAaVjM1+Yo+1lQ5SibK1qL3z0tncklkH0kVFrNHB 1LPK+j7w==; Received: from [10.9.9.128] (helo=rmmprod06.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1stuQI-0001X1-7q for emacs-orgmode@gnu.org; Thu, 26 Sep 2024 21:45:10 +0200 Received: from mail by rmmprod06.runbox with local (Exim 4.86_2) (envelope-from ) id 1stuQI-0006YG-64 for emacs-orgmode@gnu.org; Thu, 26 Sep 2024 21:45:10 +0200 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received: from [Authenticated alias (1196375)] by runbox.com with http (RMM6); for ; Thu, 26 Sep 2024 19:45:10 GMT From: "=?UTF-8?Q?Martin=20Edstr=C3=B6m?=" To: "emacs-orgmode" Subject: org-id-locations-load should probably abbreviate file names Date: Thu, 26 Sep 2024 21:45:10 +0200 (CEST) X-RMM-Aliasid: 1196375 X-Mailer: RMM6 Message-Id: Received-SPF: pass client-ip=2a0c:5a00:149::25; envelope-from=meedstrom@runbox.eu; helo=mailtransmit04.runbox.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 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-Queue-Id: 4AB8B82826 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -7.82 X-Migadu-Spam-Score: -7.82 X-TUID: Iwaz8/bh/TaE This is not a bug that breaks normal use of org-id, but it may affect downs= tream uses. An example is my package org-node, which checks file names known to org-id,= and combines that with other sources of information, to build a big file l= ist. This list is automatically de-duplicated because I can normally assume the = names are abbreviated. However, reading the source, it seems that it will n= ot ensure this if `org-id-locations-file-relative` is t. Then `org-id-loca= tions-load` merely uses `expand-file-name`. So a path that used to be ~/or= g/file.org becomes /home/me/org/file.org after loading back from disk. This can be tested by evalling these sexps (if you replace "/home/me" with = your own home): (org-id-add-location "id1234" "/home/me/org/file.org") (gethash "id1234" org-id-locations) ;; =3D> "~/org/file.org" (setq org-id-locations-file-relative t) (org-id-locations-save) (org-id-locations-load) (gethash "id1234" org-id-locations) ;; =3D> "/home/me/org/file.org"=