all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: eric@siege-engine.com
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: Completions in Semantic
Date: Mon, 19 Oct 2009 09:48:22 -0400	[thread overview]
Message-ID: <jwvbpk3v7nz.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <1255924220.6961.1039.camel@projectile.siege-engine.com> (Eric M. Ludlam's message of "Sun, 18 Oct 2009 23:50:20 -0400")

> If you look at semantic-read-symbol, it does what you suggest, and
> builds a table from the current buffer, and passes the whole thing into
> completing-read.  That's ok for a single buffer, but not when you want
> some symbol from anywhere in your project.  Of course, there is a basic
> assumption that the user will do something like your example below,
> typing in some prefix, before pressing TAB.  If the prompt comes up and
> the user presses TAB right away, then there is no win.

I'm not sure I understand what you're saying, but it seems what you
describe can be done as well with the "standard" completion mechanism,
since the completion-table can be a function.

E.g. Info-complete-menu-item builds the table dynamically, using the
prefix to try and build a smaller table, and reusing the previously
built table if the completion is in the same context as the last one and
the earlier prefix is a prefix of the new one.

> Anyway, semantic-read-symbol works fine unless there are multiple
> symbols with the same name, thus, a second thing that made me write my
> own completion code is that tags are a little special, since they have
> both names, and spacial data.  Sometimes, two tags are only different
> based on their spacial data.  For example, when jumping to a tag, if
> there are many hits with the same name (such as "window" in your example
> below), you can press TAB several times, and it will flash where you
> would jump to if you hit return, allowing you to differentiate.

That would require some custom completion code, indeed, since the
current completion does not offer any hook for such things.  Of course,
we could add such a hook, but we'd need to figure out where/how to
do it.


        Stefan




  reply	other threads:[~2009-10-19 13:48 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 [this message]
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
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvbpk3v7nz.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=eric@siege-engine.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 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.