[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Patch: Follow convention for reading with the minibuffer.
From: |
Drew Adams |
Subject: |
RE: Patch: Follow convention for reading with the minibuffer. |
Date: |
Fri, 9 Sep 2005 09:05:47 -0700 |
I guess the current format of the default buffer prompt was easier
to implement. Finding an appropriate place in the given prompt to
insert the default value is not a trivial task to do in C.
This suggests a simple solution: define a convention whereby the
prompt string for use with `b' and `B' specifies where to insert the
default. The convention could be "use %s", and the insertion would be
done with `format'. This is an incompatible change, in principle, but
I think no real uses will ever break.
If there is no %s in the prompt, it can add the default at the end,
just as it does now.
Does anyone see a problem with this simple solution?
Sounds OK to me to use %s to position the default-value display.
But I think you are also saying that the default value would always be added
to the prompt - either at the %s position or at the end. If so, what if
there is no default value (the DEF arg to completing-read is nil) - would it
add "(default: nil)" or "" to the prompt?
Could there also be a (general) way to inhibit display of the default value?
I sometimes massage the prompt to do slightly different things, and in some
cases I don't want to display the "(default: foobar)".
If this is a one-off for my uses, don't worry about it. Does anyone else see
a use for inhibiting the default-value display in the prompt?
Re: Patch: Follow convention for reading with the minibuffer., Emilio Lopes, 2005/09/11
Re: Patch: Follow convention for reading with the minibuffer., Juri Linkov, 2005/09/29
Re: Patch: Follow convention for reading with the minibuffer., Romain Francoise, 2005/09/30