Am trying to use
read-string to read a string from the user. With that name I want to create a new buffer.
Have seen that
read-string is sometimes called from within an
interactive expression, but at other times,
read-string is called outside on
interactive expression. How can I understand when to use one versus the other?
(defun workspace (name) "Make a new buffer with unique name." (interactive (read-string "Name: " initial nil nil)) (let ( ($buf (generate-new-buffer name)) ) (switch-to-buffer $buf) )