Replies: 3 comments 8 replies
-
Hey, sorry for a delay. Crazy month, almost no time for open source.
In short, I don't.
Because I don't ask these questions. I mean, I don't care when was something created. But still, give me some time to read it and answer. I might have some ideas. No ETA, but bear with me :) P.S. I remember about another conversation we have, I will update there as well. |
Beta Was this translation helpful? Give feedback.
-
There is no solution out of box, but as you said, there are several directions to solution. FormatI would really advice you to stick to some standard time format. For example, RFC 822 (or later) or ISO 8601. Why? Because various utilities for time (built-in and org) do not support other formats while decoding time. In general, it's not a big deal, but having one format is nice. More over, ELISP> (org-parse-time-string "[2022-09-25 Sun]")
(0 0 0 25 9 2022 nil nil nil)
ELISP> (org-parse-time-string "<2022-09-25 Sun>")
(0 0 0 25 9 2022 nil nil nil)
ELISP> (org-parse-time-string "2022-09-25")
(0 0 0 25 9 2022 nil nil nil) You get some nice goodies out of box. For example, you can compare dates. In case you need it. ELISP> (org-time< "2022-09-25" "2022-09-26")
t
ELISP> (org-time< "[2022-09-25]" "<2022-09-26>")
t There are more functions like this. Extra note, since you've mentioned Creation dateAs you said, there are several places you can put this data. File-level
Org Roam stores in the DB properties, metadata is stored by Vulpea. Insertion of creation date can be easily automated by using org roam templates. Heading levelAt the moment you have only one option if you want the value to be persisted in DB - properties drawer. Metadata is not yet supported (will add it some day, see #75). Not sure how to automate unless you use capture mechanism. Vulpea doesn't support creation of heading-level nodes, and AFAIK Org Roam doesn't support it yet (?). Completion dateFile-levelBasically, it's the same as with creation date. You have four options, and only two are persisted in the db. Though semantically I don't understand what it means to complete a file-level node. In Org mode TODO states exist only on a heading level. Automation really depends on your definition of done and how you mark it. Theoretically, it can be hooked, but without knowing specifics, I have little to say. Heading levelSame as with creation date. But since TODO are defined on heading level, Org Mode comes with some helpers to log the progress. It nicely supports repeated tasks. The latter is no synced in the database, but I guess it can be done. It's on my roadmap to make it easy to extend Org Roam database with extra data. Absolutely no ETA though. Some random comments to your message
Just a small example showing you can't fit such a big number: ELISP> (defvar db (emacsql-sqlite "~/test.db"))
db
ELISP> (emacsql db [:create-table people ([name id salary])])
nil
ELISP> (emacsql db [:insert :into people :values (["Jeff" 1000 60000] ["Susan" 1001 20220709190343324727])])
nil
ELISP> (emacsql db [:select * :from people :where (> salary 62000)])
(("Susan" 1001 2.0220709190343324e+19))
ELISP> (emacsql db [:select * :from people :where (> salary 20220709190343324726)])
nil In the last example I would expect Susan to be part of response. Besides, equality is ill-defined.
Honestly, I am completely lost in these few paragraphs. I don't understand what you are trying to achieve.
As I already stated, I don't :) I don't care at all when something was created or completed. When I used to care about completion date, I used built-in solutions for progress logging. I really advice you to look into it before building something overly complex 😸 Conclusion?It really depends on what you want to achieve. If you want to solve a generic problem of tracking creation date and progress date, you need to take into consideration many derivations users can make with stock Org Mode. On the other hand, if you want to solve your specific use-case, you can always come up with some ad-hoc solution :) Not sure if my comment is helpful at all, as I basically reiterated what you said with some extra input. My advise would be - try built-in solutions. Org agenda is a powerful tool. |
Beta Was this translation helpful? Give feedback.
-
Hi! Table of Contents of my answer x)Introduction:The purpose of this text is to help answer the following question: The sub-questions will be the following:
DevelopmentThe conceptual mandatory rulesThese rules are conceptual. But, in practice, everyone is free to do as he wishes for the implementation of these conceptual rules. Examples of practical/technical implementation will be given to each. In addition, a quick demonstration of the rules will be given.
Possible solutionsNormalize datesTo solve the "Normalize dates" problem, several formats are available.
One can thus choose the format used by org-mode which is very close to the ISO 8601 standard (example standard Iso8601 "2022-09-25", "2019-09-07T20:15:00". Example org-mode : 2019-09-07 20:15). This type of date can be found thanks to a regular expression, which can be practical. The precision of the date will be chosen according to the case. For example, it is useless to put the seconds for an annual appointment. Where to put the dates and make them queryableThis solution will be discussed in several points.
In the end, it doesn't matter where, it's a matter of preference. Reminder: dates at task level are managed by org-agenda. So, no need to worry about it.
How to manage "recurring" notesWith a combination of org-agenda and vulpea. Sometimes, for example when maintaining a diary, the names of the notes are very close, even the same: only the date differs for the user. It will therefore be necessary to make sure that the date appears to distinguish the different notes for the user. For example, we could consider these examples: So we have to distinguish two cases.
No perfect answer :(
Solving the "path of knowledgeAs said before, we need to distinguish several things:
The first and the last case are perfectly managed (thanks to org-mode and org-roam), but how to do for the second case? How do we make the link between tasks and notes?
Case 1 is managed, you just have to call the "org-schedule" command on a task. For case 2, on the other hand, this is more complicated. To solve this path, we must succeed in transforming a task into a note, sometimes by passing through an event. For more details, see at the end how to integrate a "workflow", a way of doing things. As far as the structure of the note is concerned, it is necessary to distinguish the event itself from the notes taken on it. Indeed, to keep track of which event it was, you would have to keep a node each time "Event X" and "Y on event X" or Y would be something that would bring precision. This allows you to do things several times. ConclusionManaging dates is not easy, especially when you have to reconcile task and knowledge. Possible workflow for the "knowledge pathA possible workflow would be with X = a task/something (this works with a book for example)
This allows us to have a workflow in several steps:
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I would like to know how to manage dates with vulpea, let me explain.
The purpose of this question is to know how you manage the dates in your notes @d12frosted , but everyone can have a good answer !
Manage dates means several things:
Just a little precision before the beginning, I manage the creation date of my notes not thanks to a metadata, but thanks to the identifier, which corresponds to this
"%Y%m%d%H%M%S%6N"
Which could be translated as
20220709190343324727
and which allows me, not only to have a stable identifier, but also the creation date of the note.
Let's say I want to be able to store the following information:
Another problem: the format of the date. There are several formats
For me, there are several solutions:
Finally, I'd like to add that the properties drawer is made to have "hidden" things and doesn't support links, while metadata are made to be seen and to host links. I assume that I don't want to see the creation date, but I want to see the date when the content of the note was made (more details on what it is after).
To solve A, as I mentioned above, we could apply my method, and thus solution Z.
We could also apply solution Y, which seems to be intuitive: a metadata with the name "DateOfCreation" which would have the value of a date formated like C, D, or F. The choice also seems, to me, intuitive: F. Why? Because it allows to render as a number, and thus to make queries "all notes whose date is greater than "20220709190343324727".
But could there be another usable format? Does the org mode timestamp format allow to do queries? Is it usable with vulpea ?
Now, for the problem B. The application to problem A can be done, and seems practical. The only problem is how to manage the intervals. For example, when reading a book, it can take several days, and therefore have a value such as
20220709190343324727-20220809190343324727 (here, a reading lasting one month).
Still in problem B, I consider, for example something that is repeated, e.g. a journal, a course over several hours, etc.
This would result in the title:
Journal of the day x (with a particular format).
(In this case, there is a need to differentiate the Journal x notes. So you need either 1 or a date, 2 or a number. But the number must be a variable that increments, so it must be kept in a place, it is complicated etc.. Do you use another system to differentiate these notes?)
So, in this example, if we use the date to differentiate, the date is going to be in the title, AND elsewhere according to previously (in a metadata). There is redundancy in that, because I can't have a request like this "give me all the title that have a date after the date x). Here, the answer is X and Y.
So, one more question :) How do you manage the dates of repeating events like this.
A solution for the interval can be to separate the intervals in two metadata :
We then apply the same reasoning as for problem A. The metadata "DateOfCreation" would be named "StartValue" to simplify things when there is no end date
I'm only giving some hints, but I would like to know your method and your point of view on this.
Thanks in advance for reading ^^
Beta Was this translation helpful? Give feedback.
All reactions