unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Michael Heerdegen <michael_heerdegen@web.de>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Doc of deprecated INITIAL-INPUT arg of completing-read
Date: Tue, 28 Jun 2022 16:40:30 +0000	[thread overview]
Message-ID: <SJ0PR10MB548888522346C0566F459B62F3B89@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87mtdw4v6h.fsf@web.de>

> > All that's needed is to make clear that INIT
> > isn't intended as a _substitute_ for a default
> > value - and vice versa.  That's really the point
> > (IMO).  The use cases of INIT are different from
> > those of DEF.  That's what should be made clear.
> > Then leave it up to coders to use each as they
> > see fit.
> 
> Mostly agreed.  But as I said, I only intend to describe the current
> coding recommendations better, and these don't regard INITIAL-INPUT and
> DEF as equivalent alternatives.
> 
> As a compromise, here is a reworded version:

  Don't use this argument to insert a default--pass
  nil for INITIAL-INPUT and supply the default value DEF except in
  cases like inserting a prefix common to all completions or an
  initial part of a file name.  The user can yank the default value
  into the minibuffer easily using M-n.

Mostly agreed. ;-)

Suggestion:

  Don't use this argument to insert a default value --
  use DEF for that.  You can use INITIAL-INPUT, for
  example, to insert a prefix common to all completion
  candidates.

1. "default value" instead of "default".
2. INIT is independent of DEF.  Don't say not to use it
   except for XYZ.  Instead, just say not to use it as
   a substitute for providing a default value.  That was
   my point.
3. Give the example of inserting a common prefix as just
   that: an example.  Don't suggest it's the only use case.
4. A filename prefix is just a prefix, no?
5. The doc already says that users can yank DEF with `M-n'.
   (Or if it doesn't then that should be said where DEF
   is described, not where INIT is described.
___

(The "prefix" insertion case is only particularly
relevant when `completion-styles' favors prefix completion.
With other styles the common text you insert isn't
necessarily a prefix.)



  reply	other threads:[~2022-06-28 16:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 15:22 Doc of deprecated INITIAL-INPUT arg of completing-read Michael Heerdegen
2022-06-27 16:33 ` [External] : " Drew Adams
2022-06-27 17:22   ` Christopher Dimech
2022-06-28 16:19   ` Michael Heerdegen
2022-06-28 16:40     ` Drew Adams [this message]
2022-06-29 13:42       ` Michael Heerdegen
2022-06-29 14:24         ` Drew Adams
2022-06-28 21:46     ` Christopher Dimech
2022-06-29  9:15     ` Arash Esbati
2022-06-29 13:46       ` Michael Heerdegen
2022-06-30  9:10         ` Arash Esbati
2022-07-04 12:25           ` Michael Heerdegen
2022-06-28 19:17   ` [External] : " Jean Louis
2022-06-28 19:15 ` Jean Louis
2022-06-28 21:10   ` Stefan Monnier
2022-06-28 22:00     ` Jean Louis
2022-06-29  2:58       ` Stefan Monnier
2022-06-30  3:08     ` Richard Stallman
2022-06-30 14:28       ` Stefan Monnier
2024-02-13 14:43     ` Tim Landscheidt
2024-02-13 14:59       ` Stefan Monnier
2024-02-13 17:07         ` Tim Landscheidt
2024-02-13 20:09           ` Stefan Monnier
2024-02-15  8:21             ` Tim Landscheidt
2024-02-15 16:09               ` [External] : " Drew Adams
2024-02-15 18:39               ` Stefan Monnier
2024-02-17 17:12                 ` Tim Landscheidt
2024-02-17 17:41                   ` Stefan Monnier
2022-06-30  3:08   ` Richard Stallman
2022-07-01  5:54     ` Jean Louis

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=SJ0PR10MB548888522346C0566F459B62F3B89@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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).