From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.emacs.devel Subject: Re: a suggested solution for better external' completion in certain emacs modes Date: Thu, 11 Nov 2004 12:51:34 +0000 Message-ID: <87oei4a6qx.fsf@tapsellferrier.co.uk> References: <87smal64nc.fsf@orebokech.com> <87wtx45rag.fsf_-_@tapsellferrier.co.uk> <87k6svzzp5.fsf_-_@tapsellferrier.co.uk> <867josmzif.fsf@ketchup.de.uu.net> <87r7n0ab89.fsf@tapsellferrier.co.uk> <86mzxolgta.fsf@ketchup.de.uu.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1100178219 14268 80.91.229.6 (11 Nov 2004 13:03:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Nov 2004 13:03:39 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 11 14:03:21 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CSEbh-0004LX-00 for ; Thu, 11 Nov 2004 14:03:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSEf5-00015l-Fn for ged-emacs-devel@m.gmane.org; Thu, 11 Nov 2004 08:06:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSEd1-0000Ql-An for emacs-devel@gnu.org; Thu, 11 Nov 2004 08:04:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSEd0-0000QJ-2h for emacs-devel@gnu.org; Thu, 11 Nov 2004 08:04:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSEcz-0000Ph-3L for emacs-devel@gnu.org; Thu, 11 Nov 2004 08:04:41 -0500 Original-Received: from [80.168.156.78] (helo=owls-tree.tapsellferrier.co.uk) by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.34) id 1CSEUM-0006mW-6R for emacs-devel@gnu.org; Thu, 11 Nov 2004 07:55:46 -0500 Original-Received: from [217.207.145.34] (helo=kanga) by owls-tree.tapsellferrier.co.uk with esmtp (Exim 4.30 #1 (Debian)) id 1CSENA-0006NM-A7; Thu, 11 Nov 2004 12:48:20 +0000 Original-Received: from nferrier by kanga with local (Exim 4.30 #1 (Debian)) id 1CSEQJ-0000Wi-62; Thu, 11 Nov 2004 12:51:35 +0000 Original-To: Kai Grossjohann In-Reply-To: <86mzxolgta.fsf@ketchup.de.uu.net> (Kai Grossjohann's message of "Thu, 11 Nov 2004 13:18:41 +0100") 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: main.gmane.org gmane.emacs.devel:29744 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29744 Kai Grossjohann writes: > Nic Ferrier writes: > >> What rms is saying is that one could adapt the current Readline >> communication channel to break out of the normal reading and switch >> into the new mode. Maybe he's right. I'm not sure if it wouldn't be >> more complicated to manage the state of the current line once commands >> were being sent. > > For Emacs interaction, the normal mode might not be needed at all. > WDYT? That's right. > The command-oriented mode could provide a special command to accept > and process a line. That's right. That was the idea. But rms was suggesting that Readline already has all the functionality for receiving lines (/8-) but a breakout might be useful to allow Emacs to collect completions (and maybe history). The trouble is how do you keep it all synchronized? The user is entering a line in Emacs, with the text being sent to the process so that Readline can see it in the normal way. So far she's typed: select * from and now she presses C-TAB. Emacs has to ask Readline to do completion of the current line and get the completions back. How does it do this? Some quote thing could be sent, followed by a command. I guess what Realine would have to do is: - stop associating the input stream with the current line - read the command - execute the command - respond with the output (delimitted in some way, maybe sexps?) - go back to associating the input stream with the current line So that might work. But what quote to use? -- Nic Ferrier http://www.tapsellferrier.co.uk