From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Proposal for shell completion in M-x shell RET Date: Mon, 10 Sep 2007 16:52:18 +0200 Message-ID: <86642i4lp9.fsf@lola.quinscape.zz> References: <86r6l67kqf.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1189440951 31950 80.91.229.12 (10 Sep 2007 16:15:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2007 16:15:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 11 02:15:38 2007 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 1IUs8X-0001U4-Gr for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2007 00:53:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUkeB-0005sS-24 for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2007 10:53:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IUkcg-00057c-N6 for emacs-devel@gnu.org; Mon, 10 Sep 2007 10:52:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IUkcf-00056B-5a for emacs-devel@gnu.org; Mon, 10 Sep 2007 10:52:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUkce-000562-Te for emacs-devel@gnu.org; Mon, 10 Sep 2007 10:52:20 -0400 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IUkce-0005dg-Ai for emacs-devel@gnu.org; Mon, 10 Sep 2007 10:52:20 -0400 Original-Received: from quinscape.de (dslnet.212-29-44.ip210.dokom.de [212.29.44.210] (may be forged)) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id QAA01419 for ; Mon, 10 Sep 2007 16:52:11 +0200 X-Delivered-To: Original-Received: (qmail 10636 invoked from network); 10 Sep 2007 14:52:18 -0000 Original-Received: from unknown (HELO www.quinscape.de) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 10 Sep 2007 14:52:18 -0000 Original-Received: by www.quinscape.de (Postfix, from userid 1001) id F3E23E1C6E; Mon, 10 Sep 2007 16:52:18 +0200 (CEST) In-Reply-To: (Stefan Monnier's message of "Mon\, 10 Sep 2007 10\:29\:25 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Detected-Kernel: Linux 2.4-2.6 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:78462 Archived-At: Stefan Monnier writes: >>> The way this would work would be when TAB is pressed to send the >>> partial line up to the cursor as input to the shell, followed by TAB, > >> It would most likely have to be another key, because shell.el cannot know if >> the command is sent to bash or to some other application, so it could only >> be the user's choice to either get local completion or to send "prefix string >> plus TAB" to the application. > > BTW, maybe we can do it the way `gdb' does it: instead of sending TAB, we > send a "list_all_completions" command, presuming that bash offers such > a function. programmable completion is extensively context-sensitive (which is pretty much its whole point: it does not just complete file names, but also CVS revisions, options and other stuff). And sending such a command would clobber the command history, too. -- David Kastrup