From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 8K2cKSAJOmXySQAA9RJhRA:P1 (envelope-from ) for ; Thu, 26 Oct 2023 08:37:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8K2cKSAJOmXySQAA9RJhRA (envelope-from ) for ; Thu, 26 Oct 2023 08:37:20 +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 38E04511A3 for ; Thu, 26 Oct 2023 08:37:19 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=im8yWoc2; dmarc=pass (policy=none) header.from=gmail.com; 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-Seal: i=1; s=key1; d=yhetil.org; t=1698302240; a=rsa-sha256; cv=none; b=jEKvQMtNOs9L6WHTQ1PxX8PxNxSpb9LtoIjpUfOilHQ4PHgQZz+S0KboTAa5QFzTclAUfg 3SZOvYVQLOeDgd/NQz/jCsOGdaMJaKzyTwfhISh5iTtm04xuzBY+BjgY7cRhYwtgSPxEN5 K1/1K9P9KulG3vYHXhDGdijydHvjP/G37bJNr3+7jfvfT5/PFEpkfr3YahFLWthXWMt3Tk X4whLXElo8X/GW91qeLLfo5QBG4PMmp5WHVn8Yw/qWkLu49K9A6eetrkTVh564Q+Vl35zN uKZyAy8u6sWL+eVpbcDgIi1lhkkakJU3d6o7ynCAx44wCbVaq/hESd7P6/0yUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=im8yWoc2; dmarc=pass (policy=none) header.from=gmail.com; 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=1698302240; 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=ccIKCGtXqBSRhcDC8FIOpvsfeiXERKqTE+eSkknyLLE=; b=Q1oN5NYfDNGqJD4RSeW+hHD+zP8t0MEo9uQqHpHARqIUYxQc3Vhi9Iy8WJ2IeWlhIY58uU EpaVUGEjLIKzZHIfphyJLKRXqoM0uSzBBjP/CldvxUChu6NZFHzZjEPHuyblfvE0AgUK7Z fqEld/dWZZwy8iP/fXUjA9Nckfp4NkMeZj0vRs/5Cdb2jPvhlJTi414mFRwch91RzeoyIJ ce00KbchsUxCcEUqO1ZqewMpGbrneLtg7ocJC/DCbRroP++Y68UP0BsRzXCaeuc07VRZ/8 qCIBou7ZKcohYyfPN8ajxk9VyywZOfwo/wByiYuEAFaugQOr9jFDG06tQWkFRQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvtyA-00056n-9z; Thu, 26 Oct 2023 02:35:50 -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 1qvty8-00056H-1X for emacs-orgmode@gnu.org; Thu, 26 Oct 2023 02:35:49 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvty5-00035z-W8 for emacs-orgmode@gnu.org; Thu, 26 Oct 2023 02:35:47 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-32ddfb38c02so358828f8f.3 for ; Wed, 25 Oct 2023 23:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698302143; x=1698906943; 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=ccIKCGtXqBSRhcDC8FIOpvsfeiXERKqTE+eSkknyLLE=; b=im8yWoc2oPSgvb7+ZPjdtb27N1m+rDZ0frX/BvekoWDcvrM2Iih53EWVVtndhTbWGd E4qu7MVOfd44uDGVfZBqVlaCyJGWojHXI+zP6RDSkqbZRAMGxdiKjXBzXN+HiYsDCDMj 6Ny6T2rfT+dURim3rpIHS7Lw9YR6DKhCOTjMDbktvqq71ag0VgSZTvP8G8H2gmZKj3pS byoJhOYSDWe2kMVrKlCWk6cHaD8RTikPandZzI1eXeNtehEw3ZSM7uGs2+uCO98s0yp8 hcuZQtW9NNNsPsfJa8XlJJwqlHY1al8N0sBBsUCqkiUfGeD/ovdQF6ArjPZaIyGV6Zsb D5MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698302143; x=1698906943; 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=ccIKCGtXqBSRhcDC8FIOpvsfeiXERKqTE+eSkknyLLE=; b=pDxZUGHFKh+8Gwi4MeVXKRREV7L72EhX2k73xXADOoWXW3YCfPFpjGAjiB9Z1vSOsO TKzEKtQ0etytf5/j2fcXIpcVcjc5+sE9OorQgxGHcg3AfqJXiI8S1XdWHcoi7ec63txb An8rjG0Qsqw9kbn6rJoGxXkAFyWHKEMMPuCQ+6CBVj+f4aZ+ifqHbgAefCq1MFe8DBc0 aEWupv0f2olNvTaNuK/GNBXGDWuSzWiRhbA2HRtN06nHyuh63+AUGxmpI5SeldRqHdI1 4TDjYz400PmTfC3VTkqHXTAhOFWWx9t7GxxAEi0JLLT1jwElbtH64ic22pUZqBNf2jTv SSSw== X-Gm-Message-State: AOJu0Yykth0gYPgC3+CI1hWc/XjGdYOAsgKeZD6pYh7/976LUR0naieC XJSMxtTb53iGm5Y63BBWwPFEz3CI/IM9og== X-Google-Smtp-Source: AGHT+IFaeFhqjmeNpeg5fNowjx7j62YDqP8NndXb8sAtSxGQbgQbXCZNNOKoCxHurKwXUW9RmAKOEg== X-Received: by 2002:a5d:514a:0:b0:32d:be44:f6fe with SMTP id u10-20020a5d514a000000b0032dbe44f6femr10769098wrt.0.1698302142893; Wed, 25 Oct 2023 23:35:42 -0700 (PDT) Received: from tor-Prestige-15-A10SC (gw-eduroam0.dar.cam.ac.uk. [131.111.194.10]) by smtp.gmail.com with ESMTPSA id n15-20020adfe78f000000b003197869bcd7sm13578700wrm.13.2023.10.25.23.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 23:35:42 -0700 (PDT) From: Tor Erlend Fjelde To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: Feature request: IDs for everything In-Reply-To: <87o7gst9b4.fsf@localhost> References: <877cnhyuom.fsf@tor-Prestige-15-A10SC.mail-host-address-is-not-set> <87o7gst9b4.fsf@localhost> Date: Thu, 26 Oct 2023 07:35:41 +0100 Message-ID: <87bkclyjpe.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::42b; envelope-from=tor.github@gmail.com; helo=mail-wr1-x42b.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-Migadu-Spam-Score: -9.42 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Queue-Id: 38E04511A3 X-Spam-Score: -9.42 X-TUID: XznSFdZlHavg > Although we have at least one caveat that we need to consider - the > current users of the id: links blindly assume that they always link to > headings. This includes many third-party packages, like org-roam. > > If we simply allow id: links to point to non-headings, it will be a > major breaking change that may affect third-party packages. So, we > need to design the extended ids carefully to avoid breakage. For > example, `org-id-find' and other API function may need to work in two > modes: (1) legacy, only searching for headings; (2) new, searching for > anything. This can, for example, be done via an extra optional argument. This is a very good point, and definitively makes things non-trivial. Nonetheless, I'd be happy to have a go at it if this seems like the way to go! But I'll probably need quite a bit of help in the process as I haven't contributed to Org before. > As an alternative option, we had a proposal that extends id: links to > have a search option: > > [[id::search-string]] > > Then, we may have top-level drawer like > > :PROPERTIES: > :ID: unique-file-id > :END: > > And then refer to anything inside the file as > > [[id:unique-file-id:object-id-inside-the-file]] Indeed; I was actually about to have a go at implementing this because I thought this would be the quickest way of adding support for referencing blocks in something like org-roam. But this does seem like a sub-optimal solution vs. just adding support for more general IDs, and so I thought it would be better to see if that could be done first (hence I'm here). All the best, Tor On Sat, 21/10/2023, Ihor Radchenko wrote: > Tor Erlend Fjelde writes: > >> 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. > > This has been discussed in the past. > > Apart from #+NAME, we also have radio <<>> that can be used a > link anchors (#+NAME or other affiliated keywords are not allowed, for > example, in items). > > We also discussed linking to #+name and <<>> globally, without > specifying the file path. > >> 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? > > Mostly nobody has gotten around. > > Although we have at least one caveat that we need to consider - the > current users of the id: links blindly assume that they always link to > headings. This includes many third-party packages, like org-roam. > > If we simply allow id: links to point to non-headings, it will be a > major breaking change that may affect third-party packages. So, we > need to design the extended ids carefully to avoid breakage. For > example, `org-id-find' and other API function may need to work in two > modes: (1) legacy, only searching for headings; (2) new, searching for > anything. This can, for example, be done via an extra optional argument. > > ----- > > As an alternative option, we had a proposal that extends id: links to > have a search option: > > [[id::search-string]] > > Then, we may have top-level drawer like > > :PROPERTIES: > :ID: unique-file-id > :END: > > And then refer to anything inside the file as > > [[id:unique-file-id:object-id-inside-the-file]] > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at