<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Copyright (C) 2008-2016 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover Texts being "A GNU Manual",
and with the Back-Cover Texts as in (a) below.  A copy of the license
is included in the section entitled "GNU Free Documentation License".

(a) The FSF's Back-Cover Text is: "You have the freedom to copy and
modify this GNU manual." -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->

<head>
  <meta name="generator" content=
  "HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 16.1), see www.w3.org" />

  <title>Emacs Interface for Mairix: Using</title>
  <meta name="description" content=
  "Emacs Interface for Mairix: Using" />
  <meta name="keywords" content=
  "Emacs Interface for Mairix: Using" />
  <meta name="resource-type" content="document" />
  <meta name="distribution" content="global" />
  <meta name="Generator" content="makeinfo" />
  <meta http-equiv="Content-Type" content=
  "text/html; charset=us-ascii" />
  <link href="index.html#Top" rel="start" title="Top" />
  <link href="index.html#SEC_Contents" rel="contents" title=
  "Table of Contents" />
  <link href="index.html#Top" rel="up" title="Top" />
  <link href="Extending.html#Extending" rel="next" title=
  "Extending" />
  <link href=
  "Setting-up-the-mairix-interface.html#Setting-up-the-mairix-interface"
  rel="prev" title="Setting up the mairix interface" />
  <style type="text/css">
/*<![CDATA[*/
  <!--
  a.summary-letter {text-decoration: none}
  blockquote.smallquotation {font-size: smaller}
  div.display {margin-left: 3.2em}
  div.example {margin-left: 3.2em}
  div.indentedblock {margin-left: 3.2em}
  div.lisp {margin-left: 3.2em}
  div.smalldisplay {margin-left: 3.2em}
  div.smallexample {margin-left: 3.2em}
  div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  div.smalllisp {margin-left: 3.2em}
  kbd {font-style:oblique}
  pre.display {font-family: inherit}
  pre.format {font-family: inherit}
  pre.menu-comment {font-family: serif}
  pre.menu-preformatted {font-family: serif}
  pre.smalldisplay {font-family: inherit; font-size: smaller}
  pre.smallexample {font-size: smaller}
  pre.smallformat {font-family: inherit; font-size: smaller}
  pre.smalllisp {font-size: smaller}
  span.nocodebreak {white-space:nowrap}
  span.nolinebreak {white-space:nowrap}
  span.roman {font-family:serif; font-weight:normal}
  span.sansserif {font-family:sans-serif; font-weight:normal}
  ul.no-bullet {list-style: none}
  -->
  /*]]>*/
  </style>
  <style type="text/css">
