From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8KsTMmWUM2WT0QAAG6o9tA:P1 (envelope-from ) for ; Sat, 21 Oct 2023 11:05:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8KsTMmWUM2WT0QAAG6o9tA (envelope-from ) for ; Sat, 21 Oct 2023 11:05:41 +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 55B8A6E3D1 for ; Sat, 21 Oct 2023 11:05:41 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="APmLbUG/"; 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=1697879141; 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=IdJepWWzXON77XTIpCDyoyl1/dIKglZMNcORdyOib+w=; b=Cn9ZXDKbZFly9UzpD/F6A2yVVA0mu2nJy8XzPQWrp1BHVI31aMGUkhyVlih7+BmNyu3oUI lC5cOsgjw+0Mcd6sG4IxTjfibS6c4TFGMy8/oyeovWYtNgzX0gSuR6vCH5lNLHG5XQn932 XrVS/nQSBhHDPqd4h2vZ82iq93mi951yn836kgGqtTyADRyXrQvZOH9nGSkNxNkpO15N3C dQq4nKgKH2VI6xnNSiNNBNK/AuIjmtXCpEZh8d6NI0klsUXzYCULAYp78Wn4XY8oHevLuH t/waky8zIlcG5/sOtbOkCa3zxwtIE6Z1YtQk30SBQthBK66fmCg7qP94hBGVSw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697879141; a=rsa-sha256; cv=none; b=rBwgvXeZSKaJiIkv9AydzwFgLxkDwa4KxBHgP8PB0EH9oUFjnbC0k6FALA8HXfNlLlYC/T AdQAKH2HtF4hHJWoQftN0St3Cmnoc+A/U9Z3rTpbYhPpsXwhoiZTisFvZT8FyFpaXO4WI7 80H02boQt4s9XJKxsexR3zEGkDglBlTbRVieQ15HBqXZ8Ypk04swTILrQ3tEHbd/gDgTY/ 2PdmYmHGYetnaBYPtTlzoWzu5vwIMzO0BBJznRiRXuiNfbXkQza0vg6KffEDn10fqaPOv4 V1Cj5r5W/JN2Dny7tIUAhU/btwY+a6IPFQ/EYHXYVkJiXrQoQnEX15d5jRz2aQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="APmLbUG/"; 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 1qu7ui-0001J9-Kf; Sat, 21 Oct 2023 05:04:56 -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 1qu7uY-0001DZ-0E for emacs-orgmode@gnu.org; Sat, 21 Oct 2023 05:04:46 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qu7uW-00054q-9j for emacs-orgmode@gnu.org; Sat, 21 Oct 2023 05:04:45 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-507e85ebf50so790651e87.1 for ; Sat, 21 Oct 2023 02:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697879080; x=1698483880; 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=IdJepWWzXON77XTIpCDyoyl1/dIKglZMNcORdyOib+w=; b=APmLbUG/VbWYjIBVHSMaOUAOngKU/g7Jz2zW7ETfaxqiKoOTqh5sk7Sgdxn3zxkF8y 2utFr2vrRa11FHN2kZTEdqWbcQu1IwbF+NEYfXJeRBXwl3XIwtFPhez6n5DIb5zpqHD0 rJpgcZiqlRfIzLl/ZYyL0Qsy6yXTZ0HuVPniymmuSfsx0FEANVsnRCAQMrZ0beNW3DA/ wWIA8G4w4eOGG1diEwriMoP0xnQsz9IfXlI8I4mYK5M9jpbU3UUlx7TWXZlSKG01jq1v vYUO8SL/ib7OnUPFBV7diFOSCaB6RK7nM+8OucfVGe/hR/jhJ4oONBfPFkOaew5ET66U M1VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697879080; x=1698483880; 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=IdJepWWzXON77XTIpCDyoyl1/dIKglZMNcORdyOib+w=; b=cs+vMUPsOD53Nww8PiCbgklUDjW7F8n+OPcP/0M/p7kdF6Kdu6YyAiF2k4FCSy3rsq YlS3NImJ4pZ8fVyDEZyBabZ2Km0aniurjshxh3gfDxqyUfVKdxW+6mKTPlz+2wu9h5k+ apHwXmHwGdckHNIGnHIzL91lq2eUtFrgIypTszXRcW8I9hPppitiX8y7DLuLDevVatzh vk+LmEWIv6MkqMmt/4sbXcK5yENxPKE4IU7ASasrZUuw/MJnWTJEb+Zz3vyWgyL3sxXA sro45VrIOnN2hXFgAew7ctS4uHj7iZsDgDETRNNfFV0nM3Tp6yrUFaykoe0hVarJ6ccs U3pA== X-Gm-Message-State: AOJu0Yw5X0Eiu84nkEMtAkZSw4zzbM4op+B8jXCuEkdf9xtCmkKbmzIO 4crxvUHUQGjJ6ftoFpVqUdJVQefrPZjeYg== X-Google-Smtp-Source: AGHT+IFYeB2irJtGWXkIWRZWAh5UsqRbg3vfsgTOsd13ljpwLYz8rpyco3EKCE8JFtBI84dJuVPt1A== X-Received: by 2002:ac2:5dcc:0:b0:507:b935:9f60 with SMTP id x12-20020ac25dcc000000b00507b9359f60mr2833626lfq.57.1697879080030; Sat, 21 Oct 2023 02:04:40 -0700 (PDT) Received: from tor-Prestige-15-A10SC ([46.230.141.173]) by smtp.gmail.com with ESMTPSA id s16-20020a056512215000b0050300e013f3sm773510lfr.254.2023.10.21.02.04.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 02:04:39 -0700 (PDT) From: Tor Erlend Fjelde To: Rodrigo Morales Cc: emacs-orgmode@gnu.org Subject: Re: Feature request: IDs for everything In-Reply-To: References: <877cnhyuom.fsf@tor-Prestige-15-A10SC.mail-host-address-is-not-set> Date: Sat, 21 Oct 2023 10:04:27 +0100 Message-ID: <8734y4z6qs.fsf@tor-Prestige-15-A10SC.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=tor.github@gmail.com; helo=mail-lf1-x12e.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-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -7.94 X-Migadu-Queue-Id: 55B8A6E3D1 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -7.94 X-TUID: Ic0pnV4skIW4 > What could be the added benefits of having such a header argument? I can think of this benefit: #+NAME would be used for referencing them through a human-friendly name and the name could change and the #+ID would be an UUID that is not expected to change. This is indeed one use-case I had in mind! Generally speaking, I would imagine the motivation is the same as for ID vs. CUSTOM_ID for headlines? As in, most arguments made for the introduction of org-id.el in the first place can be made about linking to blocks, etc. too? I haven't seen the original discussions around this, so I'm only speeculating here. What I specifically had in mind is mainly about what you can expect from an ID vs. NAME. IIUC the ID property is meant to be a "globally" unique identifier, while something like NAME is generally only meant to only be /locally/ unique. Hence, if you want to interact with such references programmatically, it's useful to have an a "globally" consistent way of referencing not just headlines, but also blocks, etc. A fairly prominent example is org-roam.el, which, when they moved to v2, decided to solely rely on IDs rather than allowing all standard forms of Org links exactly because "global" consistency is so important for them. org-id.el also just provides a lot of convenient functionality, e.g. automatic creation of ID if it does not yet exist, which would similarly benefit linking to non-files and -headlines. Hope that clearifies a bit! All the best, Tor On Fri, 20/10/2023, Rodrigo Morales wrote: > Currently, headlines can have an ID (see minimal working example below): > > #+BEGIN_SRC org > * My headline 1 > * My headline 2 > :PROPERTIES: > :ID: e8745be0-906d-4e02-b427-d298f5751f6c > :END: > #+END_SRC > > Blocks can't have IDs, but you could use a UUID as the for blocks (see > minimal working example below). You can do the same with tables. > > #+BEGIN_SRC org > ,#+NAME: 412f567b-26ce-4f21-b07f-f5296c830314 > ,#+BEGIN_SRC sh > seq 1 3 > ,#+END_SRC > > ,#+RESULTS: 412f567b-26ce-4f21-b07f-f5296c830314 > ,#+begin_example > 1 > 2 > 3 > ,#+end_example > > ,#+HEADER: :noweb yes > ,#+BEGIN_SRC sh > echo foo <<412f567b-26ce-4f21-b07f-f5296c830314()>> > ,#+END_SRC > > ,#+RESULTS: > ,#+begin_example > foo 1 > foo 2 > foo 3 > foo > ,#+end_example > #+END_SRC > > What I understand from your message is that you would like to have a new > header argument called #+ID: that could be used for code blocks and tables. > Am I right? If so, I have a question: What could be the added benefits of > having such a header argument? I can think of this benefit: #+NAME would be > used for referencing them through a human-friendly name and the name could > change and the #+ID would be an UUID that is not expected to change. > > On Fri, 20 Oct 2023 at 19:13, Tor Erlend Fjelde > wrote: > >> Hi all, >> >> I was wondering if there's a reason why we couldn't have IDs a la >> org-id.el for everything? >> It seem to me that it would be useful to use something like `#+ID` in >> place of `#+NAME` for tables, blocks, etc. as well as headlines. >> Would this go against the intended design of org-id.el, or is this a >> change that would be welcome but that no one has gotten around to >> implementing yet? >> >> Also, sorry if this is not correct way to go about this; it's my first >> time posting to a mailing list. Let me know if there are some guidelines or >> something somewhere that I should read and make use of. >> >> All the best, >> Tor >> >>