dvanceMode' IndexMode   = do
  st <- get
  let fp = selectedEmailPath . indexState $ st
  nfp <- if (isNew fp)
         then liftIO $ markAsRead fp
         else return fp
  when (fp /= nfp) triggerIndexUpdate
  st <- get
  msg <- liftIO $ UTF8.readFile nfp
  let email = parseMIMEMessage msg
  let body = getBody $ email
  let el = formatBody body $ screenColumns st
  let est = (emailState st) { currentEmail = email, emailLines = el, scrollRowEm = 0 }
  put $ st { mode = EmailMode, emailState = est }

advanceMode' IndexMode   = do
  st <- get
  let fp = selectedEmailPath . indexState $ st
  nfp <- if (isNew fp)
         then liftIO $ markAsRead fp
         else return fp
  when (fp /= nfp) triggerIndexUpdate
  st <- get
  msg <- liftIO $ UTF8.readFile nfp
  let email = parseMIMEMessage msg
  let body = getBody $ email
  let el = formatBody body $ screenColumns st
  let est = (emailState st) { currentEmail = email, emailLines = el, scrollRowEm = 0 }
  put $ st { mode = EmailMode, emailState = est }
advanceMode' IndexMode   = do
  st <- get
  let fp = selectedEmailPath . indexState $ st
  nfp <- if (isNew fp)
         then liftIO $ markAsRead fp
         else return fp
  when (fp /= nfp) triggerIndexUpdate
  st <- get
  msg <- liftIO $ UTF8.readFile nfp
  let email = parseMIMEMessage msg
  let body = getBody $ email
  let el = formatBody body $ screenColumns st
  let est = (emailState st) { currentEmail = email, emailLines = el, scrollRowEm = 0 }
  put $ st { mode = EmailMode, emailState = est }