+(defun notmuch-show-advance-marking-read ()
+ "Advance through buffer, marking messages as read.
+
+This command is intended to be one of the simplest ways to
+process a thread of email. It does the following:
+
+If the current message in the thread is not yet fully visible,
+scroll by a near screenful to read more of the message.
+
+Otherwise, (the end of the current message is already within the
+current window), remove the \"unread\" tag from the current
+message and advance to the next message."
+ (interactive)
+ (if (< (notmuch-show-find-next-message) (window-end))
+ (notmuch-show-mark-read-then-next-message)
+ (scroll-up nil)))
+