From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "ISHIKAWA,chiaki" Newsgroups: gmane.emacs.help Subject: Re: Cisco Router Tab Completion in SSH from Emacs Date: Sun, 01 Dec 2013 23:56:50 +0900 Message-ID: <529B4E32.30304@yk.rim.or.jp> References: <87eh61ku9g.fsf@quasar.esben-stien.name> <87ppphgxo9.fsf@quasar.esben-stien.name> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1385911043 28222 80.91.229.3 (1 Dec 2013 15:17:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Dec 2013 15:17:23 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Esben Stien Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 01 16:17:28 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vn8lz-0006Ql-PS for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Dec 2013 16:17:27 +0100 Original-Received: from localhost ([::1]:60051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vn8lz-0000lL-8x for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Dec 2013 10:17:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vn8lg-0000l7-9z for help-gnu-emacs@gnu.org; Sun, 01 Dec 2013 10:17:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vn8lY-0000As-P0 for help-gnu-emacs@gnu.org; Sun, 01 Dec 2013 10:17:08 -0500 Original-Received: from mbos141-211.alpenstock.jp ([220.156.141.211]:60067 helo=phnompenh.mbos.jp) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vn8lY-00004q-AQ for help-gnu-emacs@gnu.org; Sun, 01 Dec 2013 10:17:00 -0500 Original-Received: from [172.16.30.41] ([172.16.30.41]) by phnompenh.mbos.jp ([172.16.30.51]) with ESMTP id 2013120123:56:40:852651.32359.2986273680 for ; Sun, 01 Dec 2013 23:56:40 +0900 (JST) Original-Received: (qmail 25276 invoked from network); 1 Dec 2013 23:56:40 +0900 Original-Received: from nttkyo791023.tkyo.nt.ftth.ppp.infoweb.ne.jp (HELO [192.168.0.65]) (ishikawa_yk@smp.mbos.jp@[125.0.13.23]) (envelope-sender ) by pyongyang.mbos (qmail-ldap-1.03) with SMTP for ; 1 Dec 2013 23:56:40 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11 In-Reply-To: <87ppphgxo9.fsf@quasar.esben-stien.name> X-TERRACE-SPAMMARK: NOT spam-marked. (by Terrace) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 220.156.141.211 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94762 Archived-At: (2013/12/01 10:36), Esben Stien wrote: > Barry Margolin writes: > >> I'm still running 22.x, but M-x term has always been short for M-x >> terminal-emulator -- it's just command completion. > > Right, and running this way it kind of useless, since it makes emacs > inaccessible since everything is sent to the terminal. I could just as > well run it outside emacs. So, I guess we abandon this approach. > >> You can type C-q TAB, but it won't be sent until you enter the command >> line. > > Until I enter the command line? I don't understand this sentence. > > C-q runs the command quoted-insert, which is an interactive compiled > Lisp function in `simple.el'. > > It is bound to C-q. > > If I enter this in an eshell ssh session, nothing happens, at all. It > just jumps forward like hitting TAB usually does. > I just checked. I logged into a local router with a CLI that supports cisco-like command completion feature. I used telnet. In my case, I run M-x term and when it asks for Run program: bash I delete bash and inserts telnet and runs telent directly. I think this is the key here. This puts me in a mode where the emacs basically captures all the character code that is entered into telnet program. (For example, C-x C-b to bring up dir-mode doesn't take effect. Presumably it is all sent to the terminal program? I can't seem to get out of this behavior of this frame/window untill telnet is finished. So better run this "M-x term" in a separate frame, I think. If I run "M-X term" in a new-frame, the other existing frame is not affected by this behavior, so I can run other emacs commands there. With running telnet directory, I did get cisco-like completion from the router. Yes, I am familiar with the issues mentioned because I was not able to use cisco IOS like completion when I ran ssh from eshell session. I suspect what you need to do is to run "ssh" (or whatever binary that invokes shell on your computer) when "M-x term" asks you about what program it should run. Hope this helps.