/*<![CDATA[*/
  body {
  background-color: #FFFFFF;
  color: #000000;
  }
  :link { color: #0000FF }
  :visited { color: #800080 }
  :active { color: #FF0000 }
  /*]]>*/
  </style>
</head>

<body lang="en" xml:lang="en">
  <a name="Using" id="Using"></a>

  <div class="header">
    <p>Next: <a href="Extending.html#Extending" accesskey="n" rel=
    "next">Extending</a>, Previous: <a href=
    "Setting-up-the-mairix-interface.html#Setting-up-the-mairix-interface"
    accesskey="p" rel="prev">Setting up the mairix interface</a>,
    Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a>
    &nbsp; [<a href="index.html#SEC_Contents" title=
    "Table of contents" rel="contents">Contents</a>]</p>
  </div>
  <hr />
  <a name="Using-mairix_002eel" id="Using-mairix_002eel"></a>

  <h2 class="chapter">4 Using mairix.el</h2>

  <p>There are currently no default key bindings for mairix.el,
  since those should depend on the used mail program and I
  personally do not use RMail, so I wouldn&rsquo;t know which key
  bindings are reasonable. I hope some day this will change and
  <code>mairix.el</code> will come with some good key bindings for
  the different mail programs. Feel free to send me your
  suggestions. Until then, define some bindings yourself.
  Here&rsquo;s a quick and dirty solution with global key
  definitions I currently use, which might or might not collide
  with some other modes. Simply include them in your
  <samp>.emacs</samp> and adapt to your needs:</p>

  <div class="lisp">
    <pre class="lisp">
(global-set-key (kbd "C-c C-o m") 'mairix-search)
(global-set-key (kbd "C-c C-o w") 'mairix-widget-search)
(global-set-key (kbd "C-c C-o u") 'mairix-update-database)
(global-set-key (kbd "C-c C-o f") 'mairix-search-from-this-article)
(global-set-key (kbd "C-c C-o t") 'mairix-search-thread-this-article)
(global-set-key (kbd "C-c C-o b") 'mairix-widget-search-based-on-article)
(global-set-key (kbd "C-c C-o s") 'mairix-save-search)
(global-set-key (kbd "C-c C-o i") 'mairix-use-saved-search)
(global-set-key (kbd "C-c C-o e") 'mairix-edit-saved-searches)
</pre>
  </div>

  <p>Here&rsquo;s a description of the available interactive
  functions:</p>

  <dl compact="compact">
    <dt><code>mairix-search</code></dt>

    <dd>
      <a name="index-M_002dx-mairix_002dsearch" id=
      "index-M_002dx-mairix_002dsearch"></a> <a name=
      "index-mairix_002dsearch" id="index-mairix_002dsearch"></a>
      <a name="index-mairix_002dsearch_002dfile" id=
      "index-mairix_002dsearch_002dfile"></a> <a name=
      "index-mairix_002dfile_002dpath" id=
      "index-mairix_002dfile_002dpath"></a> <a name=
      "index-mairix_002dcommand" id="index-mairix_002dcommand"></a>
      <a name="index-mairix_002dsearch_002doptions" id=
      "index-mairix_002dsearch_002doptions"></a>

      <p>Call mairix with a search query. You will also be asked if
      you want to include whole threads. The results are saved by
      mairix in the default mail file, which is set through the
      variable <code>mairix-search-file</code>, which again is
      prefixed by <code>mairix-file-path</code>. The results will
      then be displayed with the chosen mail program. The command
      used to call mairix is specified by the variable
      <code>mairix-command</code>, together with the options
      <code>mairix-search-options</code>. The latter has the
      default <samp>-F</samp> for making searching faster.</p>
    </dd>

    <dt><code>mairix-widget-search</code></dt>

    <dd>
      <a name="index-M_002dx-mairix_002dwidget_002dsearch" id=
      "index-M_002dx-mairix_002dwidget_002dsearch"></a> <a name=
      "index-mairix_002dwidget_002dsearch" id=
      "index-mairix_002dwidget_002dsearch"></a> <a name=
      "index-mairix_002dwidget_002dfields_002dlist" id=
      "index-mairix_002dwidget_002dfields_002dlist"></a>

      <p>Creates a mairix query using graphical widgets. Very handy
      if you&rsquo;re not (yet) familiar with the mairix search
      syntax. Just call it to see how it works. You can then
      directly call mairix with the search term or save it for
      future use. Since mairix allows almost arbitrary combinations
      of search commands (like &ldquo;tc&rdquo; for &ldquo;to or
      cc&rdquo;), you might want to include some other fields. This
      can be easily done by modifying
      <code>mairix-widget-fields-list</code>.</p>
    </dd>

    <dt><code>mairix-widget-search-based-on-article</code></dt>

    <dd>
      <a name=
      "index-M_002dx-mairix_002dwidget_002dsearch_002dbased_002don_002darticle"
      id=
      "index-M_002dx-mairix_002dwidget_002dsearch_002dbased_002don_002darticle">
      </a> <a name=
      "index-mairix_002dwidget_002dsearch_002dbased_002don_002darticle"
      id=
      "index-mairix_002dwidget_002dsearch_002dbased_002don_002darticle">
      </a>

      <p>Create a mairix query using graphical widgets, but based
      on the currently displayed article, i.e., the available
      fields will be filled with the current header values.</p>
    </dd>

    <dt><code>mairix-search-from-this-article</code></dt>

    <dd>
      <a name=
      "index-M_002dx-mairix_002dsearch_002dfrom_002dthis_002darticle"
      id=
      "index-M_002dx-mairix_002dsearch_002dfrom_002dthis_002darticle">
      </a> <a name=
      "index-mairix_002dsearch_002dfrom_002dthis_002darticle" id=
      "index-mairix_002dsearch_002dfrom_002dthis_002darticle"></a>

      <p>Search messages from sender of the current article. This
      is effectively a shortcut for calling
      <code>mairix-search</code> with <code>f:current_from</code>.
      If used with a prefix, include whole threads of the found
      messages.</p>
    </dd>

    <dt><code>mairix-search-thread-this-article</code></dt>

    <dd>
      <a name=
      "index-M_002dx-mairix_002dsearch_002dthread_002dthis_002darticle"
      id=
      "index-M_002dx-mairix_002dsearch_002dthread_002dthis_002darticle">
      </a> <a name=
      "index-mairix_002dsearch_002dthread_002dthis_002darticle" id=
      "index-mairix_002dsearch_002dthread_002dthis_002darticle"></a>

      <p>Search thread for the current article. This is effectively
      a shortcut for calling <code>mairix-search</code> with
      <code>m:msgid</code> of the current article and enabled
      threads.</p>
    </dd>

    <dt><code>mairix-save-search</code></dt>

    <dd>
      <a name="index-M_002dx-mairix_002dsave_002dsearch" id=
      "index-M_002dx-mairix_002dsave_002dsearch"></a> <a name=
      "index-mairix_002dsave_002dsearch" id=
      "index-mairix_002dsave_002dsearch"></a>

      <p>Save the last search for future use. You will have to
      specify a name for the search and will then be asked if you
      want to save your saved searches in your <samp>.emacs</samp>.
      If you answer with yes, the variable
      <code>mairix-saved-searches</code> will be saved in the
      customize section of your <samp>.emacs</samp>. You can also
      do this later by using
      <code>mairix-edit-saved-searches</code>.</p>
    </dd>

    <dt><code>mairix-use-saved-search</code></dt>

    <dd>
      <a name="index-M_002dx-mairix_002duse_002dsaved_002dsearch"
      id="index-M_002dx-mairix_002duse_002dsaved_002dsearch"></a>
      <a name="index-mairix_002duse_002dsaved_002dsearch" id=
      "index-mairix_002duse_002dsaved_002dsearch"></a>

      <p>Call mairix with a previously saved search. You will be
      asked for the name of the saved search (use <kbd>TAB</kbd>
      for completion).</p>
    </dd>

    <dt><code>mairix-edit-saved-searches</code></dt>

    <dd>
      <a name=
      "index-M_002dx-mairix_002dedit_002dsaved_002dsearches" id=
      "index-M_002dx-mairix_002dedit_002dsaved_002dsearches"></a>
      <a name="index-mairix_002dedit_002dsaved_002dsearches" id=
      "index-mairix_002dedit_002dsaved_002dsearches"></a>

      <p>Edit your current mairix searches. This is a simple major
      mode for editing the contents of the variable
      <code>mairix-saved-searches</code>. You can edit and delete
      searches and save them in your <samp>.emacs</samp>. You can
      also use this mode to call mairix with one of the saved
      searches. Additionally, you can specify a file name for
      mairix to use for a certain search instead of the default
      one. This is useful if you want to open different searches at
      the same time, or if you want to regularly access certain
      searches without the need to call mairix.</p>
    </dd>

    <dt><code>mairix-edit-saved-searches-customize</code></dt>

    <dd>
      <a name=
      "index-M_002dx-mairix_002dedit_002dsaved_002dsearches_002dcustomize"
      id=
      "index-M_002dx-mairix_002dedit_002dsaved_002dsearches_002dcustomize">
      </a> <a name=
      "index-mairix_002dedit_002dsaved_002dsearches_002dcustomize"
      id=
      "index-mairix_002dedit_002dsaved_002dsearches_002dcustomize"></a>

      <p>Edit the variable <code>mairix-saved-searches</code> in a
      normal customization buffer. This function exists more or
      less for historic reasons, but maybe you like it.</p>
    </dd>

    <dt><code>mairix-update-database</code></dt>

    <dd>
      <a name="index-M_002dx-mairix_002dupdate_002ddatabase" id=
      "index-M_002dx-mairix_002dupdate_002ddatabase"></a> <a name=
      "index-mairix_002dupdate_002ddatabase" id=
      "index-mairix_002dupdate_002ddatabase"></a> <a name=
      "index-mairix_002dupdate_002doptions" id=
      "index-mairix_002dupdate_002doptions"></a> <a name=
      "index-mairix_002dsynchronous_002dupdate" id=
      "index-mairix_002dsynchronous_002dupdate"></a>

      <p>Call mairix to update the database. Mairix will be called
      with the options <code>mairix-update-options</code>; the
      default is <samp>-F</samp> and <samp>-Q</samp> to make
      updates as fast as possible. Note that by using these
      options, absolutely no integrity checking is done. If your
      database somehow gets corrupted, simply delete it and update.
      If <code>mairix-synchronous-update</code> is <code>nil</code>
      (the default), mairix will be called in a subprocess so Emacs
      will still be usable while the update is done.</p>
    </dd>
  </dl>
  <hr />

  <div class="header">
    <p>Next: <a href="Extending.html#Extending" accesskey="n" rel=
    "next">Extending</a>, Previous: <a href=
    "Setting-up-the-mairix-interface.html#Setting-up-the-mairix-interface"
    accesskey="p" rel="prev">Setting up the mairix interface</a>,
    Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a>
    &nbsp; [<a href="index.html#SEC_Contents" title=
    "Table of contents" rel="contents">Contents</a>]</p>
  </div>
</body>
</html>
