Jack Kamm <jackk...@gmail.com> writes: >> We likely want (according to 34.10.1 Basic Concepts of Coding Systems): > > I attach a new patch, which takes the approach of converting to > utf-8-dos in `org-icalendar-after-save-hook', instead of converting > newlines in `org-icalendar-fold-string'. > > I think this way is simpler, and should be more robust across locales. > > Note, this means the string returned by `org-export-as' won't contain > CRLF. Instead, the newlines are converted during post-process.
Looks reasonable, but I have one comment on the code. > +(add-hook 'org-icalendar-after-save-hook #'org-icalendar--convert-eol -90) We should not use user-defined hooks for things that must be executed. Imagine that a user customizes the hook after loading ox-icalendar and removes the call to `org-icalendar--convert-eol'? Instead, we should better explicitly call the necessary functions. I was told this by Emacs devs. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>