]> git.notmuchmail.org Git - notmuch/blob - doc/notmuch-emacs.rst
doc: added 'Init File' section to notmuch-emacs info source
[notmuch] / doc / notmuch-emacs.rst
1 =============
2 notmuch-emacs
3 =============
4
5 About this Manual
6 =================
7
8 This manual covers only the Emacs interface to Notmuch. For information
9 on the command line interface, see See section “Description” in Notmuch
10 Manual Pager. To save typing, we will sometimes use *notmuch* in this
11 manual to refer to the Emacs interface to Notmuch. If the distinction
12 should every be important, we’ll refer to the Emacs interface as
13 *notmuch-emacs*.
14
15 Notmuch-emacs is highly customizable via the the Emacs customization
16 framework (or just by setting the appropriate variables). We try to
17 point out relevant variables in this manual, but in order to avoid
18 duplication of information, but you can usually find the most detailed
19 description in the variables docstring.
20
21 notmuch-hello
22 =============
23
24 .. index::
25    single: notmuch-hello
26    single: notmuch
27
28 ``notmuch-hello`` is the main entry point for Notmuch. You can start it
29 with ``M-x notmuch`` or ``M-x notmuch-hello``. The startup screen looks
30 something like the following. There are some hints at the bottom of the
31 screen. There are three main parts to the notmuch-hello screen,
32 discussed below. The **bold** text indicates buttons you can click with
33 a mouse or by positioning the cursor and pressing ``<return>``
34
35 |   Welcome to **notmuch** You have 52 messages.
36 |
37 | Saved searches: **[edit]**
38 |
39 |         52 **inbox**           52 **unread**
40 |
41 | Search: ____________________________________
42 |
43 | All tags: **[show]**
44 |
45 |        Type a search query and hit RET to view matching threads.
46 |               Edit saved searches with the ``edit`` button.
47 | Hit RET or click on a saved search or tag name to view matching threads.
48 |     ``=`` to refresh this screen. ``s`` to search messages. ``q`` to quit.
49 |                   **Customize** this page.
50
51 You can change the overall appearance of the notmuch-hello screen by
52 customizing the variable :index:`notmuch-hello-sections`.
53
54
55
56 notmuch-hello key bindings
57 --------------------------
58
59 ``<tab>``
60     Move to the next widget (button or text entry field)
61
62 ``<backspace>``
63     Move to the previous widget.
64
65 ``<return>``
66     Activate the current widget.
67
68 ``=``
69     Refresh the buffer; mainly update the counts of messages for various
70     saved searches.
71
72 ``G``
73     Import mail, See :ref:`importing`
74
75 ``m``
76     Compose a message
77
78 ``s``
79     Search the notmuch database using :ref:`notmuch-search`
80
81 ``v``
82     Print notmuch version
83
84 ``q``
85     Quit
86
87 .. _saved-searches:
88
89 Saved Searches
90 --------------
91
92 Notmuch replaces the static assignment of messages with the more dynamic
93 notion of searching. Notmuch-hello presents the user with a customizable
94 set of saved searches. The initial defaults are ``tag:inbox`` and
95 ``tag:unread``, but you can customize the following variables
96
97 :index:`notmuch-saved-searches`
98     A list of cons pairs, the first being the name to display, the
99     second being a query string for Notmuch. See section “Description”
100     in Notmuch Query Syntax.
101
102 :index:`notmuch-saved-searches-sort-function`
103     This variable controls how saved searches should be sorted. A value
104     of ``nil`` displays the saved searches in the order they are stored
105     in ‘notmuch-saved-searches’.
106
107 :index:`notmuch-column-control`
108     Controls the number of columns for displaying saved-searches/tags
109
110 Search Box
111 ----------
112
113 The search box lets the user enter a Notmuch query. See section
114 “Description” in Notmuch Query Syntax, for more info on Notmuch query
115 syntax. A history of recent searches is also displayed by default. The
116 latter is controlled by the variable :index:`notmuch-hello-recent-searches-max`.
117
118 Known Tags
119 ----------
120
121 One special kind of saved search provided by default is for each
122 individual tag defined in the database. This can be controlled via the
123 following variables.
124
125 :index:`notmuch-hello-tag-list-make-query`
126     Control how to construct a search (“virtual folder”) from a given
127     tag.
128
129 :index:`notmuch-hello-hide-tags`
130     Which tags not to display at all.
131
132 :index:`notmuch-column-control`
133     Controls the number of columns for displaying saved-searches/tags
134
135 .. _notmuch-search:
136
137 notmuch-search
138 ==============
139
140 ``notmuch-search-mode`` is used to display the results from executing
141 a query via ``notmuch-search``. The syntax for these queries is the
142 the same as :ref:`saved-searches`. For details of this syntax see
143 info:notmuch-search-terms
144
145 By default the output approximates that of the command line See section
146 “Description” in notmuch search command.
147
148 The main purpose of the ``notmuch-search-mode`` buffer is to act as a
149 menu of results that the user can explore further by pressing
150 ``<return>`` on the appropriate line.
151
152 ``n,C-n,<down>``
153     Move to next line
154
155 ``p,C-p,<up>``
156     Move to previous line
157
158 ``<return>``
159     Open thread on current line in :ref:`notmuch-show` mode
160
161 ``?``
162     Display full set of key bindings
163
164 The presentation of results can be controlled by the following
165 variables.
166
167 :index:`notmuch-search-result-format`
168     Control how each thread of messages is presented in the
169     ``notmuch-show-mode`` buffer
170
171 :index:`notmuch-search-oldest-first`
172     Display the oldest threads at the top of the buffer
173
174 .. _notmuch-show:
175
176 notmuch-show
177 ============
178
179 notmuch-tree
180 ============
181
182 Configuration
183 =============
184
185 .. _importing:
186
187 Importing Mail
188 --------------
189
190 :index:`notmuch-poll`
191
192 :index:`notmuch-poll-script`
193
194 Init File
195 ---------
196
197 When Notmuch is loaded, it will read the ``notmuch-init-file``
198 (``~/.emacs.d/notmuch-config`` by default) file. This is normal Emacs Lisp
199 file and can be used to avoid cluttering your ``~/.emacs`` with Notmuch
200 stuff. If the file with ``.elc``, ``.elc.gz``, ``.el`` or ``.el.gz``
201 suffix exist it will be read instead (just one of these, chosen in this
202 order). Most often users create ``~/.emacs.d/notmuch-config.el`` and just
203 work with it. If Emacs was invoked with the ``-q`` or ``--no-init-file``
204 options, ``notmuch-init-file`` is not read.