On Fri, May 06, 2022 at 03:41:56PM -0700, "N.J. Thomas" <n...@ayvali.org> wrote:
> If I am in a folder and I am currently on some message (eg. #702), I'm > looking for a pattern to delete all previous message, up to and > including the selected message. > > I can do this manually by running "D" with the pattern "~m -702" (I had > to type in the number of the currently selected message). > > But if I want to do this for any message I am on (so I can alias > this), I didn't see any pattern modifier in the manual that allowed me > to do this. > > Is this possible? > > thanks, > Thomas Jut guessing, but have you tried: ~m -. In ex/vi, . means the current line. Nope. That doesn't work. Looking at the code, I can see where it would need to be changed (pattern.c:eat_range), but I don't know how to get the index number of the current message. It looks like it's mutt_index_menu()'s MUTTMENU *menu's current field but I don't think that's accessible to eat_range(). It looks like the answer is no. cheers, raf