Consider the following (xpatch-fu from https://tex.stackexchange.com/a/68741/17423)
\documentclass{article}
\usepackage[marginpar]{todo}
\usepackage{xpatch}
\makeatletter
\xpretocmd{\todo}{\@bsphack}{}{}
\xapptocmd{\todo}{\@esphack}{}{}
\makeatother
\begin{document}
Some text %
\todo{this text shouldn't be displayed}
more text
\end{document}
gives (without my attempt to fix)

As you can see, the interword spacing between text and more is doubled.
Looking at the use of the macro, this makes perfect sense as to why,
but this is certainly undesirable behavior (at least for the marginpar option).
My fix is entirely ineffective and actually inserts everything after \todo into the input stream. :(
How can I get the behavior I need?
with above xpatch-fu


Some textand the one after the\todocommand. Why not removing one of those two spaces? – jub0bs Mar 03 '14 at 17:18