imh

Check-in [245fcd8b74]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Helpfully decline to go beyond last message
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:245fcd8b7403465be18125e07dd85334d019ec3a88bf4db5379a168f29fe2684
User & Date: ajv-899-334-8894@vsta.org 2016-11-11 03:38:49
Context
2016-11-11
03:39
Handle refile failure gracefully check-in: 9b6c22a915 user: ajv-899-334-8894@vsta.org tags: master, trunk
03:38
Helpfully decline to go beyond last message check-in: 245fcd8b74 user: ajv-899-334-8894@vsta.org tags: master, trunk
2016-11-08
03:54
Add "refile" command check-in: d13695f52b user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to next.py.

8
9
10
11
12
13
14
15
16
17
18
19
20
21



22
23
24
25
26
27
28
29
30
31

    # The next message in this folder
    def which_msgs(self):
        st = self.state

        # Current folder
        fn = st["curbox"]
        self.select_folder(fn)

        # Next message
        curmsgs = st["curmsgs"]
        m = curmsgs.get(fn)
        if m is None:
            raise Exception, "No current message"



        m += 1
        curmsgs[fn] = m
        self.changed = True

        # List of one message
        return [m]

if __name__ == "__main__":
    i = Next()
    i.main()







|






>
>
>










8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

    # The next message in this folder
    def which_msgs(self):
        st = self.state

        # Current folder
        fn = st["curbox"]
        nmsg = self.select_folder(fn)

        # Next message
        curmsgs = st["curmsgs"]
        m = curmsgs.get(fn)
        if m is None:
            raise Exception, "No current message"
        if m >= nmsg:
            print "No more messages"
            return ()
        m += 1
        curmsgs[fn] = m
        self.changed = True

        # List of one message
        return [m]

if __name__ == "__main__":
    i = Next()
    i.main()