logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mu-server - the mu backend for the mu4e e-mail client

Author

       Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>

Common Options

-d,--debug
       Makes mu generate extra debug information, useful for debugging the  program  itself.  Debug  information
       goes to the standard logging location; see mu(1).

   -q,--quiet
       Causes  mu  not to output informational messages and progress information to standard output, but only to
       the log file. Error messages will still be sent to standard error. Note that muindex is much faster with
       --quiet, so it is recommended you use this option when using mu from scripts etc.

   --log-stderr
       Causes mu to not output log messages to standard error, in addition  to  sending  them  to  the  standard
       logging location.

   --nocolor
       Do not use ANSI colors. The environment variable NO_COLOR can be used as an alternative to --nocolor.

   -V,--version
       Prints mu version and copyright information.

   -h,--help
       Lists the various command line options.

Description

muserver starts a simple shell in which one can query and manipulate the mu database. The output uses s-
       expressions.  muserver  is  not  meant for use by humans, except for debugging purposes. Instead, it is
       designed specifically for the mu4e e-mail client.

              (<command-name> :param1 value1 :param2 value2)

       For example, to view a certain message, the command would be:

              (view :docid 12345)

       Parameters can be sent in any order; they must be of the correct  type  though.   See  lib/utils/mu-sexp-parser.hh and lib/utils/mu-sexp-parser.cc in source-tree for the details.

Name

       mu-server - the mu backend for the mu4e e-mail client

Output Format

muserver accepts a number of commands, and delivers its results in the form:

              \\376<length>\\377<s-expr>

       \376  (one  byte  0xfe),  followed  by the length of the s-expression expressed as an hexadecimal number,
       followed by another \377 (one byte 0xff), followed by the actual s-expression.

       By prefixing the expression with its length, it can be processed more efficiently. The \376 and \377 were
       chosen since they never occur in valid UTF-8 (in which the s-expressions are encoded).

Performance

       As an indication for the relative performance, we can simulate something mu4e does; we take overall  time
       of 50 such requests:

              timebuild/mu/muserver--allow-temp-file--eval'(find:query"\"\"":include-relatedt:threadst:maxnum50000)'>/dev/null

       (and --allow-temp-file for 1.11)

                                            ┌────────────────────────────┐
                                            │       release   time (sec) │
                                            ├────────────────────────────┤
                                            │           1.8   8.6s       │
                                            │          1.10   5.7s       │
                                            │ 1.11 (master)   2.8s       │
                                            └────────────────────────────┘

   --muhome
       Use a non-default directory to store and read the database, write the logs, etc.  By default, mu uses the
       XDG  Base  Directory  Specification  (e.g.  on  GNU/Linux this defaults to ~/.cache/mu and ~/.config/mu).
       Earlier versions of mu defaulted to ~/.mu, which now requires --muhome=~/.mu.

       The environment variable MUHOME can be used as an alternative to --muhome. The latter has precedence.

Reporting Bugs

       Please report bugs at https://github.com/djcb/mu/issues.

See Also

mu(1)

                                                                                                    MU-SERVER(1)

Server Options

--commands
       List available commands (and try with --verbose).

   --evalexpression
       Evaluate a mu4e server s-expression.

   --allow-temp-file
       If set, allow for the output of some commands to use temp-files rather than directly  through  the  emacs
       process  input/output.  This  is  noticeably  faster for commands with a lot of output, esp. when the the
       temp-file uses a in-memory file-system.

Synopsis

mu [COMMON-OPTIONS] server

See Also