-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
denote-file-types: lack of :date-key-regexp and :identifier-key-regexp #467
Comments
The reason they were not added was that we had no use for them yet. However, I agree that we should probably include them all. This will make We want to include the signature in the front matter (see #366). We will need I am curious: What is your use-case for them? |
Retrieval of (let ((foo (pcase some-keyword
('title :title-key-regexp)
;; you know the rest
('identifier :identifier-key-regexp)
(_ nil)))
(file-type (denote-filetype-heuristics file)))
(unless foo
(re-search-forward (plist-get foo file-type) nil t)))
To be honest, I now understand the approach to Edit: sorry for closing and reopening, this was a missed mouse input. |
I just merged the PR of @jeanphilippegg. Thank you @sarcom-sar for the discussion! Closing now. |
Hey, I've began hacking a bit on denote and started wondering why there are no keywords for
:date-key-regexp
and:identifier-key-regexp
indenote-file-types
, but there are for:title-key-regexp
and:keywords-key-regexp
.Is it a "political" decision, because ID can be easily found in filename, while the date would be a huge pain?
As for proposed implementation
:identifier-key-reverse-function
the defun for:title-key-reverse-function
could be easily reused, while the date would need something akin to:Sadly, this implies at least three separate functions, which might be smelly, but since we have
denote-date-foo
, where foo is rfc3339, iso-8601 or org-timestamp, it would still be symetrical.The text was updated successfully, but these errors were encountered: