From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KFh1LWRlF2WE8gAA9RJhRA:P1 (envelope-from ) for ; Sat, 30 Sep 2023 02:01:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KFh1LWRlF2WE8gAA9RJhRA (envelope-from ) for ; Sat, 30 Sep 2023 02:01:40 +0200 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 3FA7C43C8D for ; Sat, 30 Sep 2023 02:01:40 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="kq1pV/Db"; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696032100; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=6AX/MVfNY1pM2Mez1lu8T5sjboc2tsVBWEdQ8ufc3eQ=; b=KifrfUjOMox7DqiXx3jQqWoV3tSv48aOx+ni0C6PY74scsUZTMtYvSgw7LAHPfca3EJ9JC JNqFm/aeGtObyiy7qcef8kiYKFjcyACo9Ls6IV0LmXJM1RdyHZW4HfH/8uhT2aMnlTpMG/ 8Jgh2C+qH79aYnbgYtlwrp3IuKSjGJ+94Fu0TCwR+YknNM9kIU0diJfAtigsiA9Cf4BeaQ cwfqIrZ0lySmIRsMbz2OGtlQpzXxlgF8oaEqYY+lRg4rmkFxRt9DQIWiNsrqyY+XyoTUoN vMb9C4yfgHUxXLKDADebUB+PVm8wp0+dW6k6jauvBoUp9/sRyE86/katCdEWnA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696032100; a=rsa-sha256; cv=none; b=J7nCDcMNRz3A7twZGqzJS0geiU0bzZWbjW3wvgNeGGuFDgy7n0c1/Sw9ShbOZZVK8iW3+9 2KxpbNmJD4Sh4a0VbMcFHmhtXa1AYMkfgHSMAHTJLAO2ijFBIBgqXZYCPJ4/mtFhmihPak ruJHSU0RodjBy/QzvwrEdfkR8P46nqVshMa4HXmJoWSV2cGDd/O8oO7Hg9fFzl2kv6qNzO G+Djldifhq7rWdVMQzt4PgwWd742g5Fd86ne3cYylFRxBzbCy6GRC9AgBpBboF6oZwyGLZ 8pnEx3snelR5lnpIwOMe1mt6XvU7xL5lMJ0CiwReZws7a9pupwZnGnthU88bPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="kq1pV/Db"; 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=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qmNPZ-0008P2-BY; Fri, 29 Sep 2023 20:00:45 -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 1qmNPS-00088g-Jk for emacs-orgmode@gnu.org; Fri, 29 Sep 2023 20:00:38 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qmNPP-0005Hf-3m for emacs-orgmode@gnu.org; Fri, 29 Sep 2023 20:00:37 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-690ba63891dso11677939b3a.2 for ; Fri, 29 Sep 2023 17:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696032032; x=1696636832; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6AX/MVfNY1pM2Mez1lu8T5sjboc2tsVBWEdQ8ufc3eQ=; b=kq1pV/DbO4w1JN3RBh3a5X05iwRrrUnRX+4YHmg/Td5yAxv5MEsLGmn46XnAf+tsRp 2q/YdbLRDjBhkoaIFtsigsm4emvb7P5ntJDZtPBtkysPhJg5bVJNB9lu0ikDhG/9KpKx NSUB9HjUltn9IaTn5GX935vH58eDNxdqq9QOdGCtoOaYrwl4NND2iAouM4YzGDTppHji MoD37frMpvygVQWETnvhREhDHtr0RPfVgzui/l3rEcNmHfEvGpuLfvViTA7CrBv2QJP+ UDUwQvALLuob8f7nA80UEL2LbgTcHBGNgoE8Tz6GB9GkVy3HnLk/rBN9FIklecBoBGLH Kzxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696032032; x=1696636832; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=6AX/MVfNY1pM2Mez1lu8T5sjboc2tsVBWEdQ8ufc3eQ=; b=OUsKizWKDCRh+14zAnfvVCKln+zgcAvD2yBZJ75k5vrz9yMetCfi4bcFZDi+Uopvyw sTX4tylUvgzOPzsZvRDu+btnEw/yEz0V7KKiOxa/lHL2DI8rBLnOnGRsA1diA47LPf/r R7b5FMfk2iI0+FC7zWllptHrNm9Tk+wjUEaO6ohIvhYiqF8se2dbTNYDxo4SAdnPTpMR +7sNuls99arl0tKX67b10uc0W08PWzwBYI+P3+veOOVKVe9mofITNMiFjlFn1JZ0KX0H KM7+byVb4NtcVEHNRIzNHbybnZNAPPAGwtji4E0gaEFlD1lnbE7HCsgHgyTxArhkifFO Sc7w== X-Gm-Message-State: AOJu0YxmokBbXN9+/MUe3bgda1MGrsU2mYB5l32t0lRGK+d1Jr/EiLaD lYjKBEeVrtNIKUkxSxQGSmclMk8CmMBoDw== X-Google-Smtp-Source: AGHT+IF5JiBJQPNuDMsSj30WbVmbAuXB/gIvfDL4QImtBks+1pAgED4FDr+gAunR2nZxqroXxxI5Uw== X-Received: by 2002:a05:6a21:1f1c:b0:14c:ca25:3b53 with SMTP id ry28-20020a056a211f1c00b0014cca253b53mr4807778pzb.27.1696032032158; Fri, 29 Sep 2023 17:00:32 -0700 (PDT) Received: from localhost ([118.211.162.7]) by smtp.gmail.com with ESMTPSA id u14-20020a17090341ce00b001bc445e249asm17408396ple.124.2023.09.29.17.00.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 17:00:31 -0700 (PDT) From: Sebastian =?utf-8?Q?W=C3=A5linder?= To: emacs-orgmode@gnu.org Subject: Re: Keeping org-id entries updated with buffer position changes In-Reply-To: <8734yxx6yh.fsf@nixos.mail-host-address-is-not-set> References: <871qekebif.fsf@nixos.mail-host-address-is-not-set> <8734yxx6yh.fsf@nixos.mail-host-address-is-not-set> Date: Sat, 30 Sep 2023 10:00:28 +1000 Message-ID: <87zg14wmw3.fsf@nixos.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=s.walinder@gmail.com; helo=mail-pf1-x42c.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 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: -6.59 X-Migadu-Spam-Score: -6.59 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Queue-Id: 3FA7C43C8D X-TUID: RpKi+Pt7W/KB I found the issue. Apologies to anyone confused by this, it's not an issue with `org`, but rat= her with `org-roam`. I assumed it wouldn't run any code when simply being loaded, but it turns o= ut that `org-roam` was adding itself as a link follow parameter for ID link= s when loaded by Emacs. Removing it solves my issue: (org-link-set-parameters "id" :follow #'org-roam-id-open) Thanks! Sebastian W=C3=A5linder writes: > I have been reading through the code, and it appears that org-id doesn't = store the actual positions of ids within all files. > > It's instead fetched every time the link is accessed. There must be somet= hing strange going on with the org cache causing this issue. > > Sebastian W=C3=A5linder writes: > >> Hello! >> >> I often use org-id to create persistent links to headings like this: >> >> * Foo >> :PROPERTIES: >> :ID: BAR >> :END: >> >> [[BAR][Link]] >> >> However, after inserting a line above foo, following the link BAR will t= ake me to the wrong line, because the org-id database hasn't been updated w= ith the headline's new position. >> >> Running `org-id-update-id-locations` fixes this issue, but takes forever= to run because it goes through all my org files. >> >> How would I keep these links updated when I make frequent edits? Is ther= e a function that updates the IDs in a single file only? If so, I could adv= ice the open link function to run it first and update all the positions qui= ckly before following the link. >> >> Thoughts? >> >> Thanks!