Ticket #3059 (new enhancement)

Opened 6 months ago

Last modified 6 months ago

Add pattern to match ranges relative to matched results.

Reported by: naveen Owned by: mutt-dev
Priority: minor Milestone: 2.0
Component: mutt Version: 1.5.18
Keywords: pattern limit tag Cc:

Description

I would like to propose a new pattern ~M that allows you to select a range from matched results.

This is useful for:

* Limiting/tagging the first 500 results: ~M <500 (other patterns)
* Limiting/tagging results from the 5th to 10th: ~M 5-10 (other patterns)
* Limiting/tagging by matching the 50th result: ~M 50 (other patterns)
etc.

I have attached a patch implementing this feature. It works on both 1.5.18 and the mercurial development branch. I also attempted to add documentation regarding this pattern as best as possible.

Attachments

patch-1.5.18.nn.matchrange.1 (3.2 kB) - added by naveen 6 months ago.
Patch implementing pattern ~M which allows you to select ranges relative to matched results.

Change History

Changed 6 months ago by naveen

Patch implementing pattern ~M which allows you to select ranges relative to matched results.

Changed 6 months ago by naveen

  • summary changed from Add pattern to match ranges from matched results. to Add pattern to match ranges relative to matched results.

Changed 6 months ago by naveen

I only just realized this, but precedence matters.

Instead of what I noted above, it should be: (other patterns) ~M [range]
to be effective.

Changed 6 months ago by brendan

  • milestone changed from 1.6 to 2.0

This looks like an interesting idea, but I don't want it to be a 1.6 blocker, so I'm pushing the milestone back.

Note: See TracTickets for help on using tickets.