From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kin Cho Newsgroups: gmane.emacs.help Subject: real shell completion in shell-mode Date: 02 Oct 2002 09:41:06 -0700 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <7ielb8x07x.fsf@neoscale.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1033708146 19140 127.0.0.1 (4 Oct 2002 05:09:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2002 05:09:06 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17xKhv-0004y4-00 for ; Fri, 04 Oct 2002 07:09:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17xKiA-0001Tl-00; Fri, 04 Oct 2002 01:09:14 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!12.24.46.66!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: 12.24.46.66 Original-X-Trace: fu-berlin.de 1033577258 14167856 12.24.46.66 (16 [151019]) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: nntp.stanford.edu gnu.emacs.help:105650 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2218 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2218 Hi, comint-dynamic-complete works only in an inferior shell sharing the same directory structure as emacs. If in the inferior shell I telnet to another system, or open a serial connection to an embedded device, neither of which share the same directory structure, then comint-dynamic-complete is useless. Let's say the remote system is running bash, what I'd like to do is to send a real tab to the remote bash and let it complete. I've done that by binding tab to this function: (defun my-shell-real-tab() (let ((comint-input-sender (function comint-send-string))) (insert (concat (list 9))) (comint-send-input))) this kind of works for a single tab key: [root@remote root]# cd /var/r cd /var/run The remote bash completes the input, but the old input is not erased and the new input goes to the next line. I don't see terminal escape sequence send by the remote bash to fix up the output. TERM is set to vt100 in the remote bash. At this point, pressing return does send the correct command to the remote bash. Obviously this still needs work because two consecutive tabs doesn't work at all. Anybody can offer some insight to help me fix this? Thanks! -kin