orgmode icon indicating copy to clipboard operation
orgmode copied to clipboard

Insert time of day, repeating with calendar choice

Open iexos opened this issue 2 years ago • 6 comments

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):

  • a new mapping (e.g. i) will open a new text field
  • you can type time and/or repeating into the text field
  • on <cr> this string will be validated and added to the calender screen
    • if it is not correct, an error will be displayed and the text field stays open
  • when choosing the date via <cr>, the time/repeat will be added to the date object

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

iexos avatar Apr 13 '22 13:04 iexos

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?

TravonteD avatar Apr 13 '22 22:04 TravonteD

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).

iexos avatar Apr 14 '22 08:04 iexos

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.

kristijanhusak avatar Apr 17 '22 17:04 kristijanhusak

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.

iexos avatar Apr 18 '22 11:04 iexos

@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

jgollenz avatar Apr 20 '22 15:04 jgollenz

@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)

iexos avatar Apr 20 '22 22:04 iexos