home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / emacs / help / 4734 < prev    next >
Encoding:
Text File  |  1992-11-09  |  2.5 KB  |  60 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!cis.ohio-state.edu!giant.INTranet.COM!del
  3. From: del@giant.INTranet.COM (G. Del Merritt)
  4. Subject: Re: VMS mail --> Emacs RMAIL
  5. Message-ID: <0096359A0B9BE440.2500035C@giant.IntraNet.com>
  6. Sender: daemon@cis.ohio-state.edu
  7. Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
  8. Date: Mon, 9 Nov 1992 05:30:24 GMT
  9. Lines: 49
  10.  
  11. >From: grodan@cyklop.nada.kth.se (Mats G Lfdahl)
  12. >Subject: VMS mail --> Emacs RMAIL
  13. >Sender: help-gnu-emacs-request@prep.ai.mit.edu
  14. >
  15. >I am moving from VMS to unix and I've started reading email with
  16. >Emacs's rmail. Now, I have a lot of old messages in various folders in
  17. >the VSM account. Is there a way to transfer them to the unix machine,
  18. >preserving the original Date:, Subject:, and  From: fields?
  19.  
  20. Gee.  I'm on VMS and I use rmail, so the solution is "obvious" to me:
  21. get a copy of EMACS for VMS and run RMAIL on your messages.  Then copy
  22. the resulting Babyl format files to your U*ix box.
  23.  
  24. As a possibly simpler alternative:
  25.  - EXTRACT/ALL[/APPEND] the messages in any given VMS folder;
  26.  - take the resulting file and copy it to your "mbox";
  27.  - modify and use the following which was extracted from an RMAIL.EL
  28. that was _tailored_for_VMS_.  I leave the mods to you; "all" you need
  29. is to understand VMS's mail headers.
  30.  
  31. ---------------------- from RMAIL.EL for VMS ----------------------
  32. ;;    :    Lot's of stuff (including copyleft) omitted
  33. ;;    :    Pretend the standard GNU copyleft is here.
  34. ;; VMS mods by Hal Brand (brand@addvax.llnl.gov)
  35. ;;    :
  36. (defun rmail-convert-vmsmail-headers ()
  37.   (let ((count 0)
  38.     (case-fold-search nil)
  39.     (previous-header nil))
  40.     ;; Find (and parse) VMS MAIL header, then reformat it.
  41.     (while (re-search-forward
  42.         "^\ \nFrom:\t\\(.* \\)\\([0-9 ][0-9]-[A-S][AEOUPC][B-Y]-[0-9].* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9]$\\)\nTo:\t\\(.*\\)\nCC:\t\\(.*\\)\nSubj:\t\\(.*\\)\n"
  43.         nil t)
  44.       (setq count (1+ count))
  45.       (replace-match (if previous-header
  46.              " \n0,unseen,,\n*** EOOH ***\nFrom: \\1\nDate: \\2\nTo: \\3\nCC: \\4\nSubject: \\5\n"
  47.                " \n0,unseen,,\n*** EOOH ***\nFrom: \\1\nDate: \\2\nTo: \\3\nCC: \\4\nSubject: \\5\n"))
  48.       (setq previous-header t))
  49.     (goto-char (point-max))  ;Move to end of buffer
  50.     (if (> count 0) (insert "\n"))  ;terminate last message
  51.     count))
  52. ---------------------- from RMAIL.EL for VMS ----------------------
  53.  
  54. Good luck
  55.  
  56. Del Merritt    del@IntraNet.com    ccavax!giant!del
  57. IntraNet, Inc., 255 Washington Street, Newton, MA  02158
  58. Voice: 617-527-7020; FAX: 617-527-6779
  59.  
  60.