From: Florian Beck <fb@miszellen.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: gnu-emacs-help@gnu.org
Subject: Re: Sorting Order of Completion Candidates
Date: Tue, 01 Mar 2011 11:59:09 +0100 [thread overview]
Message-ID: <4D6CD17D.6020208@miszellen.de> (raw)
In-Reply-To: <A8C042D46BBC4668AB77DB31BA4F7D17@us.oracle.com>
On 03/01/2011 02:25 AM, Drew Adams wrote:
>> While writing some code to index my notes I have run into a problem.
>> I have a carefully crafted list of keywords sorted in order of
>> frequency. (When assigning new keywords I want to consider the most
>> frequent keywords first.) However
>> (completing-read "Prompt: " '("a" "c" "b")) gives me
>>
>> Possible completions are:
>> a
>> b
>> c
>>
>> whereas I want
>>
>> Possible completions are:
>> a
>> c
>> b
>>
>> If there is no option or hook, if guess I could just modify the
>> *Completions* buffer. Any hints how/where it is set up?
>
> 1. Stefan can probably steer you as to how to do what you want with a recent
> version of vanilla Emacs.
I ended up modifying `minibuffer-completion-help'. There doesn't seem to
be a way around that.
> 2. An alternative is to use Icicles. Then all you need to do is bind
> `icicle-sort-comparer' to nil around the call to `completing-read'. A nil value
> means do not sort. (You can also customize `icicle-sort-comparer' to use any
> default sort order you like.)
Thanks, I will look into that. Or do you replace the whole completion
mechanism?
--
Florian Beck
next prev parent reply other threads:[~2011-03-01 10:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 14:29 Sorting Order of Completion Candidates Florian Beck
2011-03-01 1:25 ` Drew Adams
2011-03-01 10:59 ` Florian Beck [this message]
[not found] ` <mailman.0.1298977158.15512.help-gnu-emacs@gnu.org>
2011-03-01 14:48 ` Stefan Monnier
2011-03-01 16:29 ` Ted Zlatanov
2011-03-01 18:22 ` Florian Beck
[not found] ` <mailman.2.1299003773.19166.help-gnu-emacs@gnu.org>
2011-03-01 19:25 ` Ted Zlatanov
2011-03-01 20:41 ` Florian Beck
[not found] ` <mailman.9.1299012339.12270.help-gnu-emacs@gnu.org>
2011-03-01 22:00 ` Ted Zlatanov
2011-03-03 23:29 ` Stefan Monnier
2011-03-04 15:45 ` Ted Zlatanov
2011-03-05 4:48 ` Stefan Monnier
2011-03-07 18:27 ` Ted Zlatanov
2011-03-08 4:09 ` Stefan Monnier
2011-03-08 14:44 ` Ted Zlatanov
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=4D6CD17D.6020208@miszellen.de \
--to=fb@miszellen.de \
--cc=drew.adams@oracle.com \
--cc=gnu-emacs-help@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.