From: Ihor Radchenko <yantar92@posteo.net>
To: Kierin Bell <fernseed@fernseed.me>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] lisp/org-id.el: Add new relative timestamp feature for `ts' `org-id-method'
Date: Thu, 01 Jun 2023 08:50:30 +0000 [thread overview]
Message-ID: <87fs7bbm7d.fsf@localhost> (raw)
In-Reply-To: <87r0qw8dyr.fsf@fernseed.me>
Kierin Bell <fernseed@fernseed.me> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2023-06-01 8:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-16 16:48 [PATCH] lisp/org-id.el: Add new relative timestamp feature for `ts' `org-id-method' fernseed
2023-04-17 11:29 ` Ihor Radchenko
[not found] ` <87v8gac9uy.fsf@localhost>
[not found] ` <87r0qxo8z5.fsf@fernseed.me>
[not found] ` <87a5xkoq6p.fsf@localhost>
2023-05-31 20:04 ` Kierin Bell
2023-06-01 8:50 ` Ihor Radchenko [this message]
2023-07-02 11:00 ` Ihor Radchenko
2023-07-03 14:36 ` Kierin Bell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fs7bbm7d.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=fernseed@fernseed.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.