Loading ...
Sorry, an error occurred while loading the content.

689vm mail fix to not finding separator line (From line) problem

Expand Messages
  • Thomas Hundt
    Nov 13, 2002
      I was experiencing the following problem with the 'vm' read mail
      command in Jasspa: All the messages in my mailbox appeared (in
      Jasspa) to be one long message. It was not finding the "From" lines
      that separate mail messages in Unix mail. Today I finally had enough
      and figured out the problem.

      Versions: MicroEmacs 02 (date 02/01/01 which is 1/1/2002) and probably
      several versions prior to that. (It's never really worked for me.)

      Platforms: RedHat Linux 7.2 and OpenBSD 3.1.

      Fix:

      The problem is the format of the From line, on my systems it looks
      like this:
      From foo123@... Wed Nov 13 15:15:04 2002
      From thundt Wed Nov 13 12:21:24 2002

      Note the TWO spaces after the username.

      The search strings in vm.emf look like this (wrapped by Yahoo):

      force search-forward "^from [!-z]* [MTWFS][ouehra][neduitn]
      [JFMAJSOND][aepuico][nbrynlgptvc] +[0-9]+
      [0-2][0-9]:[0-5][0-9]:[0-5][0-9]"

      Note that after the [!-z]* there is ONE space. Aha! Needs a plus sign.

      In my version, I actually "centralized" this a bit and made it one
      string at line 1356 (right after "define-macro vm"):

      set-variable %vm-sep-string "^from [!-z]* +[MTWFS][ouehra][neduitn]
      [JFMAJSOND][aepuico][nbrynlgptvc] +[0-9]+
      [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [0-9]+"

      and then replaced all the "^from..." search strings with
      %vm-sep-string. (I think lines 69, 602, 613 -- your lines may vary
      slightly due to comments.)

      Note that in my version, I also added a "[0-9]+" at the end to match
      the year. Just for fun.

      At line 443 there is a different version of this string, it uses \(
      and \) to pull out the values. You have to add the '+' there, too.
      (Whoever did this one was too lazy to put in the exact characters for
      month names etc. like the above one. Oh, well.)

      !force -1 search-forward "^[Ff]rom [!-z]* +\\([MTWFS]..\\)
      \\([JFMAJSOND]..\\) +\\([0-9]+\\)
      +\\([0-2][0-9]:[0-5][0-9]:[0-5][0-9]\\) \\([0-9]+\\)"


      -Tom Hundt
    • Show all 2 messages in this topic