From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Completions in Semantic Date: Mon, 19 Oct 2009 16:06:26 -0400 Message-ID: References: <87tyxwxq6t.fsf@stupidchicken.com> <1255924220.6961.1039.camel@projectile.siege-engine.com> <1255969613.6961.1056.camel@projectile.siege-engine.com> <1255980824.6961.1075.camel@projectile.siege-engine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255982850 11116 80.91.229.12 (19 Oct 2009 20:07:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2009 20:07:30 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: eric@siege-engine.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 19 22:07:20 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MzyVe-0002W6-Ir for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2009 22:07:14 +0200 Original-Received: from localhost ([127.0.0.1]:51867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzyVe-0006Ob-1V for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2009 16:07:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzyUz-0005u8-Pe for emacs-devel@gnu.org; Mon, 19 Oct 2009 16:06:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzyUu-0005qT-RJ for emacs-devel@gnu.org; Mon, 19 Oct 2009 16:06:33 -0400 Original-Received: from [199.232.76.173] (port=43626 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzyUu-0005q9-HF for emacs-devel@gnu.org; Mon, 19 Oct 2009 16:06:28 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:27061 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzyUt-0001wG-O9 for emacs-devel@gnu.org; Mon, 19 Oct 2009 16:06:28 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As4EAMhj3EpLd/m0/2dsb2JhbACBUtlGhDEEiAU X-IronPort-AV: E=Sophos;i="4.44,587,1249272000"; d="scan'208";a="47832073" Original-Received: from 75-119-249-180.dsl.teksavvy.com (HELO pastel.home) ([75.119.249.180]) by ironport2-out.pppoe.ca with ESMTP; 19 Oct 2009 16:06:26 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 2C93380E7; Mon, 19 Oct 2009 16:06:26 -0400 (EDT) In-Reply-To: <1255980824.6961.1075.camel@projectile.siege-engine.com> (Eric M. Ludlam's message of "Mon, 19 Oct 2009 15:33:44 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116253 Archived-At: >> You mean like lisp-complete-symbol but modal? > Yes, that's what I meant, but in light of your simplified description, I > suppose it doesn't matter much. If there was a single function like > 'completing-read' that took arguments to control what proposed text > after the cursor was, I suppose it wouldn't matter what happened > underneath. I used overlays and overlay keymaps. > You could try semantic-complete-analyze-inline on something that needs > completing to see the effect I was going for. It should work for Lisp > or C code. > I would expect designing such a thing would be challenging since the > rules for what is before the cursor is a bit vague and language > specific, so it might belong in a tool like Semantic. We have `symbol-complete' although I'm not very happy about its API. But something along thses lines would be good. When I rewrite the minibuffer completion code I tried to make it possible to use it in non-minibuffer contexts, so for example lisp-complete-symbol nowadays uses minibuffer-complete internally. I also intend to consolidate the comint completion this way, tho it's more difficult because its current UI is slightly different. Part of the difficulty is how to determine when the "completion is done" so as to know when to pop-down the *Completions* buffer (if any). Maybe the best option is to pop-down *Completions* eagerly ("all the time"). Stefan