First of all, you're quoting Seibel's "all values are references", and asking why pass-by-reference is not working. The simple answer is, yes, values are references, but CL is pass-by-value, not pass-by-reference.
But to answer your next question in the comments: how can one achieve pass-by-reference, here is an approach:
After wondering something similar (pass by reference style in C) today, and checking Rainer's answer to Variable references in lisp, I realised there's another approach.
For the pass by reference question, using special variables is one of the answers. And we can define a local variable as special and pass that to a reference-taking function.
We want to have a function to change the reference value of a parameter.
If you write the function below, that would be incorrect because this function updates the local variable text, not the reference:
(defun display-and-update (text)
(print text)
(setf text (concatenate 'string text ", updated.")))
test:
(let ((my-text "test"))
(display-and-update my-text)
(print my-text))
outputs:
> "test"
> "test"
Instead we should use a different, explicit mechanism to show our purpose (as you do with pointer operator * and address-of / reference operator & in C for example). The way to do this is to use a symbol (in C the closest equivalent would be a variable, instead of a literal, since we can't use pointer and address-of operators on C literals either).
Now, let's redefine the function to use references:
(defun display-and-update (sym-text)
(print (symbol-value sym-text))
(set sym-text (concatenate 'string
(symbol-value sym-text)
", updated.")))
Here, symbol-value function is our "dereferencing" operator, as * is in C. And set is the *_ = operator in C, which sets the symbol's value.
Now, the question of how we can pass a local symbol (I should actually say lexical variable) to this function is solved by special variables, because a lexical variable cannot be used by another lexical scope - here for example the function display-and-udpate's scope. The same call from above is slightly modified to achieve this:
(let ((my-text "test"))
(declare (special my-text))
(display-and-update 'my-text)
(print my-text))
outputs:
> "test"
> "test, updated."
And as you may have noticed, we're calling display-and-update with 'my-text instead of my-text, because my-text would evaluate the value and pass "test", which would fail. ' here is like & operator in C.
Now, apologies for derailing from the original question, but they were related, at least for better understanding.
To have a variable referencing another, again in C, we can write:
int a = 3;
int *b = &a;
*b = 5; // a is 5
To achieve the same in common-lisp:
(defparameter a 3)
(defparameter b 'a)
(set b 5) ;; a is 5
Now, one can again see that set function is actually not the = operator in C, but rather *var = operator, as it first gets the value of the symbol and sets it.
If, for example you create b to equal something else, maybe nil:
(defparameter a 3)
(defparameter b nil)
;; (set b 'a) ;; this won't work, as it's trying to set the symbol nil's value to 'a
;; instead:
(setf b 'a) ;; this is a better match for C's = operator
will achieve the same.