mu 1.7.18 & towards 1.8

51 views
Skip to first unread message

Dirk-Jan C. Binnema

unread,
May 8, 2022, 9:58:13โ€ฏAM5/8/22
to mu-di...@googlegroups.com
Hi all,

I've pushed the changes for mu 1.7.18 to master (that is, the first big
batch on Fri plus some follow-ups); this finalizes a lot of the
code-cleanup that has started a while ago.

First, the code: one of the oldest sediments of mu code is formed by the
various mu-msg.* files. 1.7 replaces that with some brand new code under
lib/message; much of that landed earlier, and this is last part which
removes the last removes the last remaining mu-msg-* code.

Now, what does that mean in practice, apart from the general 'cleaner
code' bla bla?

- In mu4e, the server outputs message information s-expressions which
are then parsed by emacs; we were generating the expressions
on-the-fly, which takes a bit of time. As an optimization, we now
*cache* them as part of the message document in database. This speeds
up things quite a bit, mostly visible when there are many results,
i.e., as an extreme example:

- with 1.6:
,----
| time mu find "" --format=sexp > /dev/null
| mu find "" --format=sexp > /dev/null 37,41s user 6,47s system 99% cpu 44,143 total
`----

- and with 1.7.18:
,----
| time mu find "" --format=sexp > /dev/null
| mu find "" --format=sexp > /dev/null 0,33s user 0,33s system 99% cpu 0,664 total
`----

- a new command: 'mu fields', which shows details about the message
fields and flags. This is based on the same information that mu uses
itself, so this is always up to date and complete.

- a new message field "changed", which tracks the last time the message
was changed (the ctime).

mu find changed:3M..

shows message which were changed in the last 3 minutes

- we already had 'personal' contacts; now there's a new 'personal' flag
for messages; a message is considered 'personal' if at least one of
the contact fields contains a 'personal' address. And an address is
considered 'personal' if it matches the personal addresses passed to
'mu init (see 'mu info' for the values), i.e.

mu find hello flag:personal

- in mu4e not so much changes but, there are a few changes:

- by default, the "flags" column in the headers view now shows the
'list' and 'personal' flags as well.

- incompatible change: addresses are now represented as plists
(:name <name> :email <email>)
rather than cons-cells
(name . email)
so if you have code depending on the first, you need to update, ie.
(car contact) --> name
(cdr contact) --> address
now becomes:
(mu4e-contact-name contact) --> name
(mu4e-contact-email contact) --> address
sorry for the inconvenience; needed for some future plans.

- For more new things, please read NEWS.org, which should be fairly up to date.

Now, this *works for me*, but I expect a little trickle of changes on top
of this (some of which has already happened).

With this in place, I'm ...slowly... descending to the 1.8 release; no
complete feature freeze yet, but moving in that direction. Mostly,
bug-fixing, updating documentation, adding tests.

