all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Landes <landes@mailc.net>
To: emacs-devel@gnu.org
Subject: Re: completing-read enhancement
Date: Wed, 12 Aug 2009 01:57:39 +0000 (UTC)	[thread overview]
Message-ID: <loom.20090812T015630-600@post.gmane.org> (raw)
In-Reply-To: jwv63cu75ce.fsf-monnier+emacs@gnu.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	other threads:[~2009-08-12  1:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11  3:01 completing-read enhancement Paul Landes
2009-08-11 15:12 ` Stefan Monnier
2009-08-12  1:57   ` Paul Landes [this message]
2009-08-16  5:04     ` Stefan Monnier
2009-08-16 21:16       ` Paul Landes
2009-08-17 14:54         ` Stefan Monnier
2009-08-20  0:24           ` Paul Landes
2009-09-10  5:13             ` Paul Landes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20090812T015630-600@post.gmane.org \
    --to=landes@mailc.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.