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 EKA6Lsj/FmVdBwAA9RJhRA:P1 (envelope-from ) for ; Fri, 29 Sep 2023 18:48:08 +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 EKA6Lsj/FmVdBwAA9RJhRA (envelope-from ) for ; Fri, 29 Sep 2023 18:48:08 +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 881244AE1C for ; Fri, 29 Sep 2023 18:48:08 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=U1jBd8J8; 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=1696006088; 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=XLbZzgPG2wC5YKGRLtuTsLJZtwb2ZwTBW9bK37uLybc=; b=Lh08y/VjYqOtF8kYj4lWk8b7Vv0662UI3ULh1RtPWGNO2EHCmzbWrYG2CfQvO9oASFt6AB FONPgi24Bl3J7sqTlIS82GeVZIfksExxDZeHOT3H5w1686Z/PbUcB8TO7YQDP0Gms3Ms7F XkZrwroWCtDQQc73+hV8anC+FAi1SYLy0adzZJINWe82AYUVznJyo4FkqHxvWxBpeFyxqo ZufiwJmPICi8328BRx1IqtrDsTgm50/lTshGR+wDgrlqVj33dn/x/Hgh5N0P4sRs3vlZCj tmlEdhlX59sDWbF0FgPmZ5uUckN3HSME8Q2i2hs4XJ+L01yN9pSgdbKjFZAq7A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696006088; a=rsa-sha256; cv=none; b=IMtI8l69HnLywno+3whU0xR0seLRexX42nOiOnUiW7EPUSswuXsgsA1cZisjSl/Bqjb47j IyC3JD7Biumbsm8lsqxUb0/x6bOPjIHakCRL7wRNMBuc6SxcQnyFCiYf31FsRtNUqBRaZ4 P608Ju8oaXkyu+w74CKm8Pt7R2mbb4BXbCsY/VBvPzGim3yvMZODxyS+PlpZxi/3me/1Hi CFBx947JRd0ca+Fmg8i4EwLKadYKXR5IAeHfUq7gG0q9JIIocQqZBlzeyNc/1JhfUuR+Vg 8tIszb8lxfm+Hr1wsSFwhsbDqlEqNrB5d41LnDOUofhagtp/rr4by1JMY6PMYw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=U1jBd8J8; 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 1qmGe1-0002lG-86; Fri, 29 Sep 2023 12:47:13 -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 1qmGdz-0002l0-Tp for emacs-orgmode@gnu.org; Fri, 29 Sep 2023 12:47:11 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qmGdy-0004yE-6p for emacs-orgmode@gnu.org; Fri, 29 Sep 2023 12:47:11 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1c6219307b2so71801245ad.1 for ; Fri, 29 Sep 2023 09:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696006026; x=1696610826; 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=XLbZzgPG2wC5YKGRLtuTsLJZtwb2ZwTBW9bK37uLybc=; b=U1jBd8J83b+fi7NN+ZZos5mux32bkQIUz8//J1piNGjydI+tsCdgG0wcVxUPPYEesC NOfeqaLsZvLRlfHBiIGQKl8g9aqfjXvfkbb0sfqEFGgreph9HPsEedIHE68vtBOkGprW MngUMCQPiT216+KT7e6/9VPCDQur7bZMk0C88uCbX2WWynev1FMNAJHGDzcxcPkVJnfB /SVEzjav1vaFQM13bu9W5e/Q4mz/6CtkLQl9dCZ6Mhrisrb+PzdMnxn7Squo1ZfDuhiB BuPDivPUH2AaVl8TybrKFSnu3/guJmtdxVIjTidKgNzxgOJaupA5nx7+IGU76UMDUHdo SwLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696006026; x=1696610826; 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=XLbZzgPG2wC5YKGRLtuTsLJZtwb2ZwTBW9bK37uLybc=; b=uufuQSQX2z42Jce9YqWOyL6p6ObafvB3zRvGYDM0QHm8TmSE2uTMoQxJcwtef2+JF1 wNoWBfrsTfZ6HzIp51klppCWzdL+4sbe9K4z/NGabo8JRpZDwFdvogG84v9mxJZSd60X 5V44FNPp+xsTedAxLL6qpCHHcCKcRAjPB5AJkHyVk5b9cYtHn1CppozOW+rJck3EowS+ h6XKZBxOI+Kv4xGFwy/ckQkun2ikkf0dggrZd0rYrB3MKdDukvuemVwz8JHJv4J8LG0X cV7jr6vzZwA7swk6n5bYfZSYYvYIGun75WPJIphQoLrnkwJM9XJzzLCKktmm4fMT42B8 anzQ== X-Gm-Message-State: AOJu0YymbjVX2OtOCnn0szIIlwc+9+gJgUWpLZyyHwyQwkvOIFCMRg9q p3tAntQaECatQRvO3Pwy71FdFm4wdOl95g== X-Google-Smtp-Source: AGHT+IHoDLy7Ez73twk/um5AOvrs6DaG/zAHnBMF47PVHYm63iJu7qGUs1qtsy9g83VxPTSaur8U5w== X-Received: by 2002:a17:902:a98c:b0:1bd:ca80:6fe6 with SMTP id bh12-20020a170902a98c00b001bdca806fe6mr3582090plb.41.1696006026334; Fri, 29 Sep 2023 09:47:06 -0700 (PDT) Received: from localhost ([118.211.162.7]) by smtp.gmail.com with ESMTPSA id v7-20020a170902b7c700b001c62a8f3410sm8382012plz.10.2023.09.29.09.47.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 09:47:05 -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: <871qekebif.fsf@nixos.mail-host-address-is-not-set> References: <871qekebif.fsf@nixos.mail-host-address-is-not-set> Date: Sat, 30 Sep 2023 02:47:02 +1000 Message-ID: <8734yxx6yh.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::630; envelope-from=s.walinder@gmail.com; helo=mail-pl1-x630.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: 881244AE1C X-TUID: cL32AD1NhpFG I have been reading through the code, and it appears that org-id doesn't st= ore the actual positions of ids within all files. It's instead fetched every time the link is accessed. There must be somethi= ng 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 ta= ke me to the wrong line, because the org-id database hasn't been updated wi= th 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 there= a function that updates the IDs in a single file only? If so, I could advi= ce the open link function to run it first and update all the positions quic= kly before following the link. > > Thoughts? > > Thanks!