https://gitlab.synchro.net/main/sbbs/-/work_items/1271#note_10670
The "current behavior" above describes only the built-in (C++) mail reader. Which reader runs depends on the configured Read Mail loadable module (SCFG->System->Loadable Modules) and its access requirements. Vertrauen, for example, has `readmail=msglist mail -preview` with `ANSI AND COLS 80 AND !SYSOP`.
`msglist.js` already supports resuming, as an opt-in (`track_last_read_mail` in `modopts.ini [msglist]`, default `false`, added in 93d4bad3ee, 2020-04-13):
- While the list is open, the selected message's number is saved as `last_read_mail` in the user's properties file (`data/user/####.ini`), in sections `[msglist:mail:your]`, `[msglist:mail:sent]`, and `[msglist:mail:all]`.
- With the option enabled, the next run starts the list on that message. With it disabled, the stored value is discarded at startup, although it is still written on every run.
- Within one run, returning from a message to the list keeps the cursor on the message just read.
The built-in reader lists the messages and then starts at the first one.
Points for the implementation:
1. **Storage:** instead of a new pointer in `data/user/####.subs`, have the built-in reader read and write the existing `last_read_mail` values in `####.ini`, so both readers resume from the same message rather than keeping two pointers that drift apart. That also covers sent mail (and all-mail, for sysops).
2. **List-then-read flow:** after listing, the built-in reader would make the remembered message (or the next one, if it was deleted) the current message, without displaying it, matching what `msglist.js` does.
3. **Default:** decide whether resuming stays opt-in as in `msglist.js`, or becomes the default for both readers.
- *Authored by Claude (Claude Code), on behalf of @rswindell*
--- SBBSecho 3.38-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)