Is $\lim_{x\to0} f(x)=\lim_{g(x)\to0} f(g(x))$? UPD1: By $g(x)$ I mean not any expression, but some non constant expression ($\lim_{x-1\to0} f(x-1)$, $\lim_{x^3\to0} f(x^3)$, etc.).
UPD2: $g(x)$ should have the property that $\exists a\ \lim_{x\to a} g(x)=0$.
I'm currently reading Spivak's Calculus, and the book states that $x$ is irrelevant in the notation $\lim_{x\to a} f(x)=l$, the only significant things being $f$, $a$ and $l$. So I draw a conclusion that $\lim_{x\to0} f(x)=\lim_{g(x)\to0} f(g(x))$ (provided that $\lim_{x\to0} f(x)$ exists).
To prove it formally, I suppose that the first limit exists, $\lim_{x\to0} f(x)=l$,
$$\forall\epsilon>0,\ \exists\delta,\ \forall x,\ 0<|x|<\delta\implies |f(x)-l|<\epsilon.$$
Which also means (because of the "given" implication above):
$$\forall\epsilon>0,\ \exists\delta,\ \forall x,\ 0<|g(x)|<\delta\implies |f(g(x))-l|<\epsilon$$ (provided that $|g(x)|$ is defined on $(0,\delta)$).
Is that correct? If it is, then the limit definition could also be stated as:
$\lim_{x\to a} f(x) = l \Leftrightarrow \forall \epsilon>0 \ \exists\delta\ 0<|g(x)-a|<\delta \implies |f(g(x))-l| < \epsilon)$, with $g(x)$ being some expression involving $x$, defined on $(0,\delta)$ ?
 A: Consider $g(x) = x^2$ and $f(x) = \operatorname{sgn}(x)$. The limit
$$\lim_{x\to 0} f(x)$$
does not exist but 
$$\lim_{x\to 0} f(g(x)) = 1$$
This will be true for any jump discontinuity, just construct a funation that approaches the jump from only one side.
A: The correct term is dummy and $x$ is a dummy variable in the notation $$\lim_{x\to a} f(x)=l$$ or in $$I=\int_{a} ^{b} f(x) \, dx$$ This is because the definition of limit deals with the function $f$, the point $a$ under consideration and the proposed limit $l$.
You can change the variable $x$ which also occurs in definition of limit to some other symbol say $t$ and the definition remains valid for $\lim_{x\to a} f(x) =l$. Instead if you change the symbol $l$ in definition to $m$ the definition is not valid for $\lim_{x\to a} f(x) =l$ but instead it now works for $\lim_{x\to a} f(x) =m$. This way the usage of variable $x$ in the definition is very different from that of $f, a, l$.
Consider the following analogous example. Let $$A=\{x\mid x \text{ is a prime number} \} $$ then we can also write $$A=\{p\mid p\text{ is a prime number}\} $$ Here both $x, p$ are dummy variables but $A$ is not.
In general you can't replace a dummy variable with something which is not a dummy variable.

The result which you are trying to write is more properly known as rule of substitution :

Let $$\lim_{x\to a} g(x) =b, \lim_{x\to b} f(x) =l$$ and $g(x) \neq b$ as $x\to a$ then $$\lim_{x\to a} f(g(x)) =l=\lim_{x\to b} f(x) $$

Your case is $a= b=0$. Using this rule you can conclude $$\lim_{x\to 0}\frac{\log(1+x)}{x}=1\implies\lim_{x\to 0}\frac{\log(1+\sin x)} {\sin x} =1$$ And you can also note that instead of $\sin x$ you can have any function which tends to $0$ (but does not equal $0$) with $x$ (eg $\cos x - 1$).
If some instructor / examiner is hell bent on showing all steps in detail this is how one would evaluate the limit of $\lim_{x\to 0}\dfrac{\log(1+\sin x)} {\sin x} $.
Let us put $t=\sin x$ so that $t\to 0$ as $x\to 0$ and the desired limit is reduced to $$\lim_{t\to 0}\frac{\log (1+t)}{t}$$ which is a standard limit in textbook with value $1$. The substitution $t=\sin x$ is justified because $\sin x\neq 0$ as $x\to 0$.
If there is no need for such details you can directly write $$\lim_{x\to 0}\frac{\log(1+\sin x)} {\sin x} =1$$ You may also observe that we don't use the notation $$\lim_{\sin x \to 0}\frac{\log(1+\sin x)} {\sin x} =1$$ like you are trying to do. 
A: It is quite an unclear notation, I’d say, but I think the meaning of it is like “if the argument of $f$ goes to zero, it doesn’t matter what it exactly is”. Which is true, provided $f$ is continuous in zero, otherwise there would be obvious counterexamples. However, as I said, the notation here doesn’t look precise
A: I think like in tommy1996q 's answer, Assuming that $\lim_{x\to a} f(x)=l$. If you restrict g(x) to the set of functions such that there exists a v such that that $\lim_{x\to v} g(x)=a$, then $\lim_{x\to v} f(g(x)) = \lim_{g(x)\to a} f(g(x)) = \lim_{u\to a} f(u) = l$ is true, and you can prove this one with epsilon-delta definitions. I think.
A: Take the functions $f,g : \mathbb{R}\to\mathbb{R}$ such that $f(x)=1$ for all $x$,
and $g(x) = x$ for $x\in\mathbb{R}\setminus\{1\}$ while $g(1)=0$.
Then,
$$
    \lim\limits_{x\to\left(\lim\limits_{x\to 0}f(x) \right)} g(x)
\hspace{4mm}=\hspace{4mm}
    \lim\limits_{x\to1} g(x)
\hspace{4mm}=\hspace{4mm}
    1
\hspace{4mm}\neq\hspace{4mm}
    0
\hspace{4mm}=\hspace{4mm}
    \lim\limits_{x\to0} (g \circ f)(x).
$$
However, the result is true is either $g$ is continuous at $\lim_{x \to a} f(x)$, or $f(x) \neq \lim_{x \to a} f(x)$ in a neighborhood of $a$ excluding the point $a$ itself, where $a,f,g$ are as described in the PDF which is linked to below.
I prove what you are asking about in a "book" that I'm in the process of writing. I'm way to tired (new yers) to convert all my LaTeX macros to Math Jacks right now. So, please just hit this link https://drive.google.com/file/d/133v6mAB2eL9csqk0Zn0cUgOnRzmbG4Fg/view?usp=sharing to a google file of that page of the PDF. I'll probably need to send you permission to share it or something.
Edit: Here's what I think is missing from your approach: Given that $g$ is an otherwise arbitrary expression, how do we know that $0<|g(x)|<\delta$ in a neighborhood of zero? 
Edit: In that PDF, $(X,d_X)$ and $(Y,d_Y)$ are also metric spaces, although this context was lost upon copy-pasting that single proof.
