From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sGN2NNp1B2D9IQAA0tVLHw (envelope-from ) for ; Wed, 20 Jan 2021 00:14:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id C/ZJMNp1B2DfCAAA1q6Kng (envelope-from ) for ; Wed, 20 Jan 2021 00:14:18 +0000 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 0E6CC940482 for ; Wed, 20 Jan 2021 00:14:18 +0000 (UTC) Received: from localhost ([::1]:38662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l218Z-00024I-Tc for larch@yhetil.org; Tue, 19 Jan 2021 19:14:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l218C-00024A-BV for emacs-orgmode@gnu.org; Tue, 19 Jan 2021 19:13:52 -0500 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:44285) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l218A-0002Xr-B1 for emacs-orgmode@gnu.org; Tue, 19 Jan 2021 19:13:52 -0500 Received: by mail-lj1-x22c.google.com with SMTP id m13so23978185ljo.11 for ; Tue, 19 Jan 2021 16:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=fTUwe7Ef++FoFrysPqCJHeIyc/U2MjVfWt9OGz0lQbI=; b=ehjH3ALNL4p24j9bkYc5Mp2i4t7xTHGOlPQovkMG9wemlbWFZrNhOQ67IZYNRD45dG 1eban8Fssh8928jD2lgLAbb7JwMuN3nsMcOzFJXiL8B1oASjMHxXk0pNRd55i73ej+gj Fab0qkqJ+nDv59/d6Zp3U02bl9mM0OdBq5Ay1qGdJNaI8xrOvuLJeCh9T8TjOjuRiF4z IK94WeGQ2UfoBeccHk1JDVv1rfXUK38PiMUF4YyI22JzTMH8mS3e/lkIAM/CcI0ePane RMPHoLegeTI/P4rUXvV3lGPXse9JrNbJz6KJ5De/EpTN1RkXe5ysf7cM0sHcbawo+Hp0 KoHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=fTUwe7Ef++FoFrysPqCJHeIyc/U2MjVfWt9OGz0lQbI=; b=EOoNLcKfP/UGEZ0XsS4x9dWjiLC7LG5ygqGwOCh2cTvQnK6AxJlR5wDeSiWzroEyln Hr8xQFtUYNBInWuYc+90lw3PxWRavfCahkfRwEzniWCZHm7PC7bLCjB9JFiHykImIj1e cOzn5G8DZrtHtQxEaOjawZvk5zTGluco2vcDs1oKXEQHVq3dX9vEIRU0C/UPdw0OtT2A oc0P6H8tcNbBz1DEXUZEnERFfPq3j9YATPZBacTg6bIcOqvotRZECRuI/rJBnGOveDDc SP8O3ytfA+sb5ce60QfoWXX1Gr4o+HleT+zxwQA+WQhpKJDUNWaU9QvT+75rdl3DiTAU YxXA== X-Gm-Message-State: AOAM531hJS2A2Z4cOmZLfY0fUrkGaRBRd8z8a/U/qj6izIyJxzv0E03P uLCnH/NlSLubskvfc6ik2lny5bpQvCWbotGqfeY= X-Google-Smtp-Source: ABdhPJzZwL8lwzDuE3h7FQSIo3bDHTk6ZSRhswNIN8VDhtzBdtC6iHrk/X17hMhjjaw/sneae9mAGQk9iXDCusrNHxc= X-Received: by 2002:a2e:2c15:: with SMTP id s21mr3019032ljs.39.1611101627524; Tue, 19 Jan 2021 16:13:47 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ab3:6450:0:0:0:0:0 with HTTP; Tue, 19 Jan 2021 16:13:46 -0800 (PST) In-Reply-To: <87ft2wvktj.fsf@gmail.com> References: <87ft2wvktj.fsf@gmail.com> From: Samuel Wales Date: Tue, 19 Jan 2021 17:13:46 -0700 Message-ID: Subject: Re: How can I keep Org-id links from breaking when moving files? To: doltes Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=samologist@gmail.com; helo=mail-lj1-x22c.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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arozbiz@gmail.com, emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ehjH3ALN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 0E6CC940482 X-Spam-Score: -2.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8UCjMhbGcShb (defvar org-id-locations nil "List of files with IDs in those files.") (defvar org-id-files nil "List of files that contain IDs.") you are in a maze of twisty little passages. you are in a twisty maze of little passages. On 1/19/21, doltes wrote: > > arozbiz@gmail.com writes: > >> This question is in the context of using Org-id UUIDs for linking betwee= n >> files. If I understand correctly, Org-id knows where to look for UUIDs >> (generated by org-id-get-create) by looking at the org-id-locations >> variable. But what if I move an .org file that I've generated a UUID int= o >> another folder? I know I can run org-id-update-id-locations, and there's >> an >> org-id-extra-files variable, but is there a way to list all the folders >> on >> the system where Org-id should look for UUIDs? >> >> Thanks, >> Alan > > After reading the docstring of the function > =3Dorg-id-update-id-locations=3D, I found that the files which are scanne= d > are defined by 6 variables. > > The following was retrieved from the docstring > > #+begin_quote > This will scan all agenda files, all associated archives, and all > files currently mentioned in =E2=80=98org-id-locations=E2=80=99. > #+end_quote > > This implies that when that function is executed, the files whose > content is searched for IDs (i.e. they are scanned) are > > + The files mentioned in =3Dorg-agenda-files=3D. > + The archives associated to the files in =3Dorg-agenda-files=3D. > + The files mentioned in =3Dorg-id-locations=3D. > + The files provided as arguments to the =3Dorg-id-update-id-locations=3D= . > > The following are not mentioned in the documentation of > =3Dorg-id-update-id-locations=3D, but when looking at the source code, yo= u > can see that the value of the following variables is used > > + =3Dorg-id-extra-files=3D > + =3Dorg-id-files=3D > > As we could see, the files which are scanned are defined by 6 variables. > > Now, apparently, you want to get a list of the files which are > scanned. You can do that by executing what > =3Dorg-id-update-id-locations=3D executes in order to get the list of > files to scan. The following was retrieved from that function with > some modifications > > #+begin_src elisp :results output > (let ((files (delete-dups > (mapcar #'file-truename > (append > (org-agenda-files t org-id-search-archives) > (unless (symbolp org-id-extra-files) > org-id-extra-files) > org-id-files))))) > (dolist (file files) (princ (format "%s\n" file)))) > #+end_src > > #+RESULTS: > #+begin_example > /home/username/my/org/Statistics.org > /home/username/my/org/Programming languages/Elisp.org > /home/username/my/org/Programming languages/R.org > #+end_example > > Hope that helps. Let me know if that answers your question. > > --=20 The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged= .html