[ Note, one other item that I worked on was the 'mu4e-summary', as a
replacement for the headers buffer; I have no time now to finish it, so
that's something for post-1.8. ]

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
gpg: 6987 9CED 1745 9375 0F14 DA98 11DD FEA9 DCC4 A036

Tassilo Horn

unread,
May 9, 2022, 7:26:17โ€ฏAM5/9/22
to mu-di...@googlegroups.com, Dirk-Jan C. Binnema
Hi Dirk,

I've found out that `mu4e--contacts-hash' is missing many contacts I've
recently had conversations with. The result is that I can't complete
them after the keywords to/from/contacts at the query prompt.

In the log buffer, I can see entries such as:

--8<---------------cut here---------------start------------->8---
2022-05-09 13:08:25.540 -> (contacts :personal nil :after "2018-01-01" :tstamp "16771599551" :maxnum 2000)
2022-05-09 13:08:25.550 * Received 49 byte(s)
2022-05-09 13:08:25.550 <- (:contacts nil :tstamp 23370351411)
--8<---------------cut here---------------end--------------->8---

The :personal nil comes from the fact that
mu4e-compose-complete-only-personal is nil.

The mu query

mu cfind --after=`date +%s -d 2022-01-01`

finds those contacts.

Interestingly, the contacts are also missing in

mu cfind --after=`date +%s -d 2022-01-01` --personal

although I've had a conversation with those contacts within the last
week where To/Cc/From contained them and it hasn't been on a
mailinglist.

Bye,
Tassilo

Dirk-Jan C. Binnema

unread,
May 9, 2022, 8:02:55โ€ฏAM5/9/22
to mu-di...@googlegroups.com

On Monday May 09 2022, Tassilo Horn wrote:

> Hi Dirk,
>
> I've found out that `mu4e--contacts-hash' is missing many contacts I've
> recently had conversations with. The result is that I can't complete
> them after the keywords to/from/contacts at the query prompt.
>
> In the log buffer, I can see entries such as:
>
> 2022-05-09 13:08:25.540 -> (contacts :personal nil :after "2018-01-01" :tstamp "16771599551" :maxnum 2000)
> 2022-05-09 13:08:25.550 * Received 49 byte(s)
> 2022-05-09 13:08:25.550 <- (:contacts nil :tstamp 23370351411)
>
> The :personal nil comes from the fact that
> mu4e-compose-complete-only-personal is nil.
>
> The mu query
>
> mu cfind --after=`date +%s -d 2022-01-01`
>
> finds those contacts.
>
> Interestingly, the contacts are also missing in
>
> mu cfind --after=`date +%s -d 2022-01-01` --personal
>
> although I've had a conversation with those contacts within the last
> week where To/Cc/From contained them and it hasn't been on a
> mailinglist.

Ack. I'll fix it shortly.

Dirk-Jan C. Binnema

unread,
May 22, 2022, 1:22:24โ€ฏAM5/22/22
to mu-di...@googlegroups.com
Hi all,

On Wednesday May 04 2022, Dirk-Jan C. Binnema wrote:

> Hi all,
>
> I've pushed the changes for mu 1.7.18 to master (that is, the first big
> batch on Fri plus some follow-ups); this finalizes a lot of the
> code-cleanup that has started a while ago.
>
<snip>

We're a little further with the mu 1.7.x releases.

- a number of issues reported against 1.7.18 have been fixed, in
particular with the contacts-cache / contacts completion in mu4e

- fixed an exception for certain messages that claimed to have
sub-parts, but hadn't

- a fixed for the mu4e keybindings (so the '-' binding works)

- fixes for a number of assumptions that are not true on bare-bones
system such as alpine/musl regarding timezones and locales. Handle
those, and update the tests accordingly

- fix for a race condition with indexing that broke our MacOS CI.

- mu4e's query autocompletion learned about the the 'personal' flag.

- better error reporting (i.e. 'no matches' for a mu find/mu-cfind query
is only as 'soft error')

- (re-) add support for forwarding attachments

- removed the 'toys'

- re-enabled guile

Oh, as visible new thing, "related" messages are now shown using
'mu4e-related-face`, by default shown with italics.

So now I'll spend some time with tests, docs, and possible bugs.

Dirk-Jan C. Binnema

unread,
Jun 5, 2022, 4:14:32โ€ฏAM6/5/22
to mu-di...@googlegroups.com
Hi all!

We've reached 1.7.26, and we're getting close to 1.8.

- Emacs bookmark support got restored, so you can use the emacs' builtin
bookmarks for messages once again (`M-x bookmark-set` etc.)
- Workaround for the mu server getting stuck on MacOS
- Fixed a few bug(let)s and warnings during compilation
- Work around for some shenanigans with compiling guile support on MacOS
- Work around for running on bare-bones systems (like Alpine/Musl)
without proper locale support
- Added more tests

