unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: Patch: Follow convention for reading with the minibuffer.
Date: Fri, 9 Sep 2005 09:05:47 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICAEHBCMAA.drew.adams@oracle.com> (raw)
In-Reply-To: <E1EDiLA-0006sR-7k@fencepost.gnu.org>

        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?

  reply	other threads:[~2005-09-09 16:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-06 18:01 Patch: Follow convention for reading with the minibuffer Emilio Lopes
2005-09-06 20:01 ` Stefan Monnier
2005-09-08  2:42   ` Richard M. Stallman
2005-09-08  6:54     ` Juri Linkov
2005-09-09 12:50       ` Richard M. Stallman
2005-09-09 16:05         ` Drew Adams [this message]
2005-09-09 17:13           ` Thien-Thi Nguyen
2005-09-09 18:20           ` Stefan Monnier
2005-09-11 13:52 ` Emilio Lopes
2005-09-24 13:52   ` Romain Francoise
2005-09-24 22:09     ` Thien-Thi Nguyen
2005-09-25 12:11       ` Juanma Barranquero
2005-09-29 20:57       ` Juri Linkov
2005-09-30 19:52         ` Stefan Monnier
2005-10-02 20:23           ` Juri Linkov
2005-09-29 20:59     ` Juri Linkov
2005-09-30  5:55       ` Romain Francoise
2005-09-30 17:34       ` Richard M. Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=DNEMKBNJBGPAOPIJOOICAEHBCMAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).