From: Tassilo Horn <tassilo@member.fsf.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Question about the initials completion-style
Date: Thu, 22 Jul 2010 17:10:00 +0200 [thread overview]
Message-ID: <201007221710.00706.tassilo@member.fsf.org> (raw)
In-Reply-To: <jwvy6d3shzs.fsf-monnier+emacs@gnu.org>
On Thursday 22 July 2010 16:38:47 Stefan Monnier wrote:
> > I really like the idea of the `initials' completion style, but that
> > doesn't work for me. When I do `M-x ss<TAB>' I want to call
> > `server-start' (or any other command with exactly 2 words separated
> > by some non-word-char). I had an own mode for executing commands by
> > giving only initials, but I'd like to drop that for the new
> > `completion-styles' in recent emacsen.
> [...]
> > So it would be good, if there was a variant of partial-completion
> > that didn't consider symbols with more hyphens than are actually
> > there. Or is there a way to do that right now (using a recent bzr
> > checkout)?
>
> There is no such feature, no. Feel free to code it up,
Wow, that's some pretty easy, straight-forward code. ;-)
It looks to me that I could copy the `completion-pcm-all-completions'
function and add a FILTER for deleting the entries consisting of too
many words to the call to `completion-pcm--find-all-completions'. I'll
try that as soon as I find some time...
> but be warned: there's more than one s-s match even in "emacs -Q" so
> you'll have to type something more. So you may end up discovering
> that you still have to type just as much.
Maybe.
A related question: Is the canonical way to use different completion
styles depending on what to complete advising the relevant functions?
Currently, I use that:
--8<---------------cut here---------------start------------->8---
(setq completion-styles '(basic initials partial-completion)
read-buffer-completion-ignore-case t)
(defadvice read-buffer (around th-read-buffer-set-substring-completion activate)
"Enable substring completion when reading buffers."
(let ((completion-styles '(basic substring)))
ad-do-it))
--8<---------------cut here---------------end--------------->8---
Works good and feels like IDO, especially in combination with icomplete.
So thanks a lot for all your great work on the completion facilities. :-)
Bye,
Tassilo
next prev parent reply other threads:[~2010-07-22 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-15 16:00 Question about the initials completion-style Tassilo Horn
2010-07-22 14:38 ` Stefan Monnier
2010-07-22 15:10 ` Tassilo Horn [this message]
2010-07-22 17:27 ` Tassilo Horn
2010-07-22 22:44 ` Stefan Monnier
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=201007221710.00706.tassilo@member.fsf.org \
--to=tassilo@member.fsf.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.