From: bojohan+news@dd.chalmers.se (Johan Bockgård)
To: emacs-devel@gnu.org
Subject: change to try-completion behavior
Date: Thu, 22 Feb 2007 19:33:08 +0100 [thread overview]
Message-ID: <yoijd54259gb.fsf@gamma02.me.chalmers.se> (raw)
There was an old thread in gnu.emacs.help (see below) about the change
in behavior of try-completion in CVS.
This code
(let ((completion-ignore-case t))
(try-completion "w" '(("W") ("Write") ("w"))))
returns "W" in Emacs 22. In Emacs 21 is used to return "w", that is
the best match _including_ case.
I should have said in that discussion that I think that this is a
bug/regression. Ftry_completion contains this comment:
/* If there is more than one exact match ignoring case, and one of
them is exact including case, prefer that one. */
The new short-circuiting behavior means that this note is not true in
general.
http://article.gmane.org/gmane.emacs.help/32010
From: Johan Bockgård <bojohan+news <at> dd.chalmers.se>
Subject: Re: change to try-completion behavior in 21.3?
Newsgroups: gmane.emacs.help
Date: 2005-12-17 06:49:54 GMT
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> Why should it ever return the capital letter W?
>
> Because in your completion table, you have "W".
"w" was also in the table.
This change
revision 1.237
date: 2002-04-09 19:28:42 +0000; author: monnier; state: Exp; lines: +89 -47 [...]
(Ftry_completion): Allow lambda forms and lists of strings for
`alist'.
Short-circuit the search as soon as it "failed". [...]
added this piece of code (approximately)
if (matchsize <= SCHARS (string)
&& matchcount > 1)
/* No need to look any further. */
break;
When completion-ignore-case is t this doesn't necessarily find the
best match _including case_ (AFAICS).
--
Johan Bockgård
reply other threads:[~2007-02-22 18:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yoijd54259gb.fsf@gamma02.me.chalmers.se \
--to=bojohan+news@dd.chalmers.se \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.