Use if and get-buffer to write a function that prints a message telling you whether a buffer exists.
Here is the program I wrote:
(defun buf-exists (bufpos)
"tests to see if the buffer named bufpos exists"
(if (get-buffer bufpos))
(message "%s def exists" bufpos)
(message "sorry there is no buffer named %s" bufpos)))
It fails for some reason to bind the named buffer passed as an argument to the variable bufpos. Any Advice?? THanks!