You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked existing issues and there are no existing ones with the same request.
Feature description
Emacs' Org had the ability to use fairly intelligent syntax for the org-read-date function.
You could use a fairly large amount of natural language date inputs and it would handle many of them with ease:
Assuming today is 9/8/2024:
next tuesday -> 9/10/2024
next sunday -> 9/14/2024
last tuesday -> 9/3/2024
+4d -> 9/12/2024
-4d -> 9/4/2024
and so on, including syntax with time/date ranges, translating am/pm, combinations of relative syntax (tuesday+3d) and other things.
In Neorg this kind of syntax would be incredibly useful for the calendar module's "custom input" which, to my understanding, is processed by tempus and handles some formats but is not nearly as complex as Org's implementation.
Even just having a simple version of this would be quite useful (I fully realize how complex this functionality is in org) for speeding up the time it takes to select dates using the calendar.
Help
Yes, but I don't know how to start. I would need guidance
Implementation help
I'd be happy to start working on this functionality with a few caveats:
This is a massive feature to implement (at least it appears that way looking at the org implementation) so I would likely prefer to start with a very simple version of it (perhaps only handling the generalized example cases above for starters). On top of this, there many different formats (and languages) that would have to be added to make this feature fully inclusive, so I would prefer to focus on ISO 8601 and English to start.
Also, before I'd begin, I want to better understand a little about the current state of the tempus core module. My understanding is that this would be a great addition specifically to the tempus core module, but it is best to avoid modifying the core modules at all. Because of this, I would love a little more insight on where it would be best to implement this feature.
In terms of getting the calendar to use this instead of (or in addition to) the current parse_date function, it seems like this would be as simple as a function change but I also want to make sure I fully understand the reasoning behind the "custom input" as well, prior to changing it.
It's also worth noting that org-mode uses regex extensively for this feature, and my understanding is that Lua does not have a native regex library, and, although Vim does, it has been a decision choice to avoid Vimscript whenever possible (so please let me know if this is a situation where Vimscript would be acceptable, or if it would be preferred to have a more simple implementation in pure Lua).
The text was updated successfully, but these errors were encountered:
Issues
Feature description
Emacs' Org had the ability to use fairly intelligent syntax for the
org-read-date
function.You could use a fairly large amount of natural language date inputs and it would handle many of them with ease:
Assuming today is 9/8/2024:
next tuesday -> 9/10/2024
next sunday -> 9/14/2024
last tuesday -> 9/3/2024
+4d -> 9/12/2024
-4d -> 9/4/2024
and so on, including syntax with time/date ranges, translating am/pm, combinations of relative syntax (tuesday+3d) and other things.
In Neorg this kind of syntax would be incredibly useful for the calendar module's "custom input" which, to my understanding, is processed by tempus and handles some formats but is not nearly as complex as Org's implementation.
Even just having a simple version of this would be quite useful (I fully realize how complex this functionality is in org) for speeding up the time it takes to select dates using the calendar.
Help
Yes, but I don't know how to start. I would need guidance
Implementation help
I'd be happy to start working on this functionality with a few caveats:
This is a massive feature to implement (at least it appears that way looking at the org implementation) so I would likely prefer to start with a very simple version of it (perhaps only handling the generalized example cases above for starters). On top of this, there many different formats (and languages) that would have to be added to make this feature fully inclusive, so I would prefer to focus on ISO 8601 and English to start.
Also, before I'd begin, I want to better understand a little about the current state of the tempus core module. My understanding is that this would be a great addition specifically to the tempus core module, but it is best to avoid modifying the core modules at all. Because of this, I would love a little more insight on where it would be best to implement this feature.
In terms of getting the calendar to use this instead of (or in addition to) the current
parse_date
function, it seems like this would be as simple as a function change but I also want to make sure I fully understand the reasoning behind the "custom input" as well, prior to changing it.It's also worth noting that org-mode uses regex extensively for this feature, and my understanding is that Lua does not have a native regex library, and, although Vim does, it has been a decision choice to avoid Vimscript whenever possible (so please let me know if this is a situation where Vimscript would be acceptable, or if it would be preferred to have a more simple implementation in pure Lua).
The text was updated successfully, but these errors were encountered: