nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.
https://nvim-orgmode.github.io/
MIT License
3.05k stars 136 forks source link

Insert time of day, repeating with calendar choice #255

Open iexos opened 2 years ago

iexos commented 2 years ago

Does this feature exist in Emacs orgmode core?

N/A

Orgmode link

I am unsure how emacs exactly behaves, I never really got it

Feature value

If I want to insert a date (e.g. a schedule) that has a time of day and/or is repeating, I have to manually go to the date and edit it. It would save me time searching for and moving to the inserted/edited date if I could add time and repeat from the calendar screen.

My suggestion to solve this (just a quick thought, there may be better ideas):

This could look like this:

┌────────────────────────────────────┐
│             April 2022             │
│ Mon  Tue  Wed  Thu  Fri  Sat  Sun  │
│                     01   02   03   │
│ 04   05   06   07   08   09   10   │
│ 11   12   13   14   15   16   17   │
│ 18   19   20   21   22   23   24   │
│ 25   26   27   28   29   30        │
│                                    │
│ [i] - add time/repeat (12:00 .+1w) │
│ [<] - prev month  [>] - next month │
│ [.] - today   [Enter] - select day │
└────────────────────────────────────┘

Additional context

No response

TravonteD commented 2 years ago

If you're still typing the repeat string how is this faster? Are suggesting that the repeat be visually shown via some sort of marker?

iexos commented 2 years ago

It is mostly searching for and moving to the date string. A minimal solution that would work for me could be that the cursor is moved to the end of the date string after choosing the date, such that I could directly enter the time/repeat string there.

You would need to be able to add this somehow in the calendar popup when editing schedules from within agenda views (which seems to be broken right now, at least for me).

kristijanhusak commented 2 years ago

Managing time inside the popup would cause a lot of complications. We could have a simple toggle that would say [i] Include time (Yes/No), and once the date is selected, it would populate a date with a 12:00 time, and cursor would be on the 12.

iexos commented 2 years ago

That would be an improvement to the current situation :)

To clarify: The benefit I see with managing the time/repeat string from within the calendar popup is to contain the action to edit the date string to one command. I would prefer this because I like to change schedules (just as priority and TODO state) from within (custom) agenda views. This would get more important to me, once custom agenda search views are implemented (I currently use emacs for those).

Another idea: if the toggle is enabled, the text field to edit/add time/repeat opens after the calendar popup is closed.

jgollenz commented 2 years ago

@iexos related, but not exactly the same thing. What do you think about a mapping to add a time to an existing timestamp, like Ctrl-[a|x] for [in|de]creasing numbers in Vim? Could also work for repeat strings, where you cycle through the different time-spans (day, week, month, year) and the cursor jumps to the amount of the timespan

iexos commented 2 years ago

@jgollenz i like the idea and in combination with moving the cursor to the date after inserting/editing it, it would resolve my current problem. It would require at least 4 keybindings (1 time + 3 repeat (+,.+,++) ). Still poses the question to me if this could provide an easy way for dealing with time/repeat in custom agenda views, once implemented (#135)