dengste / org-caldav

Caldav sync for Emacs orgmode
GNU General Public License v3.0
712 stars 105 forks source link

Remove Scheduled/Deadline Prefix from Event Summary #277

Closed djs42012 closed 1 year ago

djs42012 commented 1 year ago

Hello,

Thank you for this wonderful package. I am trying to remove the DL: / S: prefixes prepended to the summary of Google Calendar events. I tried editing the following block in org-caldav-convert-event-or-todo--event from:

(when (string-match "^\\(?:\\(DL\\|S\\):\s+\\)?\\(.*\\)$" summary)
   (setq e-type (match-string 1 summary))
   (setq summary (match-string 2 summary)))

to:

(when (string-match "^\\(?:\\(DL\\|S\\):\s+\\)?\\(.*\\)$" summary)
   (setq e-type summary)
   (setq summary summary))

by applying some override advice, but that did not produce any visible result as far as I could see. Is there a way to do this conveniently? And might this functionality be considered for a future enhancement for those who do not require prefixes in their remote calendars?

jackkamm commented 1 year ago

org-caldav relies on upstream ox-icalendar.el for exporting Org to iCalendar, and it is ox-icalendar.el that adds the S/DL prefix to TODOs that are exported as calendar events.

There is not a convenient way to remove that prefix, and we have no plans to implement that.

Note that TODOs exported as proper iCalendar ToDos don't receive such a prefix (i.e. by setting org-icalendar-include-todo and org-caldav-sync-todo). However Google Calendar does not support iCalendar ToDos, so Google Calendar users are limited to syncing the Org entries as events instead of todos.

djs42012 commented 1 year ago

Got it. Thanks for the clarification. Just to be clear, though, these are not TODOs I am exporting to gCal, just regular entries with deadlines. I do have org-icalendar-include-todo and org-caldav-sync-todo set per the readme. Is that still the expected behavior of ox-icalendar.el in this case?

jackkamm commented 1 year ago

Yes I think that is the expected behavior of ox-icalendar.el -- see the variables org-icalendar-use-deadline and org-icalendar-use-scheduled.

djs42012 commented 1 year ago

Thanks so much. I'm going to close this since it seems like something I'll have to hack around ox-icalendar.el for.