Using
(interactive "sPROMPT: ")
one can set a prompt for, e.g., a string function.
Question: Is it possible to also supplement a default argument to the function? Say
(interactive "sPROMPT: default")
so that the users can supply "default" as the default argument to the function, unless they change it manually?
read-string
, and note that the initial input ("toto" in the example above) is not necessarily the same thing as the default value (the optional fourth argument), meaning the value that is returned if the user deletes the initial input and returns the empty string. – Phil Hudson Mar 16 '21 at 21:00