]> git.cworth.org Git - notmuch-wiki/blob - bugs.mdwn
bugs: query debugging
[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 ## Troubleshooting the Emacs interface
15
16 It's very easy for Emacs packages to interfere with each other. For
17 this reason we ask you to try and find the problem with only notmuch
18 loaded.  You can do this with
19
20     emacs -Q -L /path/to/your/notmuch/lisp --eval "(require 'notmuch)"
21
22 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.
23
24     M-x notmuch
25
26 or
27
28     M-x notmuch-mua-mail
29
30 ## Bug and patch tracking
31
32 Bug reports should be sent to the Notmuch mailing list notmuch@notmuchmail.org.
33
34 Bugs are tracked using a collaborative tagging tool call [[nmbug]].
35 If you submit lots of bugs and/or patches, you may want become
36 involved with this tagging process, but feel free to just send mail to
37 the list; someone will tag messages appropriately.  The status of bugs
38 and current patches can also be followed
39 [online](http://nmbug.notmuchmail.org/status).
40
41 ## Debugging Queries
42
43 If a search doesn't seem to do what you want, you can enable query debugging to
44 print the Xapian queries the Notmuch library constructs by setting the
45 `NOTMUCH_DEBUG_QUERY` environment variable to a non-empty value.
46
47 For example:
48
49         $ NOTMUCH_DEBUG_QUERY=1 notmuch search big brown fox
50         Query string is:
51         big brown fox
52         Exclude query is:
53         Xapian::Query()
54         Final query is:
55         Xapian::Query((Tmail AND Zbig:(pos=1) AND Zbrown:(pos=2) AND Zfox:(pos=3)))