home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / emacs / help / 3699 < prev    next >
Encoding:
Text File  |  1992-08-12  |  1.9 KB  |  46 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!pipex!demon!edscom.demon.co.uk!kevin
  3. From: kevin@edscom.demon.co.uk (Kevin Broadey)
  4. Subject: Re: read/write dos files from Un*x
  5. In-Reply-To: thompson@saifr00.cfsat.honeywell.com's message of Mon, 10 Aug 92 20:26:53 GMT
  6. Message-ID: <KEVIN.92Aug12094612@buffalobill.edscom.demon.co.uk>
  7. Sender: kevin@edscom.demon.co.uk (Kevin Broadey)
  8. Organization: EDS-Scicon, Milton Keynes, UK
  9. References: <1992Aug10.202653.19442@saifr00.cfsat.honeywell.com>
  10. Date: Wed, 12 Aug 1992 09:46:12 GMT
  11. Lines: 33
  12.  
  13. In article <1992Aug10.202653.19442@saifr00.cfsat.honeywell.com> thompson@saifr00.cfsat.honeywell.com (Todd Thompson) writes:
  14.  
  15.    I'm sure the title sounds bizarre, but bear with me.  I import/export
  16.    files from/to DOS machiness quite frequently.  Are there any
  17.    Emacs-lisp packages out there that will convert the CR/LF to the LF
  18.    used in Un*x  so that the buffer doesn't have the annoying ^M
  19.    appearing at the end of a line?
  20.  
  21.    Thanks for any help you may provide.
  22.  
  23.    Todd Thompson
  24.  
  25. This one ought to be in the FAQ if it isn't already there.
  26.  
  27. You haven't said _how_ you're importing/exporting your DOS files, but the most
  28. basic way is by doing M-ESC (replace-string "\r\n" "\n") after you've imported
  29. your file, and M-ESC (replace-string "\n" "\r\n") before you export.
  30.  
  31. If you're using PC-NFS then use DOS2UNIX to create the import copy and UNIX2DOS
  32. for export.
  33.  
  34. If you've got a more tightly-nit UNIX-DOS network (we've got a shared TCP/IP -
  35. Novell LAN) you can set up a PC as an FTP Server using something like Novell's
  36. LAN WorkPlace and then use the Emacs command `ftp-find-file' to import and
  37. 'ftp-write-file' to export.
  38.  
  39. BTW I've modified `ftp-find-file' so it does auto-mode-selection _without_
  40. clobbering all those buffer-local variables that FTP uses.
  41. -- 
  42. Kevin Broadey, EDS-Scicon
  43. Mail:    Wavendon Tower, Wavendon, Milton Keynes, MK17 8LX, England
  44. E-mail: kbroadey@edscom.demon.co.uk
  45. Phone:    +44 908 284198 or +44 908 585858 ext 4198
  46.