From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Tennis Smith" Newsgroups: gmane.emacs.help Subject: telnet in buffer using elisp -- is this the best way? Date: Sat, 10 Jul 2004 11:44:31 -0700 Organization: self Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <1089484878.512760@sj-nntpcache-5> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1089485290 7267 80.91.224.253 (10 Jul 2004 18:48:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 10 Jul 2004 18:48:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 10 20:47:59 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 1BjMtD-0003wI-00 for ; Sat, 10 Jul 2004 20:47:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BjMvR-0005LM-QQ for geh-help-gnu-emacs@m.gmane.org; Sat, 10 Jul 2004 14:50:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!sjc1.usenetserver.com!news.usenetserver.com!sn-xit-02!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4922.1500 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Cache-Post-Path: sj-nntpcache-5!unknown@sjc-vpn4-124.cisco.com X-Cache: nntpcache 2.4.0b2 (see http://www.nntpcache.org/) Original-X-Complaints-To: abuse@supernews.com Original-Lines: 47 Original-Xref: shelby.stanford.edu comp.emacs:85381 gnu.emacs.help:124226 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.emacs.help:19559 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19559 Hi Apologies for the basic nature of the questions, but my area is s/w testing, not elisp writing. ;-) I frequently have the need to telnet into routers, via console ports thru a term server or a native ip address. I've built some *very* basic elisp functions for doing this, but I'm wondering if there is a better way. The number of routers in my environment continues to grow (Im in a testing group, we have hundreds of the things). So, this approach has become a real problem since each router requires a separate function to access it. Here are a couple examples: (defun 5gw-con () (interactive) (telnet "10.10.10.58 2008") (rename-buffer "ef-gw-5-con")) (defun 5gw-con2 () (interactive) (telnet "10.10.10.58 2009") (rename-buffer "ef-gw-5-con")) (defun 7gw () (interactive) (telnet "10.10.10.40") (rename-buffer "ef-gw-7")) There's an additional issue too. Sometimes the same address will be used in multiple places. Note that the first two examples uses an ip/port combination. In this case the port will be changing, but the base ip address will stay the same. Is there a way to specify the ip address in _one_ place and have it be used in multiple places? Is there a better way to do all this? TIA, -Tennis -- Remove "-remove-to-reply" to respond to my email address directly.