Article View: gnu.emacs.bug
Article #98575ftp.el: multi-line messages confuses ftp-find-file
From: Andreas Schwab
Date: Wed, 05 Jun 1991 16:09
Date: Wed, 05 Jun 1991 16:09
40 lines
1715 bytes
1715 bytes
Multi-line messages of the remote ftp server, e.g.
230- Guest login ok.
Welcome to ...
...
230 Local time is ...
causes ftp-find-file to abort with "Ftp lost".
The following patch to ftp-command fixes it:
*** /usr/local/emacs/lib/lisp/ftp.el Tue Jul 19 08:21:43 1988
--- ftp.el Wed Jun 5 17:44:56 1991
***************
*** 227,232 ****
--- 227,245 ----
(let ((p 1))
(while (numberp p)
(cond ;((not (bolp)))
+ ((looking-at "^\\([0-9][0-9][0-9]\\)-") ; Multiple line message
+ (let ((end
+ (concat "^"
+ (buffer-substring (match-beginning 1) (match-end 1))
+ " .*\n")))
+ ;; skip output until end marker occured
+ (while (not (re-search-forward end nil t))
+ (setq p (point))
+ (condition-case ()
+ (accept-process-output process)
+ (error nil))
+ (goto-char p))
+ (goto-char (match-beginning 0))))
((looking-at win)
(goto-char (point-max))
(setq p t))
--
Andreas Schwab
schwab@ls5.informatik.uni-dortmund.de
Technical Details
Message-ID:
<3519@laura.UUCP>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbageShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,909315f755f165d8,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1991-06-05 09:09:48 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage From: schwab@ls5.informatik.uni-dortmund.de (Andreas Schwab) Newsgroups: gnu.emacs.bug Subject: ftp.el: multi-line messages confuses ftp-find-file Message-ID: <3519@laura.UUCP> Date: 5 Jun 91 16:09:48 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: University of Dortmund, Germany Lines: 40 Approved: bug-gnu-emacs@prep.ai.mit.edu