Variable: icalendar-pre-parsing-hook
icalendar-pre-parsing-hook is a customizable variable defined in
icalendar-parser.el.gz.
Value
nil
Documentation
Hook run by icalendar-parse before parsing iCalendar data.
If you routinely receive iCalendar data in an incorrect format, you can
add functions to this hook which clean up that data before parsing is
attempted. The functions in this hook will be run after the iCalendar
data has been "unfolded" but before parsing begins. (If you need to
clean up data before unfolding happens, see
icalendar-pre-unfolding-hook.)
Each function should accept zero arguments and should perform its operation on the entire current buffer.
This variable was added, or its default value changed, in Emacs 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/icalendar-parser.el.gz
;;; Pre-parsing cleanup
;;
;; The following functions are based on observed syntax errors in
;; real-world data and can help clean up such data before parsing.
;; More functions can be added here based on user feedback.
(defcustom ical:pre-parsing-hook nil
"Hook run by `icalendar-parse' before parsing iCalendar data.
If you routinely receive iCalendar data in an incorrect format, you can
add functions to this hook which clean up that data before parsing is
attempted. The functions in this hook will be run after the iCalendar
data has been \"unfolded\" but before parsing begins. (If you need to
clean up data before unfolding happens, see
`icalendar-pre-unfolding-hook'.)
Each function should accept zero arguments and should perform its
operation on the entire current buffer."
:version "31.1"
:type '(hook)
:options '(ical:fix-blank-lines
ical:fix-hyphenated-dates
ical:fix-missing-mailtos))