Finding the latest messages

37 views
Skip to first unread message

Magnus Therning

unread,
Mar 31, 2016, 5:40:10 AM3/31/16
to mu-discuss

After some initial surprise I found that mu4e limits the number of
matches in a search. The limit is controlled by
mu4e-headers-search-limit and is 500 by default. This means that when I
want to view my archive that currently has 1781 messages

$ find .maildir-work/\[Gmail\]All \Mail -type f|wc -l
1781

I see less than a third of the messages. That's all right, but isn't is
that I don't see the 500 *latest* messages. (I haven't verified it but I
suspect I see the 500 oldest messages.)

I've tried C-u, but that doesn't seem to work when jumping.

I can of course set mu4e-headers-search-limit to -1, but as noted in the
docs that affects performance negatively.

Is there some way to get mu4e to limit the search matches to the N
latest messages?

/M

--
Magnus Therning OpenPGP: 0x927912051716CE39
email: mag...@therning.org jabber: mag...@therning.org
twitter: magthe http://therning.org/magnus

Any sufficiently advanced technology is indistinguishable from a rigged
demo.
-- Andy Finkel
signature.asc

Eduardo Mercovich

unread,
Apr 1, 2016, 11:02:25 AM4/1/16
to mu-di...@googlegroups.com
Hi Magnus.

> After some initial surprise I found that mu4e limits the number of
> matches in a search. [...] Is there some way to get mu4e to limit the
> search matches to the N latest messages?

In the command line, I use this to see the last messages:

--8<---------------cut here---------------start------------->8---

find maildir:/your-account/your-folder --fields "d f s" --sortfield=date --reverse --maxnum=10

--8<---------------cut here---------------end--------------->8---

As you can see, the trick is the last parameter: --maxnum.

HTH. :)


--
eduardo mercovich

Donde se cruzan tus talentos
con las necesidades del mundo,
ahí está tu vocación.

Ken Mankoff

unread,
Apr 1, 2016, 11:39:58 AM4/1/16
to mu-di...@googlegroups.com

On 2016-04-01 at 11:02, Eduardo Mercovich <eduardo....@gmail.com> wrote:
>> After some initial surprise I found that mu4e limits the number of
>> matches in a search. [...] Is there some way to get mu4e to limit the
>> search matches to the N latest messages?
>
> In the command line, I use this to see the last messages:
>
> As you can see, the trick is the last parameter: --maxnum.
>

Actually, the trick is to sort in reverse date order, so newest is on top.

-k.

Yuri D'Elia

unread,
Apr 1, 2016, 12:37:09 PM4/1/16
to mu-di...@googlegroups.com
On Fri, Apr 01 2016, Ken Mankoff <man...@gmail.com> wrote:
>> In the command line, I use this to see the last messages:
>>
>> As you can see, the trick is the last parameter: --maxnum.
>
> Actually, the trick is to sort in reverse date order, so newest is on top.

But if we sort in reverse, is there a switch so that we make all actions
(such as setting a mark, delete, etc) move _upwards_ instead?

Ken Mankoff

unread,
Apr 1, 2016, 12:57:16 PM4/1/16
to mu-di...@googlegroups.com
Not that I know of. But reverse date order + threaded makes things appear, to me, in a logical order.

-k.

Yuri D'Elia

unread,
Apr 1, 2016, 1:14:27 PM4/1/16
to mu-di...@googlegroups.com
On Fri, Apr 01 2016, Ken Mankoff <man...@gmail.com> wrote:
>> But if we sort in reverse, is there a switch so that we make all actions
>> (such as setting a mark, delete, etc) move _upwards_ instead?
>
> Not that I know of. But reverse date order + threaded makes things appear, to me, in a logical order.

True. But I use threading only for a handful of folders.
I generally use plain reverse date order otherwise.

In this case, actions on a message moves me back to the previous message
instead of the next one. Feels a bit odd at times.

Magnus Therning

unread,
Apr 2, 2016, 12:07:10 AM4/2/16
to mu-discuss

On 1 Apr 2016 5:02 p.m., "Eduardo Mercovich" <eduardo....@gmail.com> wrote:
>
> Hi Magnus.
>
> > After some initial surprise I found that mu4e limits the number of
> > matches in a search. [...] Is there some way to get mu4e to limit the
> > search matches to the N latest messages?
>
> In the command line, I use this to see the last messages:
>
> --8<---------------cut here---------------start------------->8---
>
> find maildir:/your-account/your-folder --fields "d f s" --sortfield=date --reverse --maxnum=10
>
> --8<---------------cut here---------------end--------------->8---
>
> As you can see, the trick is the last parameter: --maxnum.
>
> HTH. :)

What I was really asking for is a way to get mu4e to do that!

/M

Eduardo Mercovich

unread,
Apr 2, 2016, 3:21:26 PM4/2/16
to mu-di...@googlegroups.com
Hi Magnus.

>>> [...] Is there some way to get mu4e to limit the search matches to
>>> the N latest messages?

>> In the command line, I use this to see the last messages:

>> find maildir:/your-account/your-folder --fields "d f s" -
>> -sortfield=date --reverse --maxnum=10

> What I was really asking for is a way to get mu4e to do that!

Ah, sorry... changing mu4e-headers-results-limit?

Magnus Therning

unread,
Apr 2, 2016, 3:42:27 PM4/2/16
to mu-di...@googlegroups.com

Eduardo Mercovich <eduardo....@gmail.com> writes:

> Hi Magnus.
>
>>>> [...] Is there some way to get mu4e to limit the search matches to
>>>> the N latest messages?
>
>>> In the command line, I use this to see the last messages:
>
>>> find maildir:/your-account/your-folder --fields "d f s" -
>>> -sortfield=date --reverse --maxnum=10
>
>> What I was really asking for is a way to get mu4e to do that!
>
> Ah, sorry... changing mu4e-headers-results-limit?

Well, as I wrote, it's 500 by default, I can change it to -1 to remove
the limit completely. AFAIU there is no value that ensures that I only
get the N latest messages... Which pretty much brings me back to the
question in my original message ;)

/M

--
Magnus Therning OpenPGP: 0x927912051716CE39
email: mag...@therning.org jabber: mag...@therning.org
twitter: magthe http://therning.org/magnus

The results point out the fragility of programmer expertise: advanced
programmers have strong expectations about what programs should look like,
and when those expectations are violated--in seemingly innocuous
ways--their performance drops drastically.
-- Elliot Soloway and Kate Ehrlich
signature.asc

Eduardo Mercovich

unread,
Apr 4, 2016, 9:33:45 AM4/4/16
to mu-di...@googlegroups.com
Hi Magnus.

>>>>> [...] Is there some way to get mu4e to limit the search matches to
>>>>> the N latest messages?

> Well, as I wrote, it's 500 by default, I can change it to -1 to remove
> the limit completely. AFAIU there is no value that ensures that I only
> get the N latest messages... Which pretty much brings me back to the
> question in my original message ;)

Sorry, but after those, I'm out of ideas... :)
Reply all
Reply to author
Forward
0 new messages