help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How to prompt for string?


From: Drew Adams
Subject: RE: How to prompt for string?
Date: Fri, 17 Feb 2006 23:24:55 -0800

Others have pointed you to the doc and various functions that prompt for and
read a string. To find lots of functions that read input (including
strings), use `M-x apropos string'.

Think too about the nature of the string - is it arbitrary? There are
functions to read strings that represent various objects, such as numbers.

An important consideration is whether the string be is restricted to a given
candidate set of strings. Or, can it be arbitrary yet there exists a useful
set of candidate "suggestions"?

If there is some notion of a set of candidate strings, even if they are only
suggestions and other strings are also accepted, then consider using
function `completing-read', which prompts and reads a string allowing users
to complete partial input against matching candidates (using TAB).

For strings that represent file and directory names, a similar,
read-a-string-with-completion function is `read-file-name'.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]