I would like to ask again the following question:
That question was answered with a solution which was good enough for OP at the time. I would, however like to have an answer to the question as posed originally.
More specifically, I want to have a text following a curved path (for instance using decorations) and then use that text to fit a shape around it. In this example, I would like to draw an ellipse fitting "stuff" and "along path" but I don't know how to refer to "along path" because it has no node name.
\documentclass{standalone}
\usepackage{pgf,tikz}
\usetikzlibrary{decorations.text,fit,shapes}
\begin{document}
\begin{tikzpicture}
\node (A) at (-2,2) {stuff};
\draw[postaction={decorate,decoration={
text along path,
text={along path},
% name = (B), <--- this does not work
raise = 3
}}] (-1,0) to [out= 90, in=90] (1,0);
% \draw[fit=(A)(B), ellipse]{}; <---- I want to be able to do this
\end{tikzpicture}
\end{document}