From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: a suggested solution for better external' completion in certain emacs modes Date: Wed, 10 Nov 2004 22:14:48 -0500 Message-ID: References: <87smal64nc.fsf@orebokech.com> <87wtx45rag.fsf_-_@tapsellferrier.co.uk> <87k6svzzp5.fsf_-_@tapsellferrier.co.uk> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1100143015 21073 80.91.229.6 (11 Nov 2004 03:16:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Nov 2004 03:16:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 11 04:16:50 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 1CS5S5-00014p-00 for ; Thu, 11 Nov 2004 04:16:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CS5aZ-0006Ff-Bk for ged-emacs-devel@m.gmane.org; Wed, 10 Nov 2004 22:25:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CS5ZG-0005ii-2T for emacs-devel@gnu.org; Wed, 10 Nov 2004 22:24:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CS5ZE-0005hX-K9 for emacs-devel@gnu.org; Wed, 10 Nov 2004 22:24:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CS5ZE-0005h4-CR for emacs-devel@gnu.org; Wed, 10 Nov 2004 22:24:12 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CS5Qd-0007p9-6P for emacs-devel@gnu.org; Wed, 10 Nov 2004 22:15:19 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CS5Q8-00083B-R4; Wed, 10 Nov 2004 22:14:48 -0500 Original-To: Nic Ferrier In-reply-to: (message from Nic Ferrier on Tue, 09 Nov 2004 23:12:23 +0000) 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:29723 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29723 Let's imagine I want to start psql (the PostgreSQL command line client) in Emacs. This is what might happen, given my suggestion: Emacs does: READLINE_CTRL=API psql somedb This opens the normal stream between the two programs, but puts libreadline into 'api' mode It would be misleading to name this mode `api'. Readline, being a library, has an api. That api is how the application communicates with Readline. It is always the same. psql/Readline sends: (readline-api rl_insert_text rl_delete_text rl_copy_text rl_kill_text rl_complete rl_possible_completions rl_insert_completions) This tells Emacs what function calls the readline program can accept. Do you mean, commands to accept from Emacs? If so, please don't call them "function calls"; that is confusing. Function calls into Readline come from the app. Emacs sends: (rl_complete "select * from ") psql/Readline accepts the command, performs it and then: That I can understand. I think there needs to be some sort of quoting convention, so that real user input can be distinguished from commands to Readline itself. I don't understand why there needs to be more than one command. What is it that Emacs needs to do other than use rl_complete?