13 Using mu’s SCM/Guile integration

With version 1.12.12, mu gained bindings for the SCM/Guile programming language, called mu-scm, with its own manual (mu-scm) Top20. You can check if your mu includes the support by checking the output of mu info, which should say something like:

| scm-support      | yes     |

If you have the support, mu4e you can connect to this “REPL” directly, which uses the same database/store instance that mu4e uses.

Assuming your mu supports scm, there are two steps:

After that, (re)start mu4e, and you should be able to invoke M-x mu4e-mu-scm-repl, and be switched to a buffer to interact with the REPL.

GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.
[...]
Enter `,help' for help.
scheme@(guile-user)> (let ((message (car (mfind "mu4e"))))
                       (format #t "Subject: ~a\n" (subject message)))
Subject: Re: Custom header in message view
$8 = #t
scheme@(guile-user)>

A discussion of the capabilities of mu-scm goes far beyond this manual, so please refer to (mu-scm)Top for that.


Footnotes

(20)

These replace long-deprecated older bindings