In other words, it depends upon whether you are thinking of "a" as a variable or as a specific value of a variable. If your function has been written as a function of x and then you see f'(a), that is the derivative with respect to the
variable x, evaluated at x= a.
Of course, if you think of a as being the variable, and differentiate f(a) with respect to a, you should get exactly the same thing as if you differentiated f(x) with respect to x, then set x= a.
For example, if the function is
= x^3- sin(x))
then
= 3x^2- cos(x))
and, setting x= a,
= 3a^2- cos(a))
. On the other hand, if I replace the variable x with the variable a, I would have
= a^3- sin(a))
and the derivative with respect to a is
= 3a^2- cos(a))
, exactly as before.
Of course, that has to be a letter or something that we
can think of as a variable. If we have
= x^3- sin(x))
as before and are asked to find
)
, we would set
= 3x^2- cos(x))
and then set

:
= 3\pi^2+ 1)
.
It would be a terrible
mistake to first set x equal to the
constant 
and then argue "
= \pi^3- sin(\pi)= \pi^3)
is a constant so its derivative is 0". We differentiate with respect to a
variable, not a constant.