unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lluis <xscript@gmx.net>
Cc: emacs-devel@gnu.org
Subject: Re: Completions in Semantic
Date: Tue, 27 Oct 2009 20:56:40 -0400	[thread overview]
Message-ID: <jwvocnswdq2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20091027212118.GA25239@ginnungagap.pc.ac.upc.edu> (Lluis's message of "Tue, 27 Oct 2009 22:21:18 +0100")

>> As for this "extra info", I see what you mean, but usually completion
>> involves several potential candidates, so listing them all plus all
>> their info would take way too much space in general (if not, then
>> something like completion-annotate-function should work).

> What I described is similar to `completion-annotate-function', but
> more flexible (prefixed in the symbol/identifier, postfixed; some in
> overlay, some in minibuffer, etc).

Right, so the question is: how should the generic code make such
flexibility available (and conversely) how shojuld the client of the
completion code be able to exploit/provide such flexibility.

I'm very interested in adding such hooks into the completion code, but
I haven't come up with any convincing idea of what they should look like
(the closest I got is completion-annotate-function which is very
limited).  So suggestions are welcome (patches as well, of course, tho
it's not crucial).

>> So usually this extra info is provided outside of the completion
>> functionality (e.g. via eldoc-mode or something similar).  But, yes,
>> I'd like to extend the *Completions* buffer so that you could ask for
>> more info (either on all entries, or just on one at a time).
> The key here is that completions do not necessarily have to go (only)
> into the *Completions* buffer.

Of course.  company-mode is an obvious example.

>> > - result narrowing
>> >   A-la company-mode.
>> No idea to what this is referring.
> Company-mode provides a binding that, given the current table of
> possible completions, the user can narrow it through various
> mechanisms (e.g., regexps).

Would that be like IDO's C-SPC (aka ido-restrict-to-matches)?
It shouldn't be too hard to add that to the default completion.
Maybe even without having to change minibuffer.el (i.e. there should
already be enough hooks for that).

>> > - argument placeholders So that argument type and/or name is shown as
>> > placeholders, such that the user simply TABs (or whatever) to fill-in
>> > the blanks.
>> 
>> Idem.  Unless you mean something like skeletons/templates, but then
>> I fail to see the connection with completion.

> Completing a symbol triggers an arbitrary function, which could, for example:
>     - show symbol definition
>     - show short and/or extended documentation for symbol
>     - insert skeleton/template-like symbol definition (such that user simply
>       tabs to sellect next argument placeholder, which initially contains
>       argument name and/or type).

That would be like the minibuffer-exit-hook, but for completion inside
a normal buffer, right?  That sounds like a good idea.  Currently,
figuring out when such "inline completion" ends is actually pretty
difficult, but it's something very much needed.


        Stefan




  reply	other threads:[~2009-10-28  0:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18 23:00 Completions in Semantic Chong Yidong
2009-10-18 23:55 ` Miles Bader
2009-10-19  3:50 ` Eric M. Ludlam
2009-10-19 13:48   ` Stefan Monnier
2009-10-19 16:26     ` Eric M. Ludlam
2009-10-19 18:29       ` Stefan Monnier
2009-10-19 19:33         ` Eric M. Ludlam
2009-10-19 20:06           ` Stefan Monnier
2009-10-19 22:17             ` Eric M. Ludlam
2009-10-20  0:07               ` Lennart Borgman
2009-10-30 21:17                 ` Toby Cubitt
2009-10-30 21:37                   ` Lennart Borgman
2009-10-20  0:14               ` Stefan Monnier
2009-10-20 20:20                 ` Eric M. Ludlam
2009-10-21 10:58                   ` Lluis
2009-10-21 12:35                     ` Eric M. Ludlam
2009-10-21 13:28                       ` Lluis
2009-10-21 17:35                         ` Eric M. Ludlam
2009-10-22 20:12                     ` Stefan Monnier
2009-10-27 21:21                       ` Lluis
2009-10-28  0:56                         ` Stefan Monnier [this message]
2009-10-28  2:25                           ` Eric M. Ludlam
2009-10-28  3:23                             ` Stefan Monnier
2009-10-29 14:38                               ` Lluis
2009-10-31 20:18                                 ` Stefan Monnier
2009-11-01 16:01                                   ` Lluís
2009-11-02  6:12                                     ` Stefan Monnier
2009-11-02 12:13                                       ` Eric M. Ludlam
2009-10-22 20:00                   ` Stefan Monnier
2009-10-19 23:52   ` Eric M. Ludlam
2009-10-21 14:07     ` Chong Yidong
2009-10-21 16:10       ` Eric M. Ludlam
2009-10-23  1:01         ` Chong Yidong
2009-10-23  1:28           ` Eric M. Ludlam

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=jwvocnswdq2.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=xscript@gmx.net \
    /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).