With the thmtools package, combining \begin{foo}[name=bar,label=x] with the line \newtheorem{foo}{Foo} in the preamble typesets to Foo xxx (bar), where xxx is a number. After the (bar) there is an extra space which is about 6pt. To remove it completely, as I have seen at Extra space before labeled theorem body with thmbox or thmtools+thmbox, it is sufficient to add % after the label=x] part. The point is, if I add any number of \,s after it, they get completely ignored, whereas \hspaces, \quads and \qquads don't. Try typesetting:
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper]{report}
\usepackage[italian]{babel}
\usepackage{thmtools}
\newtheorem{foo}{Foo}
\begin{document}
\begin{foo}[name=bar,label=x]\hspace{5cm}
With the space.
\end{foo}
\begin{foo}[name=bar2,label=x2]
Without the space.
\end{foo}
\begin{foo}[name=bar3,label=x3]\,\,\,\,\,\,\,\,
With 8 \verb"\,"s.
\end{foo}
\end{document}
On my computer, the \,s don't produce any space, whereas the \hspace does. Why does that happen?
Adding % after the label seems not to eliminate the space. Since this has generated a couple of overful \hboxes, I'd like to know how I can remove it.
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper]{report}
\usepackage[italian]{babel}
\usepackage{thmtools}
\newtheorem{foo}{Foo}
\begin{document}
\begin{foo}[name=bar,label=x]%
With the \verb"%".
\end{foo}
\begin{foo}[name=bar2,label=x2]
Without the \verb"%".
\end{foo}
\end{document}

\,is a bit dangerous. On the other hand a string of\,is surely wrong. – egreg Mar 20 '14 at 22:49%there to have an effect. White space never affects the start of a paragraph or list item. – David Carlisle Mar 25 '14 at 13:48(bar)andWithis\labelsepso adding\setlength{\labelsep}{0pt}before\begin{foo}suppresses it. – David Carlisle Mar 25 '14 at 13:57\label{}%, as stated in the link I put in the question, by extension, it should do the same if placed there. Obviously that was wrong thinking :). – MickG Mar 25 '14 at 16:07