There was one bigger issue (#2268); development versions 1.7.18 -
17.7.25 had a bug where the mail file names sometimes got misnamed (with
some extra ':2,').

This can be restored with something like (tested with GNU sed):

$ find ~/Maildir -name '*:2,*:*' | sed "s/\(\([^:]*\)\(:2,\)\{1,\}\(:2,.*$\)\)/mv '\0' '\2\4'/" > rename.sh

(replace 'Maildir' with the path to your maildir)

once this is done, do check the generated 'rename.sh' and after
convincing yourself it does the right thing, do

$ sh rename.sh

and after that, re-index.

Sorry for the inconvenience!

Kind regards,
Dirk.

Dirk-Jan C. Binnema

unread,
Jun 18, 2022, 8:44:07โ€ฏAM6/18/22
to mu-di...@googlegroups.com
Hi All,

I just pushed 1.7.28; a bunch of changes since 1.7.26 and even some tiny
new features:

- there's a new flag 'calendar' for message with calendar invitations;
and there's a marker for that in the headers-view as well.

So if you want to be really fancy and have the needed fonts you can use
e.g.

--8<---------------cut here---------------start------------->8---
(setq
mu4e-use-fancy-chars t
mu4e-headers-draft-mark '("D" . "๐Ÿ’ˆ")
mu4e-headers-flagged-mark '("F" . "๐Ÿ“")
mu4e-headers-new-mark '("N" . "๐Ÿ”ฅ")
mu4e-headers-passed-mark '("P" . "โฏ")
mu4e-headers-replied-mark '("R" . "โฎ")
mu4e-headers-seen-mark '("S" . "โ˜‘")
mu4e-headers-trashed-mark '("T" . "๐Ÿ’€")
mu4e-headers-attach-mark '("a" . "๐Ÿ“Ž")
mu4e-headers-encrypted-mark '("x" . "๐Ÿ”’")
mu4e-headers-signed-mark '("s" . "๐Ÿ”‘")
mu4e-headers-unread-mark '("u" . "โŽ•")
mu4e-headers-list-mark '("s" . "๐Ÿ”ˆ")
mu4e-headers-personal-mark '("p" . "๐Ÿ‘จ")
mu4e-headers-calendar-mark '("c" . "๐Ÿ“…"))
--8<---------------cut here---------------end--------------->8---

anyway, there's not too much left to do for 1.8 it seems, as in "small
things to fix"; so that'll be something for post-1.8.

So if there is some catastrophic bug still, now is a good time to speak
up, thanks!

Tim Cross

unread,
Jun 18, 2022, 7:32:17โ€ฏPM6/18/22
to mu-di...@googlegroups.com

"Dirk-Jan C. Binnema" <dj...@djcbsoftware.nl> writes:

> Hi All,
>
> I just pushed 1.7.28; a bunch of changes since 1.7.26 and even some tiny
> new features:
>
> - there's a new flag 'calendar' for message with calendar invitations;
> and there's a marker for that in the headers-view as well.
>
> So if you want to be really fancy and have the needed fonts you can use
> e.g.
>
> (setq
> mu4e-use-fancy-chars t
> mu4e-headers-draft-mark '("D" . "๐Ÿ’ˆ")
> mu4e-headers-flagged-mark '("F" . "๐Ÿ“")
> mu4e-headers-new-mark '("N" . "๐Ÿ”ฅ")
> mu4e-headers-passed-mark '("P" . "โฏ")
> mu4e-headers-replied-mark '("R" . "โฎ")
> mu4e-headers-seen-mark '("S" . "โ˜‘")
> mu4e-headers-trashed-mark '("T" . "๐Ÿ’€")
> mu4e-headers-attach-mark '("a" . "๐Ÿ“Ž")
> mu4e-headers-encrypted-mark '("x" . "๐Ÿ”’")
> mu4e-headers-signed-mark '("s" . "๐Ÿ”‘")
> mu4e-headers-unread-mark '("u" . "โŽ•")
> mu4e-headers-list-mark '("s" . "๐Ÿ”ˆ")
> mu4e-headers-personal-mark '("p" . "๐Ÿ‘จ")
> mu4e-headers-calendar-mark '("c" . "๐Ÿ“…"))
>
> anyway, there's not too much left to do for 1.8 it seems, as in "small
> things to fix"; so that'll be something for post-1.8.
>
> So if there is some catastrophic bug still, now is a good time to speak
> up, thanks!
>

Thanks Dirk. RUnning it now and it looks good. Appreciate all your hard
work with this.

Eduardo Mercovich

unread,
Jun 25, 2022, 11:02:15โ€ฏAM6/25/22
to mu-di...@googlegroups.com, Dirk-Jan C. Binnema
Hi Dirk.

> I just pushed 1.7.28 [...]

As always, just a big thank you for sharing all your great work. :)

Warm regards...


--
Eduardo Mercovich

Donde se cruzan tus talentos
con las necesidades del mundo,
ahรญ estรก tu vocaciรณn.
(Anรณnimo)
Reply all
Reply to author
Forward
0 new messages