diff options
| -rw-r--r-- | doc/misc/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/misc/gnus.texi | 1756 |
2 files changed, 1053 insertions, 707 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 68895409743..c26b3872c03 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-12-13 Andrew Cohen <cohen@andy.bu.edu> | ||
| 2 | |||
| 3 | * gnus.texi: First pass at adding (rough) nnir documentation. | ||
| 4 | |||
| 1 | 2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | 5 | 2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 6 | ||
| 3 | * gnus.texi (Filtering New Groups): Mention | 7 | * gnus.texi (Filtering New Groups): Mention |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 3ddfb1a6448..d413d13d65a 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -407,6 +407,7 @@ This manual corresponds to Gnus v5.13 | |||
| 407 | * Composing Messages:: Information on sending mail and news. | 407 | * Composing Messages:: Information on sending mail and news. |
| 408 | * Select Methods:: Gnus reads all messages from various select methods. | 408 | * Select Methods:: Gnus reads all messages from various select methods. |
| 409 | * Scoring:: Assigning values to articles. | 409 | * Scoring:: Assigning values to articles. |
| 410 | * Searching:: Mail and News search engines. | ||
| 410 | * Various:: General purpose settings. | 411 | * Various:: General purpose settings. |
| 411 | * The End:: Farewell and goodbye. | 412 | * The End:: Farewell and goodbye. |
| 412 | * Appendices:: Terminology, Emacs intro, @acronym{FAQ}, History, Internals. | 413 | * Appendices:: Terminology, Emacs intro, @acronym{FAQ}, History, Internals. |
| @@ -785,6 +786,21 @@ Advanced Scoring | |||
| 785 | * Advanced Scoring Examples:: What they look like. | 786 | * Advanced Scoring Examples:: What they look like. |
| 786 | * Advanced Scoring Tips:: Getting the most out of it. | 787 | * Advanced Scoring Tips:: Getting the most out of it. |
| 787 | 788 | ||
| 789 | Searching | ||
| 790 | |||
| 791 | * nnir:: Searching with various engines. | ||
| 792 | * nnmairix:: Searching with Mairix. | ||
| 793 | |||
| 794 | nnir | ||
| 795 | |||
| 796 | * What is nnir:: What does nnir do. | ||
| 797 | * Basic Usage:: How to perform simple searches. | ||
| 798 | * Setting up nnir:: How to set up nnir. | ||
| 799 | |||
| 800 | Setting up nnir | ||
| 801 | |||
| 802 | * Associating Engines:: How to associate engines. | ||
| 803 | |||
| 788 | Various | 804 | Various |
| 789 | 805 | ||
| 790 | * Process/Prefix:: A convention used by many treatment commands. | 806 | * Process/Prefix:: A convention used by many treatment commands. |
| @@ -1660,7 +1676,6 @@ long as Gnus is active. | |||
| 1660 | * Exiting Gnus:: Stop reading news and get some work done. | 1676 | * Exiting Gnus:: Stop reading news and get some work done. |
| 1661 | * Group Topics:: A folding group mode divided into topics. | 1677 | * Group Topics:: A folding group mode divided into topics. |
| 1662 | * Non-ASCII Group Names:: Accessing groups of non-English names. | 1678 | * Non-ASCII Group Names:: Accessing groups of non-English names. |
| 1663 | * Searching:: Mail search engines. | ||
| 1664 | * Misc Group Stuff:: Other stuff that you can to do. | 1679 | * Misc Group Stuff:: Other stuff that you can to do. |
| 1665 | @end menu | 1680 | @end menu |
| 1666 | 1681 | ||
| @@ -4282,712 +4297,6 @@ names should be the same in both groups. Otherwise the Newsgroups | |||
| 4282 | header will be displayed incorrectly in the article buffer. | 4297 | header will be displayed incorrectly in the article buffer. |
| 4283 | 4298 | ||
| 4284 | 4299 | ||
| 4285 | @node Searching | ||
| 4286 | @section Searching | ||
| 4287 | |||
| 4288 | @menu | ||
| 4289 | * nnir:: Searching on IMAP, with swish, namazu, etc. | ||
| 4290 | * nnmairix:: Searching maildir, MH or mbox with Mairix. | ||
| 4291 | @end menu | ||
| 4292 | |||
| 4293 | @cindex Searching | ||
| 4294 | |||
| 4295 | FIXME: This node is a stub. | ||
| 4296 | |||
| 4297 | FIXME: Add a brief overview of Gnus search capabilities. A brief | ||
| 4298 | comparison of nnir, nnmairix, contrib/gnus-namazu would be nice | ||
| 4299 | as well. | ||
| 4300 | |||
| 4301 | FIXME: Explain difference to @ref{Searching for Articles}, add reference | ||
| 4302 | and back-reference. | ||
| 4303 | |||
| 4304 | @node nnir | ||
| 4305 | @subsection nnir | ||
| 4306 | |||
| 4307 | FIXME: As a first step, convert the commentary of @file{nnir} to texi. | ||
| 4308 | @cindex nnir | ||
| 4309 | |||
| 4310 | @node nnmairix | ||
| 4311 | @subsection nnmairix | ||
| 4312 | |||
| 4313 | @cindex mairix | ||
| 4314 | @cindex nnmairix | ||
| 4315 | This paragraph describes how to set up mairix and the back end | ||
| 4316 | @code{nnmairix} for indexing and searching your mail from within | ||
| 4317 | Gnus. Additionally, you can create permanent ``smart'' groups which are | ||
| 4318 | bound to mairix searches and are automatically updated. | ||
| 4319 | |||
| 4320 | @menu | ||
| 4321 | * About mairix:: About the mairix mail search engine | ||
| 4322 | * nnmairix requirements:: What you will need for using nnmairix | ||
| 4323 | * What nnmairix does:: What does nnmairix actually do? | ||
| 4324 | * Setting up mairix:: Set up your mairix installation | ||
| 4325 | * Configuring nnmairix:: Set up the nnmairix back end | ||
| 4326 | * nnmairix keyboard shortcuts:: List of available keyboard shortcuts | ||
| 4327 | * Propagating marks:: How to propagate marks from nnmairix groups | ||
| 4328 | * nnmairix tips and tricks:: Some tips, tricks and examples | ||
| 4329 | * nnmairix caveats:: Some more stuff you might want to know | ||
| 4330 | @end menu | ||
| 4331 | |||
| 4332 | @c FIXME: The markup in this section might need improvement. | ||
| 4333 | @c E.g. adding @samp, @var, @file, @command, etc. | ||
| 4334 | @c Cf. (info "(texinfo)Indicating") | ||
| 4335 | |||
| 4336 | @node About mairix | ||
| 4337 | @subsubsection About mairix | ||
| 4338 | |||
| 4339 | Mairix is a tool for indexing and searching words in locally stored | ||
| 4340 | mail. It was written by Richard Curnow and is licensed under the | ||
| 4341 | GPL. Mairix comes with most popular GNU/Linux distributions, but it also | ||
| 4342 | runs under Windows (with cygwin), Mac OS X and Solaris. The homepage can | ||
| 4343 | be found at | ||
| 4344 | @uref{http://www.rpcurnow.force9.co.uk/mairix/index.html} | ||
| 4345 | |||
| 4346 | Though mairix might not be as flexible as other search tools like | ||
| 4347 | swish++ or namazu, which you can use via the @code{nnir} back end, it | ||
| 4348 | has the prime advantage of being incredibly fast. On current systems, it | ||
| 4349 | can easily search through headers and message bodies of thousands and | ||
| 4350 | thousands of mails in well under a second. Building the database | ||
| 4351 | necessary for searching might take a minute or two, but only has to be | ||
| 4352 | done once fully. Afterwards, the updates are done incrementally and | ||
| 4353 | therefore are really fast, too. Additionally, mairix is very easy to set | ||
| 4354 | up. | ||
| 4355 | |||
| 4356 | For maximum speed though, mairix should be used with mails stored in | ||
| 4357 | @code{Maildir} or @code{MH} format (this includes the @code{nnml} back | ||
| 4358 | end), although it also works with mbox. Mairix presents the search | ||
| 4359 | results by populating a @emph{virtual} maildir/MH folder with symlinks | ||
| 4360 | which point to the ``real'' message files (if mbox is used, copies are | ||
| 4361 | made). Since mairix already presents search results in such a virtual | ||
| 4362 | mail folder, it is very well suited for using it as an external program | ||
| 4363 | for creating @emph{smart} mail folders, which represent certain mail | ||
| 4364 | searches. | ||
| 4365 | |||
| 4366 | @node nnmairix requirements | ||
| 4367 | @subsubsection nnmairix requirements | ||
| 4368 | |||
| 4369 | Mairix searches local mail---that means, mairix absolutely must have | ||
| 4370 | direct access to your mail folders. If your mail resides on another | ||
| 4371 | server (e.g. an @acronym{IMAP} server) and you happen to have shell | ||
| 4372 | access, @code{nnmairix} supports running mairix remotely, e.g. via ssh. | ||
| 4373 | |||
| 4374 | Additionally, @code{nnmairix} only supports the following Gnus back | ||
| 4375 | ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}. You must use | ||
| 4376 | one of these back ends for using @code{nnmairix}. Other back ends, like | ||
| 4377 | @code{nnmbox}, @code{nnfolder} or @code{nnmh}, won't work. | ||
| 4378 | |||
| 4379 | If you absolutely must use mbox and still want to use @code{nnmairix}, | ||
| 4380 | you can set up a local @acronym{IMAP} server, which you then access via | ||
| 4381 | @code{nnimap}. This is a rather massive setup for accessing some mbox | ||
| 4382 | files, so just change to MH or Maildir already... However, if you're | ||
| 4383 | really, really passionate about using mbox, you might want to look into | ||
| 4384 | the package @file{mairix.el}, which comes with Emacs 23. | ||
| 4385 | |||
| 4386 | @node What nnmairix does | ||
| 4387 | @subsubsection What nnmairix does | ||
| 4388 | |||
| 4389 | The back end @code{nnmairix} enables you to call mairix from within Gnus, | ||
| 4390 | either to query mairix with a search term or to update the | ||
| 4391 | database. While visiting a message in the summary buffer, you can use | ||
| 4392 | several pre-defined shortcuts for calling mairix, e.g. to quickly | ||
| 4393 | search for all mails from the sender of the current message or to | ||
| 4394 | display the whole thread associated with the message, even if the | ||
| 4395 | mails are in different folders. | ||
| 4396 | |||
| 4397 | Additionally, you can create permanent @code{nnmairix} groups which are bound | ||
| 4398 | to certain mairix searches. This way, you can easily create a group | ||
| 4399 | containing mails from a certain sender, with a certain subject line or | ||
| 4400 | even for one specific thread based on the Message-ID. If you check for | ||
| 4401 | new mail in these folders (e.g. by pressing @kbd{g} or @kbd{M-g}), they | ||
| 4402 | automatically update themselves by calling mairix. | ||
| 4403 | |||
| 4404 | You might ask why you need @code{nnmairix} at all, since mairix already | ||
| 4405 | creates the group, populates it with links to the mails so that you can | ||
| 4406 | then access it with Gnus, right? Well, this @emph{might} work, but often | ||
| 4407 | does not---at least not without problems. Most probably you will get | ||
| 4408 | strange article counts, and sometimes you might see mails which Gnus | ||
| 4409 | claims have already been canceled and are inaccessible. This is due to | ||
| 4410 | the fact that Gnus isn't really amused when things are happening behind | ||
| 4411 | its back. Another problem can be the mail back end itself, e.g. if you | ||
| 4412 | use mairix with an @acronym{IMAP} server (I had Dovecot complaining | ||
| 4413 | about corrupt index files when mairix changed the contents of the search | ||
| 4414 | group). Using @code{nnmairix} should circumvent these problems. | ||
| 4415 | |||
| 4416 | @code{nnmairix} is not really a mail back end---it's actually more like | ||
| 4417 | a wrapper, sitting between a ``real'' mail back end where mairix stores | ||
| 4418 | the searches and the Gnus front end. You can choose between three | ||
| 4419 | different mail back ends for the mairix folders: @code{nnml}, | ||
| 4420 | @code{nnmaildir} or @code{nnimap}. @code{nnmairix} will call the mairix | ||
| 4421 | binary so that the search results are stored in folders named | ||
| 4422 | @code{zz_mairix-<NAME>-<NUMBER>} on this mail back end, but it will | ||
| 4423 | present these folders in the Gnus front end only with @code{<NAME>}. | ||
| 4424 | You can use an existing mail back end where you already store your mail, | ||
| 4425 | but if you're uncomfortable with @code{nnmairix} creating new mail | ||
| 4426 | groups alongside your other mail, you can also create e.g. a new | ||
| 4427 | @code{nnmaildir} or @code{nnml} server exclusively for mairix, but then | ||
| 4428 | make sure those servers do not accidentally receive your new mail | ||
| 4429 | (@pxref{nnmairix caveats}). A special case exists if you want to use | ||
| 4430 | mairix remotely on an IMAP server with @code{nnimap}---here the mairix | ||
| 4431 | folders and your other mail must be on the same @code{nnimap} back end. | ||
| 4432 | |||
| 4433 | @node Setting up mairix | ||
| 4434 | @subsubsection Setting up mairix | ||
| 4435 | |||
| 4436 | First: create a backup of your mail folders (@pxref{nnmairix caveats}). | ||
| 4437 | |||
| 4438 | Setting up mairix is easy: simply create a @file{.mairixrc} file with | ||
| 4439 | (at least) the following entries: | ||
| 4440 | |||
| 4441 | @example | ||
| 4442 | # Your Maildir/MH base folder | ||
| 4443 | base=~/Maildir | ||
| 4444 | @end example | ||
| 4445 | |||
| 4446 | This is the base folder for your mails. All the following directories | ||
| 4447 | are relative to this base folder. If you want to use @code{nnmairix} | ||
| 4448 | with @code{nnimap}, this base directory has to point to the mail | ||
| 4449 | directory where the @acronym{IMAP} server stores the mail folders! | ||
| 4450 | |||
| 4451 | @example | ||
| 4452 | maildir= ... your maildir folders which should be indexed ... | ||
| 4453 | mh= ... your nnml/mh folders which should be indexed ... | ||
| 4454 | mbox = ... your mbox files which should be indexed ... | ||
| 4455 | @end example | ||
| 4456 | |||
| 4457 | This specifies all your mail folders and mbox files (relative to the | ||
| 4458 | base directory!) you want to index with mairix. Note that the | ||
| 4459 | @code{nnml} back end saves mails in MH format, so you have to put those | ||
| 4460 | directories in the @code{mh} line. See the example at the end of this | ||
| 4461 | section and mairixrc's man-page for further details. | ||
| 4462 | |||
| 4463 | @example | ||
| 4464 | omit=zz_mairix-* | ||
| 4465 | @end example | ||
| 4466 | |||
| 4467 | @vindex nnmairix-group-prefix | ||
| 4468 | This should make sure that you don't accidentally index the mairix | ||
| 4469 | search results. You can change the prefix of these folders with the | ||
| 4470 | variable @code{nnmairix-group-prefix}. | ||
| 4471 | |||
| 4472 | @example | ||
| 4473 | mformat= ... 'maildir' or 'mh' ... | ||
| 4474 | database= ... location of database file ... | ||
| 4475 | @end example | ||
| 4476 | |||
| 4477 | The @code{format} setting specifies the output format for the mairix | ||
| 4478 | search folder. Set this to @code{mh} if you want to access search results | ||
| 4479 | with @code{nnml}. Otherwise choose @code{maildir}. | ||
| 4480 | |||
| 4481 | To summarize, here is my shortened @file{.mairixrc} file as an example: | ||
| 4482 | |||
| 4483 | @example | ||
| 4484 | base=~/Maildir | ||
| 4485 | maildir=.personal:.work:.logcheck:.sent | ||
| 4486 | mh=../Mail/nnml/*... | ||
| 4487 | mbox=../mboxmail/mailarchive_year* | ||
| 4488 | mformat=maildir | ||
| 4489 | omit=zz_mairix-* | ||
| 4490 | database=~/.mairixdatabase | ||
| 4491 | @end example | ||
| 4492 | |||
| 4493 | In this case, the base directory is @file{~/Maildir}, where all my Maildir | ||
| 4494 | folders are stored. As you can see, the folders are separated by | ||
| 4495 | colons. If you wonder why every folder begins with a dot: this is | ||
| 4496 | because I use Dovecot as @acronym{IMAP} server, which again uses | ||
| 4497 | @code{Maildir++} folders. For testing nnmairix, I also have some | ||
| 4498 | @code{nnml} mail, which is saved in @file{~/Mail/nnml}. Since this has | ||
| 4499 | to be specified relative to the @code{base} directory, the @code{../Mail} | ||
| 4500 | notation is needed. Note that the line ends in @code{*...}, which means | ||
| 4501 | to recursively scan all files under this directory. Without the three | ||
| 4502 | dots, the wildcard @code{*} will not work recursively. I also have some | ||
| 4503 | old mbox files with archived mail lying around in @file{~/mboxmail}. | ||
| 4504 | The other lines should be obvious. | ||
| 4505 | |||
| 4506 | See the man page for @code{mairixrc} for details and further options, | ||
| 4507 | especially regarding wildcard usage, which may be a little different | ||
| 4508 | than you are used to. | ||
| 4509 | |||
| 4510 | Now simply call @code{mairix} to create the index for the first time. | ||
| 4511 | Note that this may take a few minutes, but every following index will do | ||
| 4512 | the updates incrementally and hence is very fast. | ||
| 4513 | |||
| 4514 | @node Configuring nnmairix | ||
| 4515 | @subsubsection Configuring nnmairix | ||
| 4516 | |||
| 4517 | In group mode, type @kbd{G b c} | ||
| 4518 | (@code{nnmairix-create-server-and-default-group}). This will ask you for all | ||
| 4519 | necessary information and create a @code{nnmairix} server as a foreign | ||
| 4520 | server. You will have to specify the following: | ||
| 4521 | |||
| 4522 | @itemize @bullet | ||
| 4523 | |||
| 4524 | @item | ||
| 4525 | The @strong{name} of the @code{nnmairix} server---choose whatever you | ||
| 4526 | want. | ||
| 4527 | |||
| 4528 | @item | ||
| 4529 | The name of the @strong{back end server} where mairix should store its | ||
| 4530 | searches. This must be a full server name, like @code{nnml:mymail}. | ||
| 4531 | Just hit @kbd{TAB} to see the available servers. Currently, servers | ||
| 4532 | which are accessed through @code{nnmaildir}, @code{nnimap} and | ||
| 4533 | @code{nnml} are supported. As explained above, for locally stored | ||
| 4534 | mails, this can be an existing server where you store your mails. | ||
| 4535 | However, you can also create e.g. a new @code{nnmaildir} or @code{nnml} | ||
| 4536 | server exclusively for @code{nnmairix} in your secondary select methods | ||
| 4537 | (@pxref{Finding the News}). If you use a secondary @code{nnml} server | ||
| 4538 | just for mairix, make sure that you explicitly set the server variable | ||
| 4539 | @code{nnml-get-new-mail} to @code{nil}, or you might lose mail | ||
| 4540 | (@pxref{nnmairix caveats}). If you want to use mairix remotely on an | ||
| 4541 | @acronym{IMAP} server, you have to choose the corresponding | ||
| 4542 | @code{nnimap} server here. | ||
| 4543 | |||
| 4544 | @item | ||
| 4545 | @vindex nnmairix-mairix-search-options | ||
| 4546 | The @strong{command} to call the mairix binary. This will usually just | ||
| 4547 | be @code{mairix}, but you can also choose something like @code{ssh | ||
| 4548 | SERVER mairix} if you want to call mairix remotely, e.g. on your | ||
| 4549 | @acronym{IMAP} server. If you want to add some default options to | ||
| 4550 | mairix, you could do this here, but better use the variable | ||
| 4551 | @code{nnmairix-mairix-search-options} instead. | ||
| 4552 | |||
| 4553 | @item | ||
| 4554 | The name of the @strong{default search group}. This will be the group | ||
| 4555 | where all temporary mairix searches are stored, i.e. all searches which | ||
| 4556 | are not bound to permanent @code{nnmairix} groups. Choose whatever you | ||
| 4557 | like. | ||
| 4558 | |||
| 4559 | @item | ||
| 4560 | If the mail back end is @code{nnimap} or @code{nnmaildir}, you will be | ||
| 4561 | asked if you work with @strong{Maildir++}, i.e. with hidden maildir | ||
| 4562 | folders (=beginning with a dot). For example, you have to answer | ||
| 4563 | @samp{yes} here if you work with the Dovecot @acronym{IMAP} | ||
| 4564 | server. Otherwise, you should answer @samp{no} here. | ||
| 4565 | |||
| 4566 | @end itemize | ||
| 4567 | |||
| 4568 | @node nnmairix keyboard shortcuts | ||
| 4569 | @subsubsection nnmairix keyboard shortcuts | ||
| 4570 | |||
| 4571 | In group mode: | ||
| 4572 | |||
| 4573 | @table @kbd | ||
| 4574 | |||
| 4575 | @item G b c | ||
| 4576 | @kindex G b c (Group) | ||
| 4577 | @findex nnmairix-create-server-and-default-group | ||
| 4578 | Creates @code{nnmairix} server and default search group for this server | ||
| 4579 | (@code{nnmairix-create-server-and-default-group}). You should have done | ||
| 4580 | this by now (@pxref{Configuring nnmairix}). | ||
| 4581 | |||
| 4582 | @item G b s | ||
| 4583 | @kindex G b s (Group) | ||
| 4584 | @findex nnmairix-search | ||
| 4585 | Prompts for query which is then sent to the mairix binary. Search | ||
| 4586 | results are put into the default search group which is automatically | ||
| 4587 | displayed (@code{nnmairix-search}). | ||
| 4588 | |||
| 4589 | @item G b m | ||
| 4590 | @kindex G b m (Group) | ||
| 4591 | @findex nnmairix-widget-search | ||
| 4592 | Allows you to create a mairix search or a permanent group more | ||
| 4593 | comfortably using graphical widgets, similar to a customization | ||
| 4594 | group. Just try it to see how it works (@code{nnmairix-widget-search}). | ||
| 4595 | |||
| 4596 | @item G b i | ||
| 4597 | @kindex G b i (Group) | ||
| 4598 | @findex nnmairix-search-interactive | ||
| 4599 | Another command for creating a mairix query more comfortably, but uses | ||
| 4600 | only the minibuffer (@code{nnmairix-search-interactive}). | ||
| 4601 | |||
| 4602 | @item G b g | ||
| 4603 | @kindex G b g (Group) | ||
| 4604 | @findex nnmairix-create-search-group | ||
| 4605 | Creates a permanent group which is associated with a search query | ||
| 4606 | (@code{nnmairix-create-search-group}). The @code{nnmairix} back end | ||
| 4607 | automatically calls mairix when you update this group with @kbd{g} or | ||
| 4608 | @kbd{M-g}. | ||
| 4609 | |||
| 4610 | @item G b q | ||
| 4611 | @kindex G b q (Group) | ||
| 4612 | @findex nnmairix-group-change-query-this-group | ||
| 4613 | Changes the search query for the @code{nnmairix} group under cursor | ||
| 4614 | (@code{nnmairix-group-change-query-this-group}). | ||
| 4615 | |||
| 4616 | @item G b t | ||
| 4617 | @kindex G b t (Group) | ||
| 4618 | @findex nnmairix-group-toggle-threads-this-group | ||
| 4619 | Toggles the 'threads' parameter for the @code{nnmairix} group under cursor, | ||
| 4620 | i.e. if you want see the whole threads of the found messages | ||
| 4621 | (@code{nnmairix-group-toggle-threads-this-group}). | ||
| 4622 | |||
| 4623 | @item G b u | ||
| 4624 | @kindex G b u (Group) | ||
| 4625 | @findex nnmairix-update-database | ||
| 4626 | @vindex nnmairix-mairix-update-options | ||
| 4627 | Calls mairix binary for updating the database | ||
| 4628 | (@code{nnmairix-update-database}). The default parameters are @code{-F} | ||
| 4629 | and @code{-Q} for making this as fast as possible (see variable | ||
| 4630 | @code{nnmairix-mairix-update-options} for defining these default | ||
| 4631 | options). | ||
| 4632 | |||
| 4633 | @item G b r | ||
| 4634 | @kindex G b r (Group) | ||
| 4635 | @findex nnmairix-group-toggle-readmarks-this-group | ||
| 4636 | Keep articles in this @code{nnmairix} group always read or unread, or leave the | ||
| 4637 | marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}). | ||
| 4638 | |||
| 4639 | @item G b d | ||
| 4640 | @kindex G b d (Group) | ||
| 4641 | @findex nnmairix-group-delete-recreate-this-group | ||
| 4642 | Recreate @code{nnmairix} group on the ``real'' mail back end | ||
| 4643 | (@code{nnmairix-group-delete-recreate-this-group}). You can do this if | ||
| 4644 | you always get wrong article counts with a @code{nnmairix} group. | ||
| 4645 | |||
| 4646 | @item G b a | ||
| 4647 | @kindex G b a (Group) | ||
| 4648 | @findex nnmairix-group-toggle-allowfast-this-group | ||
| 4649 | Toggles the @code{allow-fast} parameters for group under cursor | ||
| 4650 | (@code{nnmairix-group-toggle-allowfast-this-group}). The default | ||
| 4651 | behavior of @code{nnmairix} is to do a mairix search every time you | ||
| 4652 | update or enter the group. With the @code{allow-fast} parameter set, | ||
| 4653 | mairix will only be called when you explicitly update the group, but not | ||
| 4654 | upon entering. This makes entering the group faster, but it may also | ||
| 4655 | lead to dangling symlinks if something changed between updating and | ||
| 4656 | entering the group which is not yet in the mairix database. | ||
| 4657 | |||
| 4658 | @item G b p | ||
| 4659 | @kindex G b p (Group) | ||
| 4660 | @findex nnmairix-group-toggle-propmarks-this-group | ||
| 4661 | Toggle marks propagation for this group | ||
| 4662 | (@code{nnmairix-group-toggle-propmarks-this-group}). (@pxref{Propagating | ||
| 4663 | marks}). | ||
| 4664 | |||
| 4665 | @item G b o | ||
| 4666 | @kindex G b o (Group) | ||
| 4667 | @findex nnmairix-propagate-marks | ||
| 4668 | Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when | ||
| 4669 | @code{nnmairix-propagate-marks-upon-close} is set to @code{nil}. | ||
| 4670 | |||
| 4671 | @end table | ||
| 4672 | |||
| 4673 | In summary mode: | ||
| 4674 | |||
| 4675 | @table @kbd | ||
| 4676 | |||
| 4677 | @item $ m | ||
| 4678 | @kindex $ m (Summary) | ||
| 4679 | @findex nnmairix-widget-search-from-this-article | ||
| 4680 | Allows you to create a mairix query or group based on the current | ||
| 4681 | message using graphical widgets (same as @code{nnmairix-widget-search}) | ||
| 4682 | (@code{nnmairix-widget-search-from-this-article}). | ||
| 4683 | |||
| 4684 | @item $ g | ||
| 4685 | @kindex $ g (Summary) | ||
| 4686 | @findex nnmairix-create-search-group-from-message | ||
| 4687 | Interactively creates a new search group with query based on the current | ||
| 4688 | message, but uses the minibuffer instead of graphical widgets | ||
| 4689 | (@code{nnmairix-create-search-group-from-message}). | ||
| 4690 | |||
| 4691 | @item $ t | ||
| 4692 | @kindex $ t (Summary) | ||
| 4693 | @findex nnmairix-search-thread-this-article | ||
| 4694 | Searches thread for the current article | ||
| 4695 | (@code{nnmairix-search-thread-this-article}). This is effectively a | ||
| 4696 | shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the | ||
| 4697 | current article and enabled threads. | ||
| 4698 | |||
| 4699 | @item $ f | ||
| 4700 | @kindex $ f (Summary) | ||
| 4701 | @findex nnmairix-search-from-this-article | ||
| 4702 | Searches all messages from sender of the current article | ||
| 4703 | (@code{nnmairix-search-from-this-article}). This is a shortcut for | ||
| 4704 | calling @code{nnmairix-search} with @samp{f:From}. | ||
| 4705 | |||
| 4706 | @item $ o | ||
| 4707 | @kindex $ o (Summary) | ||
| 4708 | @findex nnmairix-goto-original-article | ||
| 4709 | (Only in @code{nnmairix} groups!) Tries determine the group this article | ||
| 4710 | originally came from and displays the article in this group, so that | ||
| 4711 | e.g. replying to this article the correct posting styles/group | ||
| 4712 | parameters are applied (@code{nnmairix-goto-original-article}). This | ||
| 4713 | function will use the registry if available, but can also parse the | ||
| 4714 | article file name as a fallback method. | ||
| 4715 | |||
| 4716 | @item $ u | ||
| 4717 | @kindex $ u (Summary) | ||
| 4718 | @findex nnmairix-remove-tick-mark-original-article | ||
| 4719 | Remove possibly existing tick mark from original article | ||
| 4720 | (@code{nnmairix-remove-tick-mark-original-article}). (@pxref{nnmairix | ||
| 4721 | tips and tricks}). | ||
| 4722 | |||
| 4723 | @end table | ||
| 4724 | |||
| 4725 | @node Propagating marks | ||
| 4726 | @subsubsection Propagating marks | ||
| 4727 | |||
| 4728 | First of: you really need a patched mairix binary for using the marks | ||
| 4729 | propagation feature efficiently. Otherwise, you would have to update | ||
| 4730 | the mairix database all the time. You can get the patch at | ||
| 4731 | |||
| 4732 | @uref{http://www.randomsample.de/mairix-maildir-patch.tar} | ||
| 4733 | |||
| 4734 | You need the mairix v0.21 source code for this patch; everything else | ||
| 4735 | is explained in the accompanied readme file. If you don't want to use | ||
| 4736 | marks propagation, you don't have to apply these patches, but they also | ||
| 4737 | fix some annoyances regarding changing maildir flags, so it might still | ||
| 4738 | be useful to you. | ||
| 4739 | |||
| 4740 | With the patched mairix binary, you can use @code{nnmairix} as an | ||
| 4741 | alternative to mail splitting (@pxref{Fancy Mail Splitting}). For | ||
| 4742 | example, instead of splitting all mails from @samp{david@@foobar.com} | ||
| 4743 | into a group, you can simply create a search group with the query | ||
| 4744 | @samp{f:david@@foobar.com}. This is actually what ``smart folders'' are | ||
| 4745 | all about: simply put everything in one mail folder and dynamically | ||
| 4746 | create searches instead of splitting. This is more flexible, since you | ||
| 4747 | can dynamically change your folders any time you want to. This also | ||
| 4748 | implies that you will usually read your mails in the @code{nnmairix} | ||
| 4749 | groups instead of your ``real'' mail groups. | ||
| 4750 | |||
| 4751 | There is one problem, though: say you got a new mail from | ||
| 4752 | @samp{david@@foobar.com}; it will now show up in two groups, the | ||
| 4753 | ``real'' group (your INBOX, for example) and in the @code{nnmairix} | ||
| 4754 | search group (provided you have updated the mairix database). Now you | ||
| 4755 | enter the @code{nnmairix} group and read the mail. The mail will be | ||
| 4756 | marked as read, but only in the @code{nnmairix} group---in the ``real'' | ||
| 4757 | mail group it will be still shown as unread. | ||
| 4758 | |||
| 4759 | You could now catch up the mail group (@pxref{Group Data}), but this is | ||
| 4760 | tedious and error prone, since you may overlook mails you don't have | ||
| 4761 | created @code{nnmairix} groups for. Of course, you could first use | ||
| 4762 | @code{nnmairix-goto-original-article} (@pxref{nnmairix keyboard | ||
| 4763 | shortcuts}) and then read the mail in the original group, but that's | ||
| 4764 | even more cumbersome. | ||
| 4765 | |||
| 4766 | Clearly, the easiest way would be if marks could somehow be | ||
| 4767 | automatically set for the original article. This is exactly what | ||
| 4768 | @emph{marks propagation} is about. | ||
| 4769 | |||
| 4770 | Marks propagation is deactivated by default. You can activate it for a | ||
| 4771 | certain @code{nnmairix} group with | ||
| 4772 | @code{nnmairix-group-toggle-propmarks-this-group} (bound to @kbd{G b | ||
| 4773 | p}). This function will warn you if you try to use it with your default | ||
| 4774 | search group; the reason is that the default search group is used for | ||
| 4775 | temporary searches, and it's easy to accidentally propagate marks from | ||
| 4776 | this group. However, you can ignore this warning if you really want to. | ||
| 4777 | |||
| 4778 | With marks propagation enabled, all the marks you set in a @code{nnmairix} | ||
| 4779 | group should now be propagated to the original article. For example, | ||
| 4780 | you can now tick an article (by default with @kbd{!}) and this mark should | ||
| 4781 | magically be set for the original article, too. | ||
| 4782 | |||
| 4783 | A few more remarks which you may or may not want to know: | ||
| 4784 | |||
| 4785 | @vindex nnmairix-propagate-marks-upon-close | ||
| 4786 | Marks will not be set immediately, but only upon closing a group. This | ||
| 4787 | not only makes marks propagation faster, it also avoids problems with | ||
| 4788 | dangling symlinks when dealing with maildir files (since changing flags | ||
| 4789 | will change the file name). You can also control when to propagate marks | ||
| 4790 | via @code{nnmairix-propagate-marks-upon-close} (see the doc-string for | ||
| 4791 | details). | ||
| 4792 | |||
| 4793 | Obviously, @code{nnmairix} will have to look up the original group for every | ||
| 4794 | article you want to set marks for. If available, @code{nnmairix} will first use | ||
| 4795 | the registry for determining the original group. The registry is very | ||
| 4796 | fast, hence you should really, really enable the registry when using | ||
| 4797 | marks propagation. If you don't have to worry about RAM and disc space, | ||
| 4798 | set @code{gnus-registry-max-entries} to a large enough value; to be on | ||
| 4799 | the safe side, choose roughly the amount of mails you index with mairix. | ||
| 4800 | |||
| 4801 | @vindex nnmairix-only-use-registry | ||
| 4802 | If you don't want to use the registry or the registry hasn't seen the | ||
| 4803 | original article yet, @code{nnmairix} will use an additional mairix | ||
| 4804 | search for determining the file name of the article. This, of course, is | ||
| 4805 | way slower than the registry---if you set hundreds or even thousands of | ||
| 4806 | marks this way, it might take some time. You can avoid this situation by | ||
| 4807 | setting @code{nnmairix-only-use-registry} to t. | ||
| 4808 | |||
| 4809 | Maybe you also want to propagate marks the other way round, i.e. if you | ||
| 4810 | tick an article in a "real" mail group, you'd like to have the same | ||
| 4811 | article in a @code{nnmairix} group ticked, too. For several good | ||
| 4812 | reasons, this can only be done efficiently if you use maildir. To | ||
| 4813 | immediately contradict myself, let me mention that it WON'T work with | ||
| 4814 | @code{nnmaildir}, since @code{nnmaildir} stores the marks externally and | ||
| 4815 | not in the file name. Therefore, propagating marks to @code{nnmairix} | ||
| 4816 | groups will usually only work if you use an IMAP server which uses | ||
| 4817 | maildir as its file format. | ||
| 4818 | |||
| 4819 | @vindex nnmairix-propagate-marks-to-nnmairix-groups | ||
| 4820 | If you work with this setup, just set | ||
| 4821 | @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t} and see what | ||
| 4822 | happens. If you don't like what you see, just set it to @code{nil} again. One | ||
| 4823 | problem might be that you get a wrong number of unread articles; this | ||
| 4824 | usually happens when you delete or expire articles in the original | ||
| 4825 | groups. When this happens, you can recreate the @code{nnmairix} group on the | ||
| 4826 | back end using @kbd{G b d}. | ||
| 4827 | |||
| 4828 | @node nnmairix tips and tricks | ||
| 4829 | @subsubsection nnmairix tips and tricks | ||
| 4830 | |||
| 4831 | @itemize | ||
| 4832 | @item | ||
| 4833 | Checking Mail | ||
| 4834 | |||
| 4835 | @findex nnmairix-update-groups | ||
| 4836 | I put all my important mail groups at group level 1. The mairix groups | ||
| 4837 | have group level 5, so they do not get checked at start up (@pxref{Group | ||
| 4838 | Levels}). | ||
| 4839 | |||
| 4840 | I use the following to check for mails: | ||
| 4841 | |||
| 4842 | @lisp | ||
| 4843 | (defun my-check-mail-mairix-update (level) | ||
| 4844 | (interactive "P") | ||
| 4845 | ;; if no prefix given, set level=1 | ||
| 4846 | (gnus-group-get-new-news (or level 1)) | ||
| 4847 | (nnmairix-update-groups "mairixsearch" t t) | ||
| 4848 | (gnus-group-list-groups)) | ||
| 4849 | |||
| 4850 | (define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update) | ||
| 4851 | @end lisp | ||
| 4852 | |||
| 4853 | Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix} | ||
| 4854 | server. See the doc string for @code{nnmairix-update-groups} for | ||
| 4855 | details. | ||
| 4856 | |||
| 4857 | @item | ||
| 4858 | Example: search group for ticked articles | ||
| 4859 | |||
| 4860 | For example, you can create a group for all ticked articles, where the | ||
| 4861 | articles always stay unread: | ||
| 4862 | |||
| 4863 | Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use | ||
| 4864 | @samp{F:f} as query and do not include threads. | ||
| 4865 | |||
| 4866 | Now activate marks propagation for this group by using @kbd{G b p}. Then | ||
| 4867 | activate the always-unread feature by using @kbd{G b r} twice. | ||
| 4868 | |||
| 4869 | So far so good---but how do you remove the tick marks in the @code{nnmairix} | ||
| 4870 | group? There are two options: You may simply use | ||
| 4871 | @code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove | ||
| 4872 | tick marks from the original article. The other possibility is to set | ||
| 4873 | @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t}, but see the above | ||
| 4874 | comments about this option. If it works for you, the tick marks should | ||
| 4875 | also exist in the @code{nnmairix} group and you can remove them as usual, | ||
| 4876 | e.g. by marking an article as read. | ||
| 4877 | |||
| 4878 | When you have removed a tick mark from the original article, this | ||
| 4879 | article should vanish from the @code{nnmairix} group after you have updated the | ||
| 4880 | mairix database and updated the group. Fortunately, there is a function | ||
| 4881 | for doing exactly that: @code{nnmairix-update-groups}. See the previous code | ||
| 4882 | snippet and the doc string for details. | ||
| 4883 | |||
| 4884 | @item | ||
| 4885 | Dealing with auto-subscription of mail groups | ||
| 4886 | |||
| 4887 | As described before, all @code{nnmairix} groups are in fact stored on | ||
| 4888 | the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can | ||
| 4889 | see them when you enter the back end server in the server buffer. You | ||
| 4890 | should not subscribe these groups! Unfortunately, these groups will | ||
| 4891 | usually get @emph{auto-subscribed} when you use @code{nnmaildir} or | ||
| 4892 | @code{nnml}, i.e. you will suddenly see groups of the form | ||
| 4893 | @samp{zz_mairix*} pop up in your group buffer. If this happens to you, | ||
| 4894 | simply kill these groups with C-k. For avoiding this, turn off | ||
| 4895 | auto-subscription completely by setting the variable | ||
| 4896 | @code{gnus-auto-subscribed-groups} to @code{nil} (@pxref{Filtering New | ||
| 4897 | Groups}), or if you like to keep this feature use the following kludge | ||
| 4898 | for turning it off for all groups beginning with @samp{zz_}: | ||
| 4899 | |||
| 4900 | @lisp | ||
| 4901 | (setq gnus-auto-subscribed-groups | ||
| 4902 | "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*") | ||
| 4903 | @end lisp | ||
| 4904 | |||
| 4905 | @end itemize | ||
| 4906 | |||
| 4907 | @node nnmairix caveats | ||
| 4908 | @subsubsection nnmairix caveats | ||
| 4909 | |||
| 4910 | @itemize | ||
| 4911 | @item | ||
| 4912 | You can create a secondary @code{nnml} server just for nnmairix, but then | ||
| 4913 | you have to explicitly set the corresponding server variable | ||
| 4914 | @code{nnml-get-new-mail} to @code{nil}. Otherwise, new mail might get | ||
| 4915 | put into this secondary server (and would never show up again). Here's | ||
| 4916 | an example server definition: | ||
| 4917 | |||
| 4918 | @lisp | ||
| 4919 | (nnml "mairix" (nnml-directory "mairix") (nnml-get-new-mail nil)) | ||
| 4920 | @end lisp | ||
| 4921 | |||
| 4922 | (The @code{nnmaildir} back end also has a server variabe | ||
| 4923 | @code{get-new-mail}, but its default value is @code{nil}, so you don't | ||
| 4924 | have to explicitly set it if you use a @code{nnmaildir} server just for | ||
| 4925 | mairix.) | ||
| 4926 | |||
| 4927 | @item | ||
| 4928 | If you use the Gnus registry: don't use the registry with | ||
| 4929 | @code{nnmairix} groups (put them in | ||
| 4930 | @code{gnus-registry-unfollowed-groups}). Be @emph{extra careful} if | ||
| 4931 | you use @code{gnus-registry-split-fancy-with-parent}; mails which are | ||
| 4932 | split into @code{nnmairix} groups are usually gone for good as soon as | ||
| 4933 | you check the group for new mail (yes, it has happened to me...). | ||
| 4934 | |||
| 4935 | @item | ||
| 4936 | Therefore: @emph{Never ever} put ``real'' mails into @code{nnmairix} | ||
| 4937 | groups (you shouldn't be able to, anyway). | ||
| 4938 | |||
| 4939 | @item | ||
| 4940 | If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize | ||
| 4941 | @code{nnmairix} groups (though I have no idea what happens if you do). | ||
| 4942 | |||
| 4943 | @item | ||
| 4944 | mairix does only support us-ascii characters. | ||
| 4945 | |||
| 4946 | @item | ||
| 4947 | @code{nnmairix} uses a rather brute force method to force Gnus to | ||
| 4948 | completely reread the group on the mail back end after mairix was | ||
| 4949 | called---it simply deletes and re-creates the group on the mail | ||
| 4950 | back end. So far, this has worked for me without any problems, and I | ||
| 4951 | don't see how @code{nnmairix} could delete other mail groups than its | ||
| 4952 | own, but anyway: you really should have a backup of your mail | ||
| 4953 | folders. | ||
| 4954 | |||
| 4955 | @item | ||
| 4956 | All necessary information is stored in the group parameters | ||
| 4957 | (@pxref{Group Parameters}). This has the advantage that no active file | ||
| 4958 | is needed, but also implies that when you kill a @code{nnmairix} group, | ||
| 4959 | it is gone for good. | ||
| 4960 | |||
| 4961 | @item | ||
| 4962 | @findex nnmairix-purge-old-groups | ||
| 4963 | If you create and kill a lot of @code{nnmairix} groups, the | ||
| 4964 | ``zz_mairix-*'' groups will accumulate on the mail back end server. To | ||
| 4965 | delete old groups which are no longer needed, call | ||
| 4966 | @code{nnmairix-purge-old-groups}. Note that this assumes that you don't | ||
| 4967 | save any ``real'' mail in folders of the form | ||
| 4968 | @code{zz_mairix-<NAME>-<NUMBER>}. You can change the prefix of | ||
| 4969 | @code{nnmairix} groups by changing the variable | ||
| 4970 | @code{nnmairix-group-prefix}. | ||
| 4971 | |||
| 4972 | @item | ||
| 4973 | The following only applies if you @emph{don't} use the mentioned patch | ||
| 4974 | for mairix (@pxref{Propagating marks}): | ||
| 4975 | |||
| 4976 | A problem can occur when using @code{nnmairix} with maildir folders and | ||
| 4977 | comes with the fact that maildir stores mail flags like @samp{Seen} or | ||
| 4978 | @samp{Replied} by appending chars @samp{S} and @samp{R} to the message | ||
| 4979 | file name, respectively. This implies that currently you would have to | ||
| 4980 | update the mairix database not only when new mail arrives, but also when | ||
| 4981 | mail flags are changing. The same applies to new mails which are indexed | ||
| 4982 | while they are still in the @samp{new} folder but then get moved to | ||
| 4983 | @samp{cur} when Gnus has seen the mail. If you don't update the database | ||
| 4984 | after this has happened, a mairix query can lead to symlinks pointing to | ||
| 4985 | non-existing files. In Gnus, these messages will usually appear with | ||
| 4986 | ``(none)'' entries in the header and can't be accessed. If this happens | ||
| 4987 | to you, using @kbd{G b u} and updating the group will usually fix this. | ||
| 4988 | |||
| 4989 | @end itemize | ||
| 4990 | |||
| 4991 | @node Misc Group Stuff | 4300 | @node Misc Group Stuff |
| 4992 | @section Misc Group Stuff | 4301 | @section Misc Group Stuff |
| 4993 | 4302 | ||
| @@ -21691,6 +21000,1039 @@ the new score, which should be an integer. | |||
| 21691 | Gnus will try to decay scores once a day. If you haven't run Gnus for | 21000 | Gnus will try to decay scores once a day. If you haven't run Gnus for |
| 21692 | four days, Gnus will decay the scores four times, for instance. | 21001 | four days, Gnus will decay the scores four times, for instance. |
| 21693 | 21002 | ||
| 21003 | @node Searching | ||
| 21004 | @chapter Searching | ||
| 21005 | @cindex searching | ||
| 21006 | |||
| 21007 | FIXME: Add a brief overview of Gnus search capabilities. A brief | ||
| 21008 | comparison of nnir, nnmairix, contrib/gnus-namazu would be nice | ||
| 21009 | as well. | ||
| 21010 | |||
| 21011 | This chapter describes tools for searching groups and servers for | ||
| 21012 | articles matching a query and then retrieving those articles. Gnus | ||
| 21013 | provides a simpler mechanism for searching through articles in a summary buffer | ||
| 21014 | to find those matching a pattern. @xref{Searching for Articles}. | ||
| 21015 | |||
| 21016 | @menu | ||
| 21017 | * nnir:: Searching with various engines. | ||
| 21018 | * nnmairix:: Searching with Mairix. | ||
| 21019 | @end menu | ||
| 21020 | |||
| 21021 | @node nnir | ||
| 21022 | @section nnir | ||
| 21023 | @cindex nnir | ||
| 21024 | |||
| 21025 | This section describes how to use @code{nnir} to search for articles | ||
| 21026 | within gnus. | ||
| 21027 | |||
| 21028 | @menu | ||
| 21029 | * What is nnir:: What does nnir do? | ||
| 21030 | * Basic Usage:: How to perform simple searches. | ||
| 21031 | * Setting up nnir:: How to set up nnir. | ||
| 21032 | @end menu | ||
| 21033 | |||
| 21034 | @node What is nnir | ||
| 21035 | @subsection What is nnir | ||
| 21036 | |||
| 21037 | @code{nnir} is a gnus interface to a number of tools for searching | ||
| 21038 | through mail and news repositories. Different backends (like | ||
| 21039 | @code{nnimap} and @code{nntp}) work with different tools (called | ||
| 21040 | @dfn{engines} in nnir lingo), but all use the same basic search | ||
| 21041 | interface. | ||
| 21042 | |||
| 21043 | The @code{nnimap} and @code{gmane} search engines should work with no | ||
| 21044 | configuration. Other engines require a local index that needs to be | ||
| 21045 | created and maintained outside of Gnus. | ||
| 21046 | |||
| 21047 | @node Basic Usage | ||
| 21048 | @subsection Basic Usage | ||
| 21049 | |||
| 21050 | In the group buffer typing @kbd{G G} will search the group on the | ||
| 21051 | current line by calling @code{gnus-group-make-nnir-group}. This prompts | ||
| 21052 | for a query string, creates an ephemeral @code{nnir} group containing | ||
| 21053 | the articles that match this query, and takes you to a summary buffer | ||
| 21054 | showing these articles. Articles may then be read, moved and deleted | ||
| 21055 | using the usual commands. | ||
| 21056 | |||
| 21057 | The @code{nnir} group made in this way is an @code{ephemeral} group, and | ||
| 21058 | some changes are not permanent: aside from reading, moving, and | ||
| 21059 | deleting, you can't act on the original article. But there is an | ||
| 21060 | alternative: you can @emph{warp} to the original group for the article | ||
| 21061 | on the current line with @kbd{A W}, aka | ||
| 21062 | @code{gnus-warp-to-article}. Even better, the function | ||
| 21063 | @code{gnus-summary-refer-thread}, bound by default in summary buffers to | ||
| 21064 | @kbd{A T}, will first warp to the original group before it works its | ||
| 21065 | magic and includes all the articles in the thread. From here you can | ||
| 21066 | read, move and delete articles, but also copy them, alter article marks, | ||
| 21067 | whatever. Go nuts. | ||
| 21068 | |||
| 21069 | You say you want to search more than just the group on the current line? | ||
| 21070 | No problem: just process-mark the groups you want to search. You want | ||
| 21071 | even more? Calling for an nnir search with the cursor on a topic heading | ||
| 21072 | will search all the groups under that heading. | ||
| 21073 | |||
| 21074 | Still not enough? OK, in the server buffer | ||
| 21075 | @code{gnus-group-make-nnir-group} (now bound to @kbd{G}) will search all | ||
| 21076 | groups from the server on the current line. Too much? Want to ignore | ||
| 21077 | certain groups when searching, like spam groups? Just customize | ||
| 21078 | @code{nnir-ignored-newsgroups}. | ||
| 21079 | |||
| 21080 | One more thing: individual search engines may have special search | ||
| 21081 | features. You can access these special features by giving a prefix-arg | ||
| 21082 | to @code{gnus-group-make-nnir-group}. If you are searching multiple | ||
| 21083 | groups with different search engines you will be prompted for the | ||
| 21084 | special search features for each engine separately. | ||
| 21085 | |||
| 21086 | @node Setting up nnir | ||
| 21087 | @subsection Setting up nnir | ||
| 21088 | |||
| 21089 | To set up nnir you may need to do some prep work. Firstly, you may need | ||
| 21090 | to configure the search engines you plan to use. Some of them, like | ||
| 21091 | @code{imap} and @code{gmane}, need no special configuration. Others, | ||
| 21092 | like @code{namazu} and @code{swish}, require configuration as described | ||
| 21093 | below. Secondly, you need to associate a search engine with a server or | ||
| 21094 | a backend. | ||
| 21095 | |||
| 21096 | If you just want to use the @code{imap} engine to search @code{nnimap} | ||
| 21097 | servers, and the @code{gmane} engine to search @code{gmane} then you | ||
| 21098 | don't have to do anything. But you might want to read the details of the | ||
| 21099 | query language anyway. | ||
| 21100 | |||
| 21101 | @menu | ||
| 21102 | * Associating Engines:: How to associate engines. | ||
| 21103 | * The imap Engine:: Imap configuration and usage. | ||
| 21104 | * The gmane Engine:: Gmane configuration and usage. | ||
| 21105 | * The swish++ Engine:: Swish++ configuration and usage. | ||
| 21106 | * The swish-e Engine:: Swish-e configuration and usage. | ||
| 21107 | * The namazu Engine:: Namazu configuration and usage. | ||
| 21108 | * The hyrex Engine:: Hyrex configuration and usage. | ||
| 21109 | * Customizations:: User customizable settings. | ||
| 21110 | @end menu | ||
| 21111 | |||
| 21112 | @node Associating Engines | ||
| 21113 | @subsubsection Associating Engines | ||
| 21114 | |||
| 21115 | |||
| 21116 | When searching a group, @code{nnir} needs to know which search engine to | ||
| 21117 | use. You can configure a given server to use a particular engine by | ||
| 21118 | setting the server variable @code{nnir-search-engine} to the engine | ||
| 21119 | name. For example to use the @code{namazu} engine to search the server | ||
| 21120 | named @code{home} you can use | ||
| 21121 | |||
| 21122 | @lisp | ||
| 21123 | (setq gnus-secondary-select-methods '( | ||
| 21124 | (nnml "home" | ||
| 21125 | (nnimap-address "localhost") | ||
| 21126 | (nnir-search-engine namazu)))) | ||
| 21127 | @end lisp | ||
| 21128 | |||
| 21129 | Alternatively you might want to use a particular engine for all servers | ||
| 21130 | with a given backend. For example, you might want to use the @code{imap} | ||
| 21131 | engine for all servers using the @code{nnimap} backend. In this case you | ||
| 21132 | can customize the variable @code{nnir-method-default-engines}. This is | ||
| 21133 | an alist of pairs of the form @code{(backend . engine)}. By default this | ||
| 21134 | variable is set to use the @code{imap} engine for all servers using the | ||
| 21135 | @code{nnimap} backend, and the @code{gmane} backend for @code{nntp} | ||
| 21136 | servers. (Don't worry, the @code{gmane} search engine won't actually try | ||
| 21137 | to search non-gmane @code{nntp} servers.) But if you wanted to use | ||
| 21138 | @code{namazu} for all your servers with an @code{nnimap} backend you | ||
| 21139 | could change this to | ||
| 21140 | |||
| 21141 | @lisp | ||
| 21142 | '((nnimap . namazu) | ||
| 21143 | (nntp . gmane)) | ||
| 21144 | @end lisp | ||
| 21145 | |||
| 21146 | @node The imap Engine | ||
| 21147 | @subsubsection The imap Engine | ||
| 21148 | |||
| 21149 | The @code{imap} engine requires no configuration. | ||
| 21150 | |||
| 21151 | Queries using the @code{imap} engine follow a simple query language. | ||
| 21152 | The search is always case-insensitive and supports the following | ||
| 21153 | features (inspired by the Google search input language): | ||
| 21154 | |||
| 21155 | @table @samp | ||
| 21156 | |||
| 21157 | @item Boolean query operators | ||
| 21158 | AND, OR, and NOT are supported, and parentheses can be used to control | ||
| 21159 | operator precedence, e.g. (emacs OR xemacs) AND linux. Note that | ||
| 21160 | operators must be written with all capital letters to be | ||
| 21161 | recognised. Also preceding a term with a - sign is equivalent to NOT | ||
| 21162 | term. | ||
| 21163 | |||
| 21164 | @item Automatic AND queries | ||
| 21165 | If you specify multiple words then they will be treated as an AND | ||
| 21166 | expression intended to match all components. | ||
| 21167 | |||
| 21168 | @item Phrase searches | ||
| 21169 | If you wrap your query in double-quotes then it will be treated as a | ||
| 21170 | literal string. | ||
| 21171 | |||
| 21172 | @end table | ||
| 21173 | |||
| 21174 | By default the whole message will be searched. The query can be limited | ||
| 21175 | to a specific part of a message by using a prefix-arg. After inputting | ||
| 21176 | the query this will prompt (with completion) for a message part. | ||
| 21177 | Choices include ``Whole message'', ``Subject'', ``From'', and | ||
| 21178 | ``To''. Any unrecognized input is interpreted as a header name. For | ||
| 21179 | example, typing @kbd{Message-ID} in response to this prompt will limit | ||
| 21180 | the query to the Message-ID header. | ||
| 21181 | |||
| 21182 | Finally selecting ``Imap'' will interpret the query as a raw | ||
| 21183 | @acronym{IMAP} search query. The format of such queries can be found in | ||
| 21184 | RFC3501. | ||
| 21185 | |||
| 21186 | If you don't like the default of searching whole messages you can | ||
| 21187 | customize @code{nnir-imap-default-search-key}. For example to use | ||
| 21188 | @acronym{IMAP} queries by default | ||
| 21189 | |||
| 21190 | @lisp | ||
| 21191 | (setq nnir-imap-default-search-key "Imap") | ||
| 21192 | @end lisp | ||
| 21193 | |||
| 21194 | @node The gmane Engine | ||
| 21195 | @subsubsection The gmane Engine | ||
| 21196 | |||
| 21197 | The @code{gmane} engine requires no configuration. | ||
| 21198 | |||
| 21199 | Gmane queries follow a simple query language: | ||
| 21200 | |||
| 21201 | @table @samp | ||
| 21202 | @item Boolean query operators | ||
| 21203 | AND, OR, NOT (or AND NOT), and XOR are supported, and brackets can be | ||
| 21204 | used to control operator precedence, e.g. (emacs OR xemacs) AND linux. | ||
| 21205 | Note that operators must be written with all capital letters to be | ||
| 21206 | recognised. | ||
| 21207 | |||
| 21208 | @item Required and excluded terms | ||
| 21209 | + and - can be used to require or exclude terms, e.g. football -american | ||
| 21210 | |||
| 21211 | @item Unicode handling | ||
| 21212 | The search engine converts all text to utf-8, so searching should work | ||
| 21213 | in any language. | ||
| 21214 | |||
| 21215 | @item Stopwords | ||
| 21216 | Common English words (like 'the' and 'a') are ignored by default. You | ||
| 21217 | can override this by prefixing such words with a + (e.g. +the) or | ||
| 21218 | enclosing the word in quotes (e.g. "the"). | ||
| 21219 | |||
| 21220 | @end table | ||
| 21221 | |||
| 21222 | The query can be limited to articles by a specific author using a | ||
| 21223 | prefix-arg. After inputting the query this will prompt for an author | ||
| 21224 | name (or part of a name) to match. | ||
| 21225 | |||
| 21226 | @node The swish++ Engine | ||
| 21227 | @subsubsection The swish++ Engine | ||
| 21228 | |||
| 21229 | FIXEM: Say something more here. | ||
| 21230 | |||
| 21231 | Documentation for swish++ may be found at the swish++ sourceforge page: | ||
| 21232 | @uref{http://swishplusplus.sourceforge.net} | ||
| 21233 | |||
| 21234 | @node The swish-e Engine | ||
| 21235 | @subsubsection The swish-e Engine | ||
| 21236 | |||
| 21237 | FIXEM: Say something more here. | ||
| 21238 | |||
| 21239 | Documentation for swish-e may be found at the swish-e homepage | ||
| 21240 | @uref{http://swish-e.org} | ||
| 21241 | |||
| 21242 | @node The namazu Engine | ||
| 21243 | @subsubsection The namazu Engine | ||
| 21244 | |||
| 21245 | Using the namazu engine requires creating and maintaining index files. | ||
| 21246 | One directory should contain all the index files, and nnir must be told | ||
| 21247 | where to find them by setting the @code{nnir-namazu-index-directory} | ||
| 21248 | variable. | ||
| 21249 | |||
| 21250 | To work correctly the @code{nnir-namazu-remove-prefix} variable must | ||
| 21251 | also be correct. This is the prefix to remove from each file name | ||
| 21252 | returned by Namazu in order to get a proper group name (albeit with `/' | ||
| 21253 | instead of `.'). | ||
| 21254 | |||
| 21255 | For example, suppose that Namazu returns file names such as | ||
| 21256 | @samp{/home/john/Mail/mail/misc/42}. For this example, use the | ||
| 21257 | following setting: @code{(setq nnir-namazu-remove-prefix | ||
| 21258 | "/home/john/Mail/")} Note the trailing slash. Removing this prefix from | ||
| 21259 | the directory gives @samp{mail/misc/42}. @code{nnir} knows to remove | ||
| 21260 | the @samp{/42} and to replace @samp{/} with @samp{.} to arrive at the | ||
| 21261 | correct group name @samp{mail.misc}. | ||
| 21262 | |||
| 21263 | Extra switches may be passed to the namazu search command by setting the | ||
| 21264 | variable @code{nnir-namazu-additional-switches}. It is particularly | ||
| 21265 | important not to pass any any switches to namazu that will change the | ||
| 21266 | output format. Good switches to use include `--sort', `--ascending', | ||
| 21267 | `--early' and `--late'. Refer to the Namazu documentation for further | ||
| 21268 | information on valid switches. | ||
| 21269 | |||
| 21270 | Mail must first be indexed with the `mknmz' program. Read the documentation | ||
| 21271 | for namazu to create a configuration file. Here is an example: | ||
| 21272 | |||
| 21273 | @cartouche | ||
| 21274 | @example | ||
| 21275 | package conf; # Don't remove this line! | ||
| 21276 | |||
| 21277 | # Paths which will not be indexed. Don't use `^' or `$' anchors. | ||
| 21278 | $EXCLUDE_PATH = "spam|sent"; | ||
| 21279 | |||
| 21280 | # Header fields which should be searchable. case-insensitive | ||
| 21281 | $REMAIN_HEADER = "from|date|message-id|subject"; | ||
| 21282 | |||
| 21283 | # Searchable fields. case-insensitive | ||
| 21284 | $SEARCH_FIELD = "from|date|message-id|subject"; | ||
| 21285 | |||
| 21286 | # The max length of a word. | ||
| 21287 | $WORD_LENG_MAX = 128; | ||
| 21288 | |||
| 21289 | # The max length of a field. | ||
| 21290 | $MAX_FIELD_LENGTH = 256; | ||
| 21291 | @end example | ||
| 21292 | @end cartouche | ||
| 21293 | |||
| 21294 | For this example, mail is stored in the directories @samp{~/Mail/mail/}, | ||
| 21295 | @samp{~/Mail/lists/} and @samp{~/Mail/archive/}, so to index them go to | ||
| 21296 | the index directory set in @code{nnir-namazu-index-directory} and issue | ||
| 21297 | the following command: | ||
| 21298 | |||
| 21299 | @example | ||
| 21300 | mknmz --mailnews ~/Mail/archive/ ~/Mail/mail/ ~/Mail/lists/ | ||
| 21301 | @end example | ||
| 21302 | |||
| 21303 | For maximum searching efficiency you might want to have a cron job run | ||
| 21304 | this command periodically, say every four hours. | ||
| 21305 | |||
| 21306 | @node The hyrex Engine | ||
| 21307 | @subsubsection The hyrex Engine | ||
| 21308 | FIXME: Add documentation. | ||
| 21309 | |||
| 21310 | @node Customizations | ||
| 21311 | @subsubsection Custimozations | ||
| 21312 | |||
| 21313 | @table @code | ||
| 21314 | |||
| 21315 | @item nnir-method-default-engines | ||
| 21316 | Alist of server backend - search engine pairs. The default associations | ||
| 21317 | are | ||
| 21318 | @example | ||
| 21319 | (nnimap . imap) | ||
| 21320 | (nntp . gmane) | ||
| 21321 | @end example | ||
| 21322 | |||
| 21323 | @item nnir-ignored-newsgroups | ||
| 21324 | A regexp to match newsgroups in the active file that should be skipped | ||
| 21325 | when searching all groups on a server. | ||
| 21326 | |||
| 21327 | @item nnir-summary-line-format | ||
| 21328 | The format specification to be used for lines in an nnir summary buffer. | ||
| 21329 | All the items from `gnus-summary-line-format' are available, along with | ||
| 21330 | three items unique to nnir summary buffers: | ||
| 21331 | |||
| 21332 | @example | ||
| 21333 | %Z Search retrieval score value (integer) | ||
| 21334 | %G Article original full group name (string) | ||
| 21335 | %g Article original short group name (string) | ||
| 21336 | @end example | ||
| 21337 | |||
| 21338 | If nil (the default) this will use @code{gnus-summary-line-format}. | ||
| 21339 | |||
| 21340 | @item nnir-retrieve-headers-override-function | ||
| 21341 | If non-nil, a function that retrieves article headers rather than using | ||
| 21342 | the gnus built-in function. This function takes an article list and | ||
| 21343 | group as arguments and populates the `nntp-server-buffer' with the | ||
| 21344 | retrieved headers. It should then return either 'nov or 'headers | ||
| 21345 | indicating the retrieved header format. Failure to retrieve headers | ||
| 21346 | should return @code{nil} | ||
| 21347 | |||
| 21348 | If this variable is nil, or if the provided function returns nil for a | ||
| 21349 | search result, @code{gnus-retrieve-headers} will be called instead." | ||
| 21350 | |||
| 21351 | |||
| 21352 | @end table | ||
| 21353 | |||
| 21354 | |||
| 21355 | @node nnmairix | ||
| 21356 | @section nnmairix | ||
| 21357 | |||
| 21358 | @cindex mairix | ||
| 21359 | @cindex nnmairix | ||
| 21360 | This paragraph describes how to set up mairix and the back end | ||
| 21361 | @code{nnmairix} for indexing and searching your mail from within | ||
| 21362 | Gnus. Additionally, you can create permanent ``smart'' groups which are | ||
| 21363 | bound to mairix searches and are automatically updated. | ||
| 21364 | |||
| 21365 | @menu | ||
| 21366 | * About mairix:: About the mairix mail search engine | ||
| 21367 | * nnmairix requirements:: What you will need for using nnmairix | ||
| 21368 | * What nnmairix does:: What does nnmairix actually do? | ||
| 21369 | * Setting up mairix:: Set up your mairix installation | ||
| 21370 | * Configuring nnmairix:: Set up the nnmairix back end | ||
| 21371 | * nnmairix keyboard shortcuts:: List of available keyboard shortcuts | ||
| 21372 | * Propagating marks:: How to propagate marks from nnmairix groups | ||
| 21373 | * nnmairix tips and tricks:: Some tips, tricks and examples | ||
| 21374 | * nnmairix caveats:: Some more stuff you might want to know | ||
| 21375 | @end menu | ||
| 21376 | |||
| 21377 | @c FIXME: The markup in this section might need improvement. | ||
| 21378 | @c E.g. adding @samp, @var, @file, @command, etc. | ||
| 21379 | @c Cf. (info "(texinfo)Indicating") | ||
| 21380 | |||
| 21381 | @node About mairix | ||
| 21382 | @subsection About mairix | ||
| 21383 | |||
| 21384 | Mairix is a tool for indexing and searching words in locally stored | ||
| 21385 | mail. It was written by Richard Curnow and is licensed under the | ||
| 21386 | GPL. Mairix comes with most popular GNU/Linux distributions, but it also | ||
| 21387 | runs under Windows (with cygwin), Mac OS X and Solaris. The homepage can | ||
| 21388 | be found at | ||
| 21389 | @uref{http://www.rpcurnow.force9.co.uk/mairix/index.html} | ||
| 21390 | |||
| 21391 | Though mairix might not be as flexible as other search tools like | ||
| 21392 | swish++ or namazu, which you can use via the @code{nnir} back end, it | ||
| 21393 | has the prime advantage of being incredibly fast. On current systems, it | ||
| 21394 | can easily search through headers and message bodies of thousands and | ||
| 21395 | thousands of mails in well under a second. Building the database | ||
| 21396 | necessary for searching might take a minute or two, but only has to be | ||
| 21397 | done once fully. Afterwards, the updates are done incrementally and | ||
| 21398 | therefore are really fast, too. Additionally, mairix is very easy to set | ||
| 21399 | up. | ||
| 21400 | |||
| 21401 | For maximum speed though, mairix should be used with mails stored in | ||
| 21402 | @code{Maildir} or @code{MH} format (this includes the @code{nnml} back | ||
| 21403 | end), although it also works with mbox. Mairix presents the search | ||
| 21404 | results by populating a @emph{virtual} maildir/MH folder with symlinks | ||
| 21405 | which point to the ``real'' message files (if mbox is used, copies are | ||
| 21406 | made). Since mairix already presents search results in such a virtual | ||
| 21407 | mail folder, it is very well suited for using it as an external program | ||
| 21408 | for creating @emph{smart} mail folders, which represent certain mail | ||
| 21409 | searches. | ||
| 21410 | |||
| 21411 | @node nnmairix requirements | ||
| 21412 | @subsection nnmairix requirements | ||
| 21413 | |||
| 21414 | Mairix searches local mail---that means, mairix absolutely must have | ||
| 21415 | direct access to your mail folders. If your mail resides on another | ||
| 21416 | server (e.g. an @acronym{IMAP} server) and you happen to have shell | ||
| 21417 | access, @code{nnmairix} supports running mairix remotely, e.g. via ssh. | ||
| 21418 | |||
| 21419 | Additionally, @code{nnmairix} only supports the following Gnus back | ||
| 21420 | ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}. You must use | ||
| 21421 | one of these back ends for using @code{nnmairix}. Other back ends, like | ||
| 21422 | @code{nnmbox}, @code{nnfolder} or @code{nnmh}, won't work. | ||
| 21423 | |||
| 21424 | If you absolutely must use mbox and still want to use @code{nnmairix}, | ||
| 21425 | you can set up a local @acronym{IMAP} server, which you then access via | ||
| 21426 | @code{nnimap}. This is a rather massive setup for accessing some mbox | ||
| 21427 | files, so just change to MH or Maildir already... However, if you're | ||
| 21428 | really, really passionate about using mbox, you might want to look into | ||
| 21429 | the package @file{mairix.el}, which comes with Emacs 23. | ||
| 21430 | |||
| 21431 | @node What nnmairix does | ||
| 21432 | @subsection What nnmairix does | ||
| 21433 | |||
| 21434 | The back end @code{nnmairix} enables you to call mairix from within Gnus, | ||
| 21435 | either to query mairix with a search term or to update the | ||
| 21436 | database. While visiting a message in the summary buffer, you can use | ||
| 21437 | several pre-defined shortcuts for calling mairix, e.g. to quickly | ||
| 21438 | search for all mails from the sender of the current message or to | ||
| 21439 | display the whole thread associated with the message, even if the | ||
| 21440 | mails are in different folders. | ||
| 21441 | |||
| 21442 | Additionally, you can create permanent @code{nnmairix} groups which are bound | ||
| 21443 | to certain mairix searches. This way, you can easily create a group | ||
| 21444 | containing mails from a certain sender, with a certain subject line or | ||
| 21445 | even for one specific thread based on the Message-ID. If you check for | ||
| 21446 | new mail in these folders (e.g. by pressing @kbd{g} or @kbd{M-g}), they | ||
| 21447 | automatically update themselves by calling mairix. | ||
| 21448 | |||
| 21449 | You might ask why you need @code{nnmairix} at all, since mairix already | ||
| 21450 | creates the group, populates it with links to the mails so that you can | ||
| 21451 | then access it with Gnus, right? Well, this @emph{might} work, but often | ||
| 21452 | does not---at least not without problems. Most probably you will get | ||
| 21453 | strange article counts, and sometimes you might see mails which Gnus | ||
| 21454 | claims have already been canceled and are inaccessible. This is due to | ||
| 21455 | the fact that Gnus isn't really amused when things are happening behind | ||
| 21456 | its back. Another problem can be the mail back end itself, e.g. if you | ||
| 21457 | use mairix with an @acronym{IMAP} server (I had Dovecot complaining | ||
| 21458 | about corrupt index files when mairix changed the contents of the search | ||
| 21459 | group). Using @code{nnmairix} should circumvent these problems. | ||
| 21460 | |||
| 21461 | @code{nnmairix} is not really a mail back end---it's actually more like | ||
| 21462 | a wrapper, sitting between a ``real'' mail back end where mairix stores | ||
| 21463 | the searches and the Gnus front end. You can choose between three | ||
| 21464 | different mail back ends for the mairix folders: @code{nnml}, | ||
| 21465 | @code{nnmaildir} or @code{nnimap}. @code{nnmairix} will call the mairix | ||
| 21466 | binary so that the search results are stored in folders named | ||
| 21467 | @code{zz_mairix-<NAME>-<NUMBER>} on this mail back end, but it will | ||
| 21468 | present these folders in the Gnus front end only with @code{<NAME>}. | ||
| 21469 | You can use an existing mail back end where you already store your mail, | ||
| 21470 | but if you're uncomfortable with @code{nnmairix} creating new mail | ||
| 21471 | groups alongside your other mail, you can also create e.g. a new | ||
| 21472 | @code{nnmaildir} or @code{nnml} server exclusively for mairix, but then | ||
| 21473 | make sure those servers do not accidentally receive your new mail | ||
| 21474 | (@pxref{nnmairix caveats}). A special case exists if you want to use | ||
| 21475 | mairix remotely on an IMAP server with @code{nnimap}---here the mairix | ||
| 21476 | folders and your other mail must be on the same @code{nnimap} back end. | ||
| 21477 | |||
| 21478 | @node Setting up mairix | ||
| 21479 | @subsection Setting up mairix | ||
| 21480 | |||
| 21481 | First: create a backup of your mail folders (@pxref{nnmairix caveats}). | ||
| 21482 | |||
| 21483 | Setting up mairix is easy: simply create a @file{.mairixrc} file with | ||
| 21484 | (at least) the following entries: | ||
| 21485 | |||
| 21486 | @example | ||
| 21487 | # Your Maildir/MH base folder | ||
| 21488 | base=~/Maildir | ||
| 21489 | @end example | ||
| 21490 | |||
| 21491 | This is the base folder for your mails. All the following directories | ||
| 21492 | are relative to this base folder. If you want to use @code{nnmairix} | ||
| 21493 | with @code{nnimap}, this base directory has to point to the mail | ||
| 21494 | directory where the @acronym{IMAP} server stores the mail folders! | ||
| 21495 | |||
| 21496 | @example | ||
| 21497 | maildir= ... your maildir folders which should be indexed ... | ||
| 21498 | mh= ... your nnml/mh folders which should be indexed ... | ||
| 21499 | mbox = ... your mbox files which should be indexed ... | ||
| 21500 | @end example | ||
| 21501 | |||
| 21502 | This specifies all your mail folders and mbox files (relative to the | ||
| 21503 | base directory!) you want to index with mairix. Note that the | ||
| 21504 | @code{nnml} back end saves mails in MH format, so you have to put those | ||
| 21505 | directories in the @code{mh} line. See the example at the end of this | ||
| 21506 | section and mairixrc's man-page for further details. | ||
| 21507 | |||
| 21508 | @example | ||
| 21509 | omit=zz_mairix-* | ||
| 21510 | @end example | ||
| 21511 | |||
| 21512 | @vindex nnmairix-group-prefix | ||
| 21513 | This should make sure that you don't accidentally index the mairix | ||
| 21514 | search results. You can change the prefix of these folders with the | ||
| 21515 | variable @code{nnmairix-group-prefix}. | ||
| 21516 | |||
| 21517 | @example | ||
| 21518 | mformat= ... 'maildir' or 'mh' ... | ||
| 21519 | database= ... location of database file ... | ||
| 21520 | @end example | ||
| 21521 | |||
| 21522 | The @code{format} setting specifies the output format for the mairix | ||
| 21523 | search folder. Set this to @code{mh} if you want to access search results | ||
| 21524 | with @code{nnml}. Otherwise choose @code{maildir}. | ||
| 21525 | |||
| 21526 | To summarize, here is my shortened @file{.mairixrc} file as an example: | ||
| 21527 | |||
| 21528 | @example | ||
| 21529 | base=~/Maildir | ||
| 21530 | maildir=.personal:.work:.logcheck:.sent | ||
| 21531 | mh=../Mail/nnml/*... | ||
| 21532 | mbox=../mboxmail/mailarchive_year* | ||
| 21533 | mformat=maildir | ||
| 21534 | omit=zz_mairix-* | ||
| 21535 | database=~/.mairixdatabase | ||
| 21536 | @end example | ||
| 21537 | |||
| 21538 | In this case, the base directory is @file{~/Maildir}, where all my Maildir | ||
| 21539 | folders are stored. As you can see, the folders are separated by | ||
| 21540 | colons. If you wonder why every folder begins with a dot: this is | ||
| 21541 | because I use Dovecot as @acronym{IMAP} server, which again uses | ||
| 21542 | @code{Maildir++} folders. For testing nnmairix, I also have some | ||
| 21543 | @code{nnml} mail, which is saved in @file{~/Mail/nnml}. Since this has | ||
| 21544 | to be specified relative to the @code{base} directory, the @code{../Mail} | ||
| 21545 | notation is needed. Note that the line ends in @code{*...}, which means | ||
| 21546 | to recursively scan all files under this directory. Without the three | ||
| 21547 | dots, the wildcard @code{*} will not work recursively. I also have some | ||
| 21548 | old mbox files with archived mail lying around in @file{~/mboxmail}. | ||
| 21549 | The other lines should be obvious. | ||
| 21550 | |||
| 21551 | See the man page for @code{mairixrc} for details and further options, | ||
| 21552 | especially regarding wildcard usage, which may be a little different | ||
| 21553 | than you are used to. | ||
| 21554 | |||
| 21555 | Now simply call @code{mairix} to create the index for the first time. | ||
| 21556 | Note that this may take a few minutes, but every following index will do | ||
| 21557 | the updates incrementally and hence is very fast. | ||
| 21558 | |||
| 21559 | @node Configuring nnmairix | ||
| 21560 | @subsection Configuring nnmairix | ||
| 21561 | |||
| 21562 | In group mode, type @kbd{G b c} | ||
| 21563 | (@code{nnmairix-create-server-and-default-group}). This will ask you for all | ||
| 21564 | necessary information and create a @code{nnmairix} server as a foreign | ||
| 21565 | server. You will have to specify the following: | ||
| 21566 | |||
| 21567 | @itemize @bullet | ||
| 21568 | |||
| 21569 | @item | ||
| 21570 | The @strong{name} of the @code{nnmairix} server---choose whatever you | ||
| 21571 | want. | ||
| 21572 | |||
| 21573 | @item | ||
| 21574 | The name of the @strong{back end server} where mairix should store its | ||
| 21575 | searches. This must be a full server name, like @code{nnml:mymail}. | ||
| 21576 | Just hit @kbd{TAB} to see the available servers. Currently, servers | ||
| 21577 | which are accessed through @code{nnmaildir}, @code{nnimap} and | ||
| 21578 | @code{nnml} are supported. As explained above, for locally stored | ||
| 21579 | mails, this can be an existing server where you store your mails. | ||
| 21580 | However, you can also create e.g. a new @code{nnmaildir} or @code{nnml} | ||
| 21581 | server exclusively for @code{nnmairix} in your secondary select methods | ||
| 21582 | (@pxref{Finding the News}). If you use a secondary @code{nnml} server | ||
| 21583 | just for mairix, make sure that you explicitly set the server variable | ||
| 21584 | @code{nnml-get-new-mail} to @code{nil}, or you might lose mail | ||
| 21585 | (@pxref{nnmairix caveats}). If you want to use mairix remotely on an | ||
| 21586 | @acronym{IMAP} server, you have to choose the corresponding | ||
| 21587 | @code{nnimap} server here. | ||
| 21588 | |||
| 21589 | @item | ||
| 21590 | @vindex nnmairix-mairix-search-options | ||
| 21591 | The @strong{command} to call the mairix binary. This will usually just | ||
| 21592 | be @code{mairix}, but you can also choose something like @code{ssh | ||
| 21593 | SERVER mairix} if you want to call mairix remotely, e.g. on your | ||
| 21594 | @acronym{IMAP} server. If you want to add some default options to | ||
| 21595 | mairix, you could do this here, but better use the variable | ||
| 21596 | @code{nnmairix-mairix-search-options} instead. | ||
| 21597 | |||
| 21598 | @item | ||
| 21599 | The name of the @strong{default search group}. This will be the group | ||
| 21600 | where all temporary mairix searches are stored, i.e. all searches which | ||
| 21601 | are not bound to permanent @code{nnmairix} groups. Choose whatever you | ||
| 21602 | like. | ||
| 21603 | |||
| 21604 | @item | ||
| 21605 | If the mail back end is @code{nnimap} or @code{nnmaildir}, you will be | ||
| 21606 | asked if you work with @strong{Maildir++}, i.e. with hidden maildir | ||
| 21607 | folders (=beginning with a dot). For example, you have to answer | ||
| 21608 | @samp{yes} here if you work with the Dovecot @acronym{IMAP} | ||
| 21609 | server. Otherwise, you should answer @samp{no} here. | ||
| 21610 | |||
| 21611 | @end itemize | ||
| 21612 | |||
| 21613 | @node nnmairix keyboard shortcuts | ||
| 21614 | @subsection nnmairix keyboard shortcuts | ||
| 21615 | |||
| 21616 | In group mode: | ||
| 21617 | |||
| 21618 | @table @kbd | ||
| 21619 | |||
| 21620 | @item G b c | ||
| 21621 | @kindex G b c (Group) | ||
| 21622 | @findex nnmairix-create-server-and-default-group | ||
| 21623 | Creates @code{nnmairix} server and default search group for this server | ||
| 21624 | (@code{nnmairix-create-server-and-default-group}). You should have done | ||
| 21625 | this by now (@pxref{Configuring nnmairix}). | ||
| 21626 | |||
| 21627 | @item G b s | ||
| 21628 | @kindex G b s (Group) | ||
| 21629 | @findex nnmairix-search | ||
| 21630 | Prompts for query which is then sent to the mairix binary. Search | ||
| 21631 | results are put into the default search group which is automatically | ||
| 21632 | displayed (@code{nnmairix-search}). | ||
| 21633 | |||
| 21634 | @item G b m | ||
| 21635 | @kindex G b m (Group) | ||
| 21636 | @findex nnmairix-widget-search | ||
| 21637 | Allows you to create a mairix search or a permanent group more | ||
| 21638 | comfortably using graphical widgets, similar to a customization | ||
| 21639 | group. Just try it to see how it works (@code{nnmairix-widget-search}). | ||
| 21640 | |||
| 21641 | @item G b i | ||
| 21642 | @kindex G b i (Group) | ||
| 21643 | @findex nnmairix-search-interactive | ||
| 21644 | Another command for creating a mairix query more comfortably, but uses | ||
| 21645 | only the minibuffer (@code{nnmairix-search-interactive}). | ||
| 21646 | |||
| 21647 | @item G b g | ||
| 21648 | @kindex G b g (Group) | ||
| 21649 | @findex nnmairix-create-search-group | ||
| 21650 | Creates a permanent group which is associated with a search query | ||
| 21651 | (@code{nnmairix-create-search-group}). The @code{nnmairix} back end | ||
| 21652 | automatically calls mairix when you update this group with @kbd{g} or | ||
| 21653 | @kbd{M-g}. | ||
| 21654 | |||
| 21655 | @item G b q | ||
| 21656 | @kindex G b q (Group) | ||
| 21657 | @findex nnmairix-group-change-query-this-group | ||
| 21658 | Changes the search query for the @code{nnmairix} group under cursor | ||
| 21659 | (@code{nnmairix-group-change-query-this-group}). | ||
| 21660 | |||
| 21661 | @item G b t | ||
| 21662 | @kindex G b t (Group) | ||
| 21663 | @findex nnmairix-group-toggle-threads-this-group | ||
| 21664 | Toggles the 'threads' parameter for the @code{nnmairix} group under cursor, | ||
| 21665 | i.e. if you want see the whole threads of the found messages | ||
| 21666 | (@code{nnmairix-group-toggle-threads-this-group}). | ||
| 21667 | |||
| 21668 | @item G b u | ||
| 21669 | @kindex G b u (Group) | ||
| 21670 | @findex nnmairix-update-database | ||
| 21671 | @vindex nnmairix-mairix-update-options | ||
| 21672 | Calls mairix binary for updating the database | ||
| 21673 | (@code{nnmairix-update-database}). The default parameters are @code{-F} | ||
| 21674 | and @code{-Q} for making this as fast as possible (see variable | ||
| 21675 | @code{nnmairix-mairix-update-options} for defining these default | ||
| 21676 | options). | ||
| 21677 | |||
| 21678 | @item G b r | ||
| 21679 | @kindex G b r (Group) | ||
| 21680 | @findex nnmairix-group-toggle-readmarks-this-group | ||
| 21681 | Keep articles in this @code{nnmairix} group always read or unread, or leave the | ||
| 21682 | marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}). | ||
| 21683 | |||
| 21684 | @item G b d | ||
| 21685 | @kindex G b d (Group) | ||
| 21686 | @findex nnmairix-group-delete-recreate-this-group | ||
| 21687 | Recreate @code{nnmairix} group on the ``real'' mail back end | ||
| 21688 | (@code{nnmairix-group-delete-recreate-this-group}). You can do this if | ||
| 21689 | you always get wrong article counts with a @code{nnmairix} group. | ||
| 21690 | |||
| 21691 | @item G b a | ||
| 21692 | @kindex G b a (Group) | ||
| 21693 | @findex nnmairix-group-toggle-allowfast-this-group | ||
| 21694 | Toggles the @code{allow-fast} parameters for group under cursor | ||
| 21695 | (@code{nnmairix-group-toggle-allowfast-this-group}). The default | ||
| 21696 | behavior of @code{nnmairix} is to do a mairix search every time you | ||
| 21697 | update or enter the group. With the @code{allow-fast} parameter set, | ||
| 21698 | mairix will only be called when you explicitly update the group, but not | ||
| 21699 | upon entering. This makes entering the group faster, but it may also | ||
| 21700 | lead to dangling symlinks if something changed between updating and | ||
| 21701 | entering the group which is not yet in the mairix database. | ||
| 21702 | |||
| 21703 | @item G b p | ||
| 21704 | @kindex G b p (Group) | ||
| 21705 | @findex nnmairix-group-toggle-propmarks-this-group | ||
| 21706 | Toggle marks propagation for this group | ||
| 21707 | (@code{nnmairix-group-toggle-propmarks-this-group}). (@pxref{Propagating | ||
| 21708 | marks}). | ||
| 21709 | |||
| 21710 | @item G b o | ||
| 21711 | @kindex G b o (Group) | ||
| 21712 | @findex nnmairix-propagate-marks | ||
| 21713 | Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when | ||
| 21714 | @code{nnmairix-propagate-marks-upon-close} is set to @code{nil}. | ||
| 21715 | |||
| 21716 | @end table | ||
| 21717 | |||
| 21718 | In summary mode: | ||
| 21719 | |||
| 21720 | @table @kbd | ||
| 21721 | |||
| 21722 | @item $ m | ||
| 21723 | @kindex $ m (Summary) | ||
| 21724 | @findex nnmairix-widget-search-from-this-article | ||
| 21725 | Allows you to create a mairix query or group based on the current | ||
| 21726 | message using graphical widgets (same as @code{nnmairix-widget-search}) | ||
| 21727 | (@code{nnmairix-widget-search-from-this-article}). | ||
| 21728 | |||
| 21729 | @item $ g | ||
| 21730 | @kindex $ g (Summary) | ||
| 21731 | @findex nnmairix-create-search-group-from-message | ||
| 21732 | Interactively creates a new search group with query based on the current | ||
| 21733 | message, but uses the minibuffer instead of graphical widgets | ||
| 21734 | (@code{nnmairix-create-search-group-from-message}). | ||
| 21735 | |||
| 21736 | @item $ t | ||
| 21737 | @kindex $ t (Summary) | ||
| 21738 | @findex nnmairix-search-thread-this-article | ||
| 21739 | Searches thread for the current article | ||
| 21740 | (@code{nnmairix-search-thread-this-article}). This is effectively a | ||
| 21741 | shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the | ||
| 21742 | current article and enabled threads. | ||
| 21743 | |||
| 21744 | @item $ f | ||
| 21745 | @kindex $ f (Summary) | ||
| 21746 | @findex nnmairix-search-from-this-article | ||
| 21747 | Searches all messages from sender of the current article | ||
| 21748 | (@code{nnmairix-search-from-this-article}). This is a shortcut for | ||
| 21749 | calling @code{nnmairix-search} with @samp{f:From}. | ||
| 21750 | |||
| 21751 | @item $ o | ||
| 21752 | @kindex $ o (Summary) | ||
| 21753 | @findex nnmairix-goto-original-article | ||
| 21754 | (Only in @code{nnmairix} groups!) Tries determine the group this article | ||
| 21755 | originally came from and displays the article in this group, so that | ||
| 21756 | e.g. replying to this article the correct posting styles/group | ||
| 21757 | parameters are applied (@code{nnmairix-goto-original-article}). This | ||
| 21758 | function will use the registry if available, but can also parse the | ||
| 21759 | article file name as a fallback method. | ||
| 21760 | |||
| 21761 | @item $ u | ||
| 21762 | @kindex $ u (Summary) | ||
| 21763 | @findex nnmairix-remove-tick-mark-original-article | ||
| 21764 | Remove possibly existing tick mark from original article | ||
| 21765 | (@code{nnmairix-remove-tick-mark-original-article}). (@pxref{nnmairix | ||
| 21766 | tips and tricks}). | ||
| 21767 | |||
| 21768 | @end table | ||
| 21769 | |||
| 21770 | @node Propagating marks | ||
| 21771 | @subsection Propagating marks | ||
| 21772 | |||
| 21773 | First of: you really need a patched mairix binary for using the marks | ||
| 21774 | propagation feature efficiently. Otherwise, you would have to update | ||
| 21775 | the mairix database all the time. You can get the patch at | ||
| 21776 | |||
| 21777 | @uref{http://www.randomsample.de/mairix-maildir-patch.tar} | ||
| 21778 | |||
| 21779 | You need the mairix v0.21 source code for this patch; everything else | ||
| 21780 | is explained in the accompanied readme file. If you don't want to use | ||
| 21781 | marks propagation, you don't have to apply these patches, but they also | ||
| 21782 | fix some annoyances regarding changing maildir flags, so it might still | ||
| 21783 | be useful to you. | ||
| 21784 | |||
| 21785 | With the patched mairix binary, you can use @code{nnmairix} as an | ||
| 21786 | alternative to mail splitting (@pxref{Fancy Mail Splitting}). For | ||
| 21787 | example, instead of splitting all mails from @samp{david@@foobar.com} | ||
| 21788 | into a group, you can simply create a search group with the query | ||
| 21789 | @samp{f:david@@foobar.com}. This is actually what ``smart folders'' are | ||
| 21790 | all about: simply put everything in one mail folder and dynamically | ||
| 21791 | create searches instead of splitting. This is more flexible, since you | ||
| 21792 | can dynamically change your folders any time you want to. This also | ||
| 21793 | implies that you will usually read your mails in the @code{nnmairix} | ||
| 21794 | groups instead of your ``real'' mail groups. | ||
| 21795 | |||
| 21796 | There is one problem, though: say you got a new mail from | ||
| 21797 | @samp{david@@foobar.com}; it will now show up in two groups, the | ||
| 21798 | ``real'' group (your INBOX, for example) and in the @code{nnmairix} | ||
| 21799 | search group (provided you have updated the mairix database). Now you | ||
| 21800 | enter the @code{nnmairix} group and read the mail. The mail will be | ||
| 21801 | marked as read, but only in the @code{nnmairix} group---in the ``real'' | ||
| 21802 | mail group it will be still shown as unread. | ||
| 21803 | |||
| 21804 | You could now catch up the mail group (@pxref{Group Data}), but this is | ||
| 21805 | tedious and error prone, since you may overlook mails you don't have | ||
| 21806 | created @code{nnmairix} groups for. Of course, you could first use | ||
| 21807 | @code{nnmairix-goto-original-article} (@pxref{nnmairix keyboard | ||
| 21808 | shortcuts}) and then read the mail in the original group, but that's | ||
| 21809 | even more cumbersome. | ||
| 21810 | |||
| 21811 | Clearly, the easiest way would be if marks could somehow be | ||
| 21812 | automatically set for the original article. This is exactly what | ||
| 21813 | @emph{marks propagation} is about. | ||
| 21814 | |||
| 21815 | Marks propagation is deactivated by default. You can activate it for a | ||
| 21816 | certain @code{nnmairix} group with | ||
| 21817 | @code{nnmairix-group-toggle-propmarks-this-group} (bound to @kbd{G b | ||
| 21818 | p}). This function will warn you if you try to use it with your default | ||
| 21819 | search group; the reason is that the default search group is used for | ||
| 21820 | temporary searches, and it's easy to accidentally propagate marks from | ||
| 21821 | this group. However, you can ignore this warning if you really want to. | ||
| 21822 | |||
| 21823 | With marks propagation enabled, all the marks you set in a @code{nnmairix} | ||
| 21824 | group should now be propagated to the original article. For example, | ||
| 21825 | you can now tick an article (by default with @kbd{!}) and this mark should | ||
| 21826 | magically be set for the original article, too. | ||
| 21827 | |||
| 21828 | A few more remarks which you may or may not want to know: | ||
| 21829 | |||
| 21830 | @vindex nnmairix-propagate-marks-upon-close | ||
| 21831 | Marks will not be set immediately, but only upon closing a group. This | ||
| 21832 | not only makes marks propagation faster, it also avoids problems with | ||
| 21833 | dangling symlinks when dealing with maildir files (since changing flags | ||
| 21834 | will change the file name). You can also control when to propagate marks | ||
| 21835 | via @code{nnmairix-propagate-marks-upon-close} (see the doc-string for | ||
| 21836 | details). | ||
| 21837 | |||
| 21838 | Obviously, @code{nnmairix} will have to look up the original group for every | ||
| 21839 | article you want to set marks for. If available, @code{nnmairix} will first use | ||
| 21840 | the registry for determining the original group. The registry is very | ||
| 21841 | fast, hence you should really, really enable the registry when using | ||
| 21842 | marks propagation. If you don't have to worry about RAM and disc space, | ||
| 21843 | set @code{gnus-registry-max-entries} to a large enough value; to be on | ||
| 21844 | the safe side, choose roughly the amount of mails you index with mairix. | ||
| 21845 | |||
| 21846 | @vindex nnmairix-only-use-registry | ||
| 21847 | If you don't want to use the registry or the registry hasn't seen the | ||
| 21848 | original article yet, @code{nnmairix} will use an additional mairix | ||
| 21849 | search for determining the file name of the article. This, of course, is | ||
| 21850 | way slower than the registry---if you set hundreds or even thousands of | ||
| 21851 | marks this way, it might take some time. You can avoid this situation by | ||
| 21852 | setting @code{nnmairix-only-use-registry} to t. | ||
| 21853 | |||
| 21854 | Maybe you also want to propagate marks the other way round, i.e. if you | ||
| 21855 | tick an article in a "real" mail group, you'd like to have the same | ||
| 21856 | article in a @code{nnmairix} group ticked, too. For several good | ||
| 21857 | reasons, this can only be done efficiently if you use maildir. To | ||
| 21858 | immediately contradict myself, let me mention that it WON'T work with | ||
| 21859 | @code{nnmaildir}, since @code{nnmaildir} stores the marks externally and | ||
| 21860 | not in the file name. Therefore, propagating marks to @code{nnmairix} | ||
| 21861 | groups will usually only work if you use an IMAP server which uses | ||
| 21862 | maildir as its file format. | ||
| 21863 | |||
| 21864 | @vindex nnmairix-propagate-marks-to-nnmairix-groups | ||
| 21865 | If you work with this setup, just set | ||
| 21866 | @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t} and see what | ||
| 21867 | happens. If you don't like what you see, just set it to @code{nil} again. One | ||
| 21868 | problem might be that you get a wrong number of unread articles; this | ||
| 21869 | usually happens when you delete or expire articles in the original | ||
| 21870 | groups. When this happens, you can recreate the @code{nnmairix} group on the | ||
| 21871 | back end using @kbd{G b d}. | ||
| 21872 | |||
| 21873 | @node nnmairix tips and tricks | ||
| 21874 | @subsection nnmairix tips and tricks | ||
| 21875 | |||
| 21876 | @itemize | ||
| 21877 | @item | ||
| 21878 | Checking Mail | ||
| 21879 | |||
| 21880 | @findex nnmairix-update-groups | ||
| 21881 | I put all my important mail groups at group level 1. The mairix groups | ||
| 21882 | have group level 5, so they do not get checked at start up (@pxref{Group | ||
| 21883 | Levels}). | ||
| 21884 | |||
| 21885 | I use the following to check for mails: | ||
| 21886 | |||
| 21887 | @lisp | ||
| 21888 | (defun my-check-mail-mairix-update (level) | ||
| 21889 | (interactive "P") | ||
| 21890 | ;; if no prefix given, set level=1 | ||
| 21891 | (gnus-group-get-new-news (or level 1)) | ||
| 21892 | (nnmairix-update-groups "mairixsearch" t t) | ||
| 21893 | (gnus-group-list-groups)) | ||
| 21894 | |||
| 21895 | (define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update) | ||
| 21896 | @end lisp | ||
| 21897 | |||
| 21898 | Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix} | ||
| 21899 | server. See the doc string for @code{nnmairix-update-groups} for | ||
| 21900 | details. | ||
| 21901 | |||
| 21902 | @item | ||
| 21903 | Example: search group for ticked articles | ||
| 21904 | |||
| 21905 | For example, you can create a group for all ticked articles, where the | ||
| 21906 | articles always stay unread: | ||
| 21907 | |||
| 21908 | Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use | ||
| 21909 | @samp{F:f} as query and do not include threads. | ||
| 21910 | |||
| 21911 | Now activate marks propagation for this group by using @kbd{G b p}. Then | ||
| 21912 | activate the always-unread feature by using @kbd{G b r} twice. | ||
| 21913 | |||
| 21914 | So far so good---but how do you remove the tick marks in the @code{nnmairix} | ||
| 21915 | group? There are two options: You may simply use | ||
| 21916 | @code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove | ||
| 21917 | tick marks from the original article. The other possibility is to set | ||
| 21918 | @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t}, but see the above | ||
| 21919 | comments about this option. If it works for you, the tick marks should | ||
| 21920 | also exist in the @code{nnmairix} group and you can remove them as usual, | ||
| 21921 | e.g. by marking an article as read. | ||
| 21922 | |||
| 21923 | When you have removed a tick mark from the original article, this | ||
| 21924 | article should vanish from the @code{nnmairix} group after you have updated the | ||
| 21925 | mairix database and updated the group. Fortunately, there is a function | ||
| 21926 | for doing exactly that: @code{nnmairix-update-groups}. See the previous code | ||
| 21927 | snippet and the doc string for details. | ||
| 21928 | |||
| 21929 | @item | ||
| 21930 | Dealing with auto-subscription of mail groups | ||
| 21931 | |||
| 21932 | As described before, all @code{nnmairix} groups are in fact stored on | ||
| 21933 | the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can | ||
| 21934 | see them when you enter the back end server in the server buffer. You | ||
| 21935 | should not subscribe these groups! Unfortunately, these groups will | ||
| 21936 | usually get @emph{auto-subscribed} when you use @code{nnmaildir} or | ||
| 21937 | @code{nnml}, i.e. you will suddenly see groups of the form | ||
| 21938 | @samp{zz_mairix*} pop up in your group buffer. If this happens to you, | ||
| 21939 | simply kill these groups with C-k. For avoiding this, turn off | ||
| 21940 | auto-subscription completely by setting the variable | ||
| 21941 | @code{gnus-auto-subscribed-groups} to @code{nil} (@pxref{Filtering New | ||
| 21942 | Groups}), or if you like to keep this feature use the following kludge | ||
| 21943 | for turning it off for all groups beginning with @samp{zz_}: | ||
| 21944 | |||
| 21945 | @lisp | ||
| 21946 | (setq gnus-auto-subscribed-groups | ||
| 21947 | "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*") | ||
| 21948 | @end lisp | ||
| 21949 | |||
| 21950 | @end itemize | ||
| 21951 | |||
| 21952 | @node nnmairix caveats | ||
| 21953 | @subsection nnmairix caveats | ||
| 21954 | |||
| 21955 | @itemize | ||
| 21956 | @item | ||
| 21957 | You can create a secondary @code{nnml} server just for nnmairix, but then | ||
| 21958 | you have to explicitly set the corresponding server variable | ||
| 21959 | @code{nnml-get-new-mail} to @code{nil}. Otherwise, new mail might get | ||
| 21960 | put into this secondary server (and would never show up again). Here's | ||
| 21961 | an example server definition: | ||
| 21962 | |||
| 21963 | @lisp | ||
| 21964 | (nnml "mairix" (nnml-directory "mairix") (nnml-get-new-mail nil)) | ||
| 21965 | @end lisp | ||
| 21966 | |||
| 21967 | (The @code{nnmaildir} back end also has a server variabe | ||
| 21968 | @code{get-new-mail}, but its default value is @code{nil}, so you don't | ||
| 21969 | have to explicitly set it if you use a @code{nnmaildir} server just for | ||
| 21970 | mairix.) | ||
| 21971 | |||
| 21972 | @item | ||
| 21973 | If you use the Gnus registry: don't use the registry with | ||
| 21974 | @code{nnmairix} groups (put them in | ||
| 21975 | @code{gnus-registry-unfollowed-groups}). Be @emph{extra careful} if | ||
| 21976 | you use @code{gnus-registry-split-fancy-with-parent}; mails which are | ||
| 21977 | split into @code{nnmairix} groups are usually gone for good as soon as | ||
| 21978 | you check the group for new mail (yes, it has happened to me...). | ||
| 21979 | |||
| 21980 | @item | ||
| 21981 | Therefore: @emph{Never ever} put ``real'' mails into @code{nnmairix} | ||
| 21982 | groups (you shouldn't be able to, anyway). | ||
| 21983 | |||
| 21984 | @item | ||
| 21985 | If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize | ||
| 21986 | @code{nnmairix} groups (though I have no idea what happens if you do). | ||
| 21987 | |||
| 21988 | @item | ||
| 21989 | mairix does only support us-ascii characters. | ||
| 21990 | |||
| 21991 | @item | ||
| 21992 | @code{nnmairix} uses a rather brute force method to force Gnus to | ||
| 21993 | completely reread the group on the mail back end after mairix was | ||
| 21994 | called---it simply deletes and re-creates the group on the mail | ||
| 21995 | back end. So far, this has worked for me without any problems, and I | ||
| 21996 | don't see how @code{nnmairix} could delete other mail groups than its | ||
| 21997 | own, but anyway: you really should have a backup of your mail | ||
| 21998 | folders. | ||
| 21999 | |||
| 22000 | @item | ||
| 22001 | All necessary information is stored in the group parameters | ||
| 22002 | (@pxref{Group Parameters}). This has the advantage that no active file | ||
| 22003 | is needed, but also implies that when you kill a @code{nnmairix} group, | ||
| 22004 | it is gone for good. | ||
| 22005 | |||
| 22006 | @item | ||
| 22007 | @findex nnmairix-purge-old-groups | ||
| 22008 | If you create and kill a lot of @code{nnmairix} groups, the | ||
| 22009 | ``zz_mairix-*'' groups will accumulate on the mail back end server. To | ||
| 22010 | delete old groups which are no longer needed, call | ||
| 22011 | @code{nnmairix-purge-old-groups}. Note that this assumes that you don't | ||
| 22012 | save any ``real'' mail in folders of the form | ||
| 22013 | @code{zz_mairix-<NAME>-<NUMBER>}. You can change the prefix of | ||
| 22014 | @code{nnmairix} groups by changing the variable | ||
| 22015 | @code{nnmairix-group-prefix}. | ||
| 22016 | |||
| 22017 | @item | ||
| 22018 | The following only applies if you @emph{don't} use the mentioned patch | ||
| 22019 | for mairix (@pxref{Propagating marks}): | ||
| 22020 | |||
| 22021 | A problem can occur when using @code{nnmairix} with maildir folders and | ||
| 22022 | comes with the fact that maildir stores mail flags like @samp{Seen} or | ||
| 22023 | @samp{Replied} by appending chars @samp{S} and @samp{R} to the message | ||
| 22024 | file name, respectively. This implies that currently you would have to | ||
| 22025 | update the mairix database not only when new mail arrives, but also when | ||
| 22026 | mail flags are changing. The same applies to new mails which are indexed | ||
| 22027 | while they are still in the @samp{new} folder but then get moved to | ||
| 22028 | @samp{cur} when Gnus has seen the mail. If you don't update the database | ||
| 22029 | after this has happened, a mairix query can lead to symlinks pointing to | ||
| 22030 | non-existing files. In Gnus, these messages will usually appear with | ||
| 22031 | ``(none)'' entries in the header and can't be accessed. If this happens | ||
| 22032 | to you, using @kbd{G b u} and updating the group will usually fix this. | ||
| 22033 | |||
| 22034 | @end itemize | ||
| 22035 | |||
| 21694 | @iftex | 22036 | @iftex |
| 21695 | @iflatex | 22037 | @iflatex |
| 21696 | @chapter Message | 22038 | @chapter Message |