From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: Rlogin patch for global option flags Date: Fri, 29 Apr 2005 14:07:09 -0700 (PDT) Message-ID: <20050429210709.25347.qmail@web60316.mail.yahoo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114970831 882 80.91.229.2 (1 May 2005 18:07:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 May 2005 18:07:11 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 01 20:07:08 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DSIq8-0005jM-AF for ged-emacs-devel@m.gmane.org; Sun, 01 May 2005 20:06:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSIws-0004SP-AQ for ged-emacs-devel@m.gmane.org; Sun, 01 May 2005 14:13:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSIHd-0006zJ-3a for emacs-devel@gnu.org; Sun, 01 May 2005 13:31:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSIHb-0006yZ-Bt for emacs-devel@gnu.org; Sun, 01 May 2005 13:31:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSI9f-0003Wh-Ov for emacs-devel@gnu.org; Sun, 01 May 2005 13:22:55 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DSHwz-0000S9-21 for emacs-devel@gnu.org; Sun, 01 May 2005 13:09:49 -0400 Original-Received: from [209.73.178.124] (helo=web60316.mail.yahoo.com) by mx20.gnu.org with smtp (Exim 4.34) id 1DRcjW-0005US-Ke for emacs-devel@gnu.org; Fri, 29 Apr 2005 17:09:10 -0400 Original-Received: (qmail 25349 invoked by uid 60001); 29 Apr 2005 21:07:09 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=tZRGrdKB8wDluJxOtg7swo/oDSfGSJ/M5no5txuphNVWxqg1Gae76RNfgCtyii2DWjoBG3V9+yDuoTkAoyx180YdJjYFa7/dAXohOXKYzSyyRe+taDUlUbcdcF2/TI8mlT6jUxA+jB5YDKKT+qFijibvy8WEFlEKQ0vaMGdkjek= ; Original-Received: from [204.167.53.77] by web60316.mail.yahoo.com via HTTP; Fri, 29 Apr 2005 14:07:09 PDT Original-To: Emacs Devel 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:36541 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36541 I have an elisp program to call `ssh' a la `rlogin'. Essentially it sets the `rlogin-program' variable to `ssh' and calls `rlogin'. The problem is that ssh (cygwin's port) running with the w32 version of CVS Emacs needs the option `-tt' prior to the host name to open the connection correctly. The problem is that the `rlogin' function treats the `-tt' as the remote host name because it is the first argument. The following patch modifies the `rlogin' function command line interpretation by assuming that the second argument is the remote hostname if the first argument starts with a dash. Please review and apply if deemed suitable. Index: emacs/lisp/net/rlogin.el =================================================================== RCS file: /c/cvsroot/emacs/emacs/lisp/net/rlogin.el,v retrieving revision 1.6 diff -c -r1.6 rlogin.el *** emacs/lisp/net/rlogin.el 10 Apr 2004 05:55:47 -0000 1.6 --- emacs/lisp/net/rlogin.el 28 Apr 2005 23:37:49 -0000 *************** *** 182,188 **** (append (rlogin-parse-words input-args) rlogin-explicit-args) (rlogin-parse-words input-args))) ! (host (car args)) (user (or (car (cdr (member "-l" args))) (user-login-name))) (buffer-name (if (string= user (user-login-name)) --- 182,188 ---- (append (rlogin-parse-words input-args) rlogin-explicit-args) (rlogin-parse-words input-args))) ! (host (if (string-match "^-" (car args)) (car (cdr args)) (car args))) (user (or (car (cdr (member "-l" args))) (user-login-name))) (buffer-name (if (string= user (user-login-name))