Use the printf -v convention to give output variable as argument
to escape () function so no subshell needs to be executed for
escaping input. The '-v' option to escape () is just syntactic
sugar for better understanding.
Also, backslash is now escaped with another backslash for emacs. This
ie especially important at the end of string.
`echo` is no longer used to write escaped output -- it might interpret
the escapes itself.
Notmuch uses long options exclusively all around. The short options in
notmuch-emacs-mua are intentionally just a compatible subset of
mutt(1). Keep it this way, if only to make documenting the fact easy!
The Notmuch style --client long option remains, of course.