I want to generate very simple filenames from complex strings during a org-capture. For instance the string
"Une idée nouvelle pour calculer $\\int_0^{\\infty} e^{-t^2} \\dd t$"
Should be reduced to
une_idee_nouvelle_pour_calculer_int_0_infty_e_-t_2_dd_t.org
or something equivalent.
Should I use replace-regexp-in-string
with appropriate regexp (that I have trouble building) or is there a more canonical way ?
Non comprehensive specification list :
- remove spaces (replace with underscore)
- only alphanumeric ascii characters (no symbols, no other unicode...), the rest is deleted
- (if possible) intelligent replacement "Å" -> "A"
- (if possible but seems hard) trim obvious gibberish from parts with way too many characters removed.