I am using
mu4e-headers view with emails sorted by date in ascending order: the most recently received e-mail is shown on the bottom.
I usually have 20-30 older, read mails in my inbox, with the oldest one on top of the buffer. When I open the
mu4e-headers buffer, then point is at the first buffer line, and therefore at my "oldest" e-mail. I would prefer the following behavior:
- When the
mu4e-headersbuffer is opened, then point is automatically moved to (the beginning of) the line of the first unread email
- If possible, point is at the same time in the first row of the frame. That is, the buffer is scrolled down, such that initially only the new, unread e-mails are visible, and I have to scroll up to see older ones.
Achieving only 1. would already help me a lot, if 2. turns out to be too difficult. I would appreciate any advice on how to achieve this.
My Elisp programming skills are rather low, but I think I have already figured out that
mu4e-headers-mode-hook is the right place where a function that implements the above can be hooked in. But I have no idea how to identify the line of the first unread message, and how to move the cursor there.