View/Edit #12:mail_catch_up

Switch to edit mode.

Name(s): mail_catch_up
1:  set_task_perms(caller == this ? this.owner | caller_perms())
2:  "this verb has been entirely commented out, because we don't know what it does.  It most certainly sets the current message to the 'last one you could possibly have read', which is actually wrong in the -new-mail-system-.  If we loose functionality because this is commented out, someone figure out what the purpose of this is.  Especially the $list_utils:reverse.  I mean, what's up with that?  - Lao 2002-12-03"
3:  "new_cm = head = {};"
4:  "for n in (this.current_message)"
5:  "  $cmd_utils:suspend_if_needed();"
6:  "  if (typeof(n) != $LIST)"
7:  "    head = {@head, n};"
8:  "  elseif ($mail_agent:is_recipient(folder = n[1]) && \"$mail_agent:is_readable_by(folder, this)\")"
9:  "    \"...set current msg to be the last one you could possibly have read.\";"
10: "    try"
11: "      i = `folder:get_num(folder:length_date_le(n[3])) ! E_RANGE => 0';"
12: "      n[2] = i && `folder:headers_in_seq(i)[1] ! E_RANGE => folder.messages[$][1]';"
13: "      new_cm = listappend(new_cm, n, $list_utils:iassoc_sorted(n[3], new_cm, 3));"
14: "    except (E_PERM)"
15: "    endtry"
16: "  endif"
17: "  ((ticks_left() < 30000) && \"yes, a single iteration of this loop can take up to 30000 ticks. doesn't the mail system suck?\") && suspend(0);"
18: "endfor"
19: "$cmd_utils:suspend_if_needed();"
20: "this.current_message = {@head, @$list_utils:reverse(new_cm)};"
21: this:set_current_folder(this)
22: "Last modified by Dax (#789) on Wed May  4 06:45:59 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]