🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98676

unfortunate interaction between background.el and ange-ftp.el

#98676
From: Piet van Oostrum
Date: Thu, 07 Mar 1991 15:53
44 lines
2667 bytes
I found an interaction between background.el (from cmushell) and
ange-ftp.el.

ange-ftp redefines the functions expand-file-name and
file-name-as-directory. The new definitions use regexp matching and clobber
some match data that background was relying upon. The following patch (in
the latest version of background -- version 10/19/90, by Olin Shivers)
solves the problem:

It might be a good idea if ange-ftp would save the match-data as it is
supposed to be non-obtrusive.

*** background.el.~3~	Mon Oct 22 11:13:13 1990
--- background.el	Thu Mar  7 16:23:30 1991
***************
*** 42,52 ****
      (erase-buffer)
      (setq default-directory dir) ; Do this first, in case cd is relative path.
      (cond ((string-match "^cd[\t ]+\\([^\t ;]+\\)[\t ]*;[\t ]*" command)
  	   (setq default-directory
  		 (file-name-as-directory
! 		  (expand-file-name
! 		   (substring command (match-beginning 1) (match-end 1)))))
! 	   (setq command (substring command (match-end 0)))))
      (insert "--- working directory: " default-directory
  	    "\n% " command ?\n)
      (let ((proc (get-buffer-process
--- 42,52 ----
      (erase-buffer)
      (setq default-directory dir) ; Do this first, in case cd is relative path.
      (cond ((string-match "^cd[\t ]+\\([^\t ;]+\\)[\t ]*;[\t ]*" command)
+ 	   (setq dir (substring command (match-beginning 1) (match-end 1))
+ 		 command (substring command (match-end 0)))
  	   (setq default-directory
  		 (file-name-as-directory
! 		  (expand-file-name dir)))))
      (insert "--- working directory: " default-directory
  	    "\n% " command ?\n)
      (let ((proc (get-buffer-process
-- 
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31 30 531806   Uucp:   uunet!mcsun!ruuinf!piet
Telefax:   +31 30 513791   Internet:  piet@cs.ruu.nl   (*`Pete')
Technical Details
Message-ID: <1991Mar07.155302.13488@cs.ruu.nl>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!olivea!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,ea0ae63b8a2fab6c,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-03-07 07:53:02 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!olivea!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage
From: piet@cs.ruu.nl (Piet van Oostrum)
Newsgroups: gnu.emacs.bug
Subject: unfortunate interaction between background.el and ange-ftp.el
Message-ID: <1991Mar07.155302.13488@cs.ruu.nl>
Date: 7 Mar 91 15:53:02 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: piet@cs.ruu.nl (Piet van Oostrum)
Distribution: gnu
Organization: Dept of Computer Science, Utrecht University, The Netherlands
Lines: 44
Approved: bug-gnu-emacs@prep.ai.mit.edu