emacs-devel
[Top][All Lists]
Advanced

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

Re: completing-read enhancement


From: Paul Landes
Subject: Re: completing-read enhancement
Date: Wed, 12 Aug 2009 01:57:39 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

> > This isn't a patch to completing-read, instead it is a new function.
> > I think of it more as a facade with bells and whistles.  In summary,
> > it makes prompting for user input easy requiring terse, in the context
> > of a function invocation, code for this purpose.
> 
> Could you describe how it relates to completing-read (i.e. how it
> differs, mostly; both from the point of view of the user, and from the
> point of view of the coder)?

The read-completing-choice uses completing-read and doesn't intend to supplant
it.  To the developer, it offers a quicker way of prompting the user purely
based on a list of choices (either symbols or strings) and .

It adds the following features:
 - accepts either symbols or string as input and converts between type
   automatically

 - returns user input as either a symbol or string

 - when the size of the list is one, the initial input is the car of the list

 - renders default formatting (i.e. "File" -> "File (default subst.el): ")

 - optionally allows for empty data

To the user, it provides a quicker (for most cases) way to select from the list
of choices (i.e. by populating the initial data from the choices passed or by
adding a default).

--
Paul Landes







reply via email to

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