]> git.cworth.org Git - notmuch-wiki/blob - bugs.mdwn
fix link
[notmuch-wiki] / bugs.mdwn
1 [[!img notmuch-logo.png alt="Notmuch logo" class="left"]]
2 # Troubleshooting and Bug Reporting
3
4 [[!toc levels=2]]
5
6 ## Deciding what level the problem lives at
7
8 If you are experiencing a crash or very slow performance with a
9 particular query, please try it on the command line using "notmuch
10 search" or "notmuch show"; it's easier for us to debug if the problem
11 is there, and it's useful to know if the problem is introduced by a
12 front end.
13
14 ## Understanding the structure of a problematic message
15
16 The script
17 [print-mime-structure](https://git.spwhitton.name/mailscripts/plain/email-print-mime-structure)
18 prints out the mime structure of an email message as a (text)
19 tree. This is usually safe to share and can help people understand
20 your problem.
21
22 ## Troubleshooting the Emacs interface
23
24 It's very easy for Emacs packages to interfere with each other. For
25 this reason we ask you to try and find the problem with only notmuch
26 loaded.  You can do this with
27
28     emacs -Q -L /path/to/your/notmuch/lisp --eval "(require 'notmuch)"
29
30 where `/path/to/your/notmuch/lisp` is either to the emacs directory in the source, or the installed (and possibly compiled) version installed by your package manager, e.g. `/usr/share/emacs/site-lisp/notmuch`.  After Emacs starts, run the command that is giving you trouble using e.g.
31
32     M-x notmuch
33
34 or
35
36     M-x notmuch-mua-mail
37
38 ## Bug and patch tracking
39
40 Bug reports should be sent to the Notmuch mailing list notmuch@notmuchmail.org.
41
42 Bugs are tracked using a collaborative tagging tool call [[nmbug]].
43 If you submit lots of bugs and/or patches, you may want become
44 involved with this tagging process, but feel free to just send mail to
45 the list; someone will tag messages appropriately.  The status of bugs
46 and current patches can also be followed
47 [online](https://nmbug.notmuchmail.org/status).
48
49 ## Debugging Queries
50
51 If a search doesn't seem to do what you want, you can enable query debugging to
52 print the Xapian queries the Notmuch library constructs by setting the
53 `NOTMUCH_DEBUG_QUERY` environment variable to a non-empty value.
54
55 For example:
56
57         $ NOTMUCH_DEBUG_QUERY=1 notmuch search big brown fox
58         Query string is:
59         big brown fox
60         Exclude query is:
61         Xapian::Query()
62         Final query is:
63         Xapian::Query((Tmail AND Zbig:(pos=1) AND Zbrown:(pos=2) AND Zfox:(pos=3)))
64
65 ## Rescuing your tags.
66
67 If you're database is corrupt and you don't have a backup, a modified version of [xapian-check](https://git.xapian.org/?p=xapian;a=blob;f=README.notmuch;hb=refs/heads/notmuch-tag-rescue-hack) might still save your tags.
68