From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KOfrBAf9al9eWAAA0tVLHw (envelope-from ) for ; Wed, 23 Sep 2020 07:45:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YM7VAAf9al8gYgAAB5/wlQ (envelope-from ) for ; Wed, 23 Sep 2020 07:45:11 +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 814EE9404C6 for ; Wed, 23 Sep 2020 07:45:10 +0000 (UTC) Received: from localhost ([::1]:46854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKzSf-0001q8-1o for larch@yhetil.org; Wed, 23 Sep 2020 03:45:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKzRr-0001pm-0H for emacs-orgmode@gnu.org; Wed, 23 Sep 2020 03:44:19 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:37740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kKzRp-0007hY-3g; Wed, 23 Sep 2020 03:44:18 -0400 Received: by mail-pl1-x632.google.com with SMTP id u4so672157plr.4; Wed, 23 Sep 2020 00:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=kVL1MwQkjQ0/vvMZjdFRo1iDgatFVo9FhHeQ1VIKNPQ=; b=abBCgjF2OH5XPSA350lq2A/fPgeQXipMvRpnljyQa+oQWmdLMOvqW874pNG0HSreZz tUWU2M6W0r5yYRrSpIKL/lp5+Bw1XH7t0C4OkOv1pPYKZqIr4ZnQyTGJLl1UNpoZzYAv IeYSwCcrW0SRzZZQY1I1HsnJWC1eJNo4vlh/gVvbEQ7F7RouvPu9eTop3zXpu9dhdr2R MSGBrSVVD/8n1M8BNXkV5Qfvh1t6BYIN0dogmxQc+q/L9ftTMhcg8nJD1mjdNPtDc7HV vyJ+3v1tIMBrDZ4Iq8xfCEHN9B4KWTX/rriUE4ffG95uzUc0vjl0HEjOzaD87KW0aiSm /EIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=kVL1MwQkjQ0/vvMZjdFRo1iDgatFVo9FhHeQ1VIKNPQ=; b=LAKAHNSCxslLaOg84jlDPvf5okBdpiNt2XMKCOondHxnPNl77ZsyF2AWyTUXxjSyct jES4PlhxjikohuL/VQtijZ4OiHVgWNj1VcH6i3VCFOAtMyygNTT8ye+KNnJjRiRsYpG2 8VYtFFrUF9McVosT5+cHXcYsnqrRPq8990Jo8HEUjZYSSsStQFbz3SVl63s2vCYpMNK0 TK2Do1Lzhj7GNIQsdE2PFQDvBHSR/AqCnyNR1oWSFmPQLQwgT1XjbL5LLoepX9J9MbbC Y/QQGEiozvVd7385qnLMy3i4Krgk5HiQkuYsz8a0ijpvUE7rTbyDE7BVi5PCcjX8unX3 7UJA== X-Gm-Message-State: AOAM533VDNrq0ZcsUNlFDKcLwjssy3/HZ4SHpP6/vStru+bI6tbdewH2 noZn9QLIdUMMD+b69XAaN5ZZcxFhGdgUc75y X-Google-Smtp-Source: ABdhPJyKDrT/MPCSJajWi5cl2G546iEdvV/DamW3HP+c8/0So8zqdYY/QNtyBVeArFbaJVwUFfyH4Q== X-Received: by 2002:a17:90a:4309:: with SMTP id q9mr7388280pjg.226.1600847054852; Wed, 23 Sep 2020 00:44:14 -0700 (PDT) Received: from localhost ([104.151.51.115]) by smtp.gmail.com with ESMTPSA id i1sm17130104pfk.21.2020.09.23.00.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 00:44:13 -0700 (PDT) From: Ihor Radchenko To: Bastien Subject: [PATCH] Re: Any reason not to generate my own custom ID value (NOT CUSTOM_ID)? In-Reply-To: <87pn6darjc.fsf@gnu.org> References: <8e204de9ad9da09812991449c64d7aad@isnotmyreal.name> <7689df3cbba5ea4afec672d80f99c590@isnotmyreal.name> <87pn6ti0kt.fsf@localhost> <11d07d7c64137cc1fb512e9cc546ab08@isnotmyreal.name> <87h7s4iwe0.fsf@localhost> <87pn6darjc.fsf@gnu.org> Date: Wed, 23 Sep 2020 15:43:05 +0800 Message-ID: <875z85lz06.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=yantar92@gmail.com; helo=mail-pl1-x632.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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: TRS-80 , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=abBCgjF2; 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-Spam-Score: -0.21 X-TUID: y3b84AtHadfd --=-=-= Content-Type: text/plain See the attached. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Allow-customised-ID-format-for-ts-org-id-method.patch >From bc492bd2fb87912289c135006b6fbeaca93ba181 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 11 Sep 2020 15:42:53 +0800 Subject: [PATCH] Allow customised ID format for `ts' `org-id-method' * lisp/org-id.el (org-id-new): Use `org-id-ts-format' as ID format for `ts' ID generation method. (org-id-ts-format): New custom variable for `ts' ID format. The default value is the same as old hard-coded ID format string. --- lisp/org-id.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/org-id.el b/lisp/org-id.el index f8af52964..512703269 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -128,6 +128,10 @@ nil Never use an ID to make a link, instead link using a text search for :group 'org-id :type 'string) +(defcustom org-id-ts-format "%Y%m%dT%H%M%S.%6N" + "Default format for IDs generated using `ts' `org-id-method'. +The format should be suitable to pass as an argument to `format-time-string'.") + (defcustom org-id-method 'uuid "The method that should be used to create new IDs. @@ -380,7 +384,7 @@ So a typical ID could look like \"Org:4nd91V40HI\"." (concat "@" (message-make-fqdn)))))) (setq unique (concat etime postfix)))) ((eq org-id-method 'ts) - (let ((ts (format-time-string "%Y%m%dT%H%M%S.%6N")) + (let ((ts (format-time-string org-id-ts-format)) (postfix (if org-id-include-domain (progn (require 'message) -- 2.26.2 --=-=-= Content-Type: text/plain Bastien writes: > Hi Ihor, > > Ihor Radchenko writes: > >>> However, I just (strongly) prefer the shorter "ISO-like" ID for many >>> reasons, as already mentioned (shorter, meaningful, etc.). I just find >>> that style much, much more elegant. >> >> I guess it does not take much to add this functionality. >> >> Patch attached. > > Thanks. Can you update the patch with a correct Changelog entry and a > note to etc/ORG-NEWS announcing the new option? > > See https://orgmode.org/worg/org-contribute.html#commit-messages if it > helps. > > -- > Bastien --=-=-=--