From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uP6LKw1beGQdxwAASxT56A (envelope-from ) for ; Thu, 01 Jun 2023 10:47:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iMOrKw1beGStbgEA9RJhRA (envelope-from ) for ; Thu, 01 Jun 2023 10:47:09 +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 55F51A03A for ; Thu, 1 Jun 2023 10:47:09 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4dwj-00017O-NN; Thu, 01 Jun 2023 04:46: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 1q4dwe-00016w-7G for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 04:46:08 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4dwZ-0005lF-Js for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 04:46:07 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DCDC7240028 for ; Thu, 1 Jun 2023 10:46:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1685609160; bh=1DGtX8dEhL2ZeW/87SXZaq5s2dLKcwUSg4XuAFInkfo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=CYg7r40ws5HycTUs+qUDLGyAo4raYhv5A3ROddXAd1bXooZBlp6nbSx/pK5DiRchI +dkFK8AMu5OcMPS3dkOd0wbtnCcu+VnEUWkuxeV6lXji/+Yi/2ryfMx9g8ccjih+yF VHRRC+SdcYFLcdEaWQY1QG62TlVj99vpZvnBaNrnXHl4g9CNAwlTx7fDfQgB8KZxuw GYyH6Y5DEor7YX+LSf8MT33/aXXiCmu7Nh2rTwom1+BH6NlmwEpj63F9nd5wjGcNF+ pLOC5Lz/nPkgW5HBzeEHP5fmzZ8q9KQm22p/OWI+kwco7wKvwDrMN2ISX+BAKyDjN6 fblm0zqzX4xRg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QX08m3MGPz6trm; Thu, 1 Jun 2023 10:46:00 +0200 (CEST) From: Ihor Radchenko To: Kierin Bell Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/org-id.el: Add new relative timestamp feature for `ts' `org-id-method' In-Reply-To: <87r0qw8dyr.fsf@fernseed.me> References: <20230416164841.18665-1-fernseed@fernseed.me> <87o7nmlpbp.fsf@localhost> <87v8gac9uy.fsf@localhost> <87r0qxo8z5.fsf@fernseed.me> <87a5xkoq6p.fsf@localhost> <87r0qw8dyr.fsf@fernseed.me> Date: Thu, 01 Jun 2023 08:50:30 +0000 Message-ID: <87fs7bbm7d.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685609229; 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=nF4RIFwXEUjlKh1NJdByWKhHUns/DlunLEzO5CN3zRo=; b=j8Z6DV2nd2s/23pEVHgB9TSvbQlVj/Nvxv+QiQvqLVfA3BjCc4Nqd4FqlBIN1mF+hiDcK0 6stQJ0q5jCFCOT1UbV2FX4/iw8JwAJAjhPb6sAvFmwUP7O0FO1PmlmUwIDhqUsSnLmDuzO d+Mj3sDHVsvYNGOxlWOwW01hqzIcxK88pbifQF6q7Sm4dXSiHqG7RXkKVFc3qvLfcVQCWH Ms7+LBSt5N7hFUp91jLtD/ZKUnPGEHHrrG1swR2ltH+pHM85c8M3s6glypsGvzoXa8YBce /lqQfn8j1q0UnCsJvL3n+C3LX+tkPjO8jvyHZk5+KGwbfA2ZaBHLk9CO5tl/yg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CYg7r40w; dmarc=pass (policy=none) header.from=posteo.net; 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=1685609229; a=rsa-sha256; cv=none; b=Dy5WcZEJIpXWelKaltR5mEjrwazKumT+BJ56sjYeejscPPllHCg3iHwxAj+YUb9Jcc5kaM WuoIs10GDDx3Jy1I1jaXHjAE4axJ/4pHQZ7UdrHxAQfmBQjqOBAUXYkYDHTp57Pvscet0u Uxe9c5HZQWRt8jkWXyM0rFl0hqSQ22kweZM/Dx6YJeeO90cvGGoKiXsUDFcPdHqlrjolVM eh5/n0QvOje7Yt/9Qy32CAzYOCmw83wYWf8bpG3ZGkEUcW/rbwGdOftAwF8j5n9OnepjcV 1iGBWrKdBvvTbtPtXD1wQ7XNqY7XD7s6FQ+Xr0E+mmQycLm2rS3gNlMORyDhgg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CYg7r40w; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Queue-Id: 55F51A03A X-Spam-Score: -6.12 X-TUID: VDkl9kbTcaF1 Kierin Bell writes: > It might also be a good idea to refactor `org-id-new' so that the > different ID methods are more composable. > > One nice way to do this would be to create a new option that supersedes > (but does not override) `org-id-method' and takes a list of functions > that are tried in order, so that: > > (setopt org-id-method 'ts > org-id-ts-relative t > org-id-ts-relative-function > #'org-id-ts-relative-from-keyword-or-property) > > ... would be equivalent to: > > (setopt org-id-function-list '(org-id-relative-ts-keyword > org-id-relative-ts-property > org-id-ts)) This will be breaking. We can do it slightly differently: 1. Allow `org-id-method' to be a list of methods/functions to try in addition to being a symbol. 2. Add new customization `org-id-methods' that will link method names to functions: '((ts . org-id-ts) (uuid . ...) (uuidgen . ...) (org . ...)). That way, old configurations will continue working. > I do understand that ID methods may be intentionally difficult to > extend, because IDs should be stable and consistent. Just by default. We do not constrain users from using arbitrary IDs, including manually typed. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at