unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: completing-read displays duplicates in the *Completions* buffer
Date: Tue, 20 Dec 2005 11:49:21 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICEEJADAAA.drew.adams@oracle.com> (raw)
In-Reply-To: <do9f38$u9k$1@sea.gmane.org>

    Evaluate the following, then type `?' at the prompt:

    (completing-read "Prompt: " '(("a") ("b") ("c") ("a") ("b") ("c")))

    The *Completions* buffer contents are:

    /---
    | Click <mouse-2> on a completion to select it.
    | In this buffer, type RET to select the completion near point.
    |
    | Possible completions are:
    | a                                  a
    | b                                  b
    | c                                  c
    \---

I'm not convinced that this is a bug.

There is nothing in the doc of `completing-read' or `all-completions' that
suggests that these functions should remove duplicates. This has _always_
been the behavior of these functions, AFAIK. Changing this behavior could
break existing libraries (at least external libraries) that might depend on
it.

Niether of these functions removes duplicates, but you can make sure there
are no duplicates, if you like, by passing them an appropriate TABLE
argument. IOW, as the Doctor says, "If it hurts, don't do that!"

      reply	other threads:[~2005-12-20 19:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-20 17:30 completing-read displays duplicates in the *Completions* buffer Kevin Rodgers
2005-12-20 19:49 ` Drew Adams [this message]

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=DNEMKBNJBGPAOPIJOOICEEJADAAA.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).