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

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

Re: How to handle default value in read-string?


From: Emanuel Berg
Subject: Re: How to handle default value in read-string?
Date: Wed, 05 Aug 2015 22:02:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Marcin Borkowski <mbork@mbork.pl> writes:

> I'd like read-string to somehow indicate the default
> value. A natural idea is to include it in the
> prompt, for example having a prompt like
>
> (format "Foo (%s): " default)
>
> However, Icicles' version of read-string already does
> exactly that, so for Icicles users this would
> be superfluous.
>
> So here's the question: is there a better way than
> just have a prompt of
>
> (if icicle-mode (don't-include-default)
> (do-include-default))?

You want it to be there for everyone that uses your
thing, not just those using icicle-mode as well.
You shouldn't require it just to get such a small
thing, so either way you must include your own
version. And if you include your own version, you may
as well just use it for everyone and don't bother with
Icicles at all. That way is more consistent as well as
more logical.

The best solution for everyone involved is of course
for vanilla Emacs to have a thing for this and then
everyone that needs it can use it from there.

But since it is so simple why not just put it there
and move on?

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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