]> git.cworth.org Git - notmuch/commitdiff
Merge tag 'debian/0.27-1' into debian/stretch-backports
authorDavid Bremner <david@tethera.net>
Tue, 19 Jun 2018 00:18:58 +0000 (21:18 -0300)
committerDavid Bremner <david@tethera.net>
Tue, 19 Jun 2018 00:18:58 +0000 (21:18 -0300)
notmuch Debian 0.27-1 upload (same as 0.27)

106 files changed:
.travis.yml
AUTHORS
INSTALL
Makefile.local
NEWS
bindings/Makefile.local
bindings/python/docs/COPYING
bindings/python/docs/source/conf.py
bindings/python/docs/source/filesystem.rst
bindings/python/docs/source/message.rst
bindings/python/notmuch/database.py
bindings/python/notmuch/filenames.py
bindings/python/notmuch/globals.py
bindings/python/notmuch/message.py
bindings/python/notmuch/messages.py
bindings/python/notmuch/tag.py
bindings/python/notmuch/thread.py
bindings/python/notmuch/threads.py
bindings/python/notmuch/version.py
completion/notmuch-completion.bash
configure
contrib/go/src/notmuch/notmuch.go
debian/changelog
debian/control
debian/elpa-notmuch.elpa
debian/gbp.conf
debian/libnotmuch5.symbols
devel/nmbug/doc/man5/notmuch-report.json.5.rst
devel/nmbug/notmuch-report
devel/release-checks.sh
doc/Makefile.local
doc/man1/notmuch-address.rst
doc/man1/notmuch-compact.rst
doc/man1/notmuch-config.rst
doc/man1/notmuch-count.rst
doc/man1/notmuch-dump.rst
doc/man1/notmuch-emacs-mua.rst
doc/man1/notmuch-insert.rst
doc/man1/notmuch-new.rst
doc/man1/notmuch-reindex.rst
doc/man1/notmuch-reply.rst
doc/man1/notmuch-restore.rst
doc/man1/notmuch-search.rst
doc/man1/notmuch-show.rst
doc/man1/notmuch-tag.rst
doc/man1/notmuch.rst
doc/man5/notmuch-hooks.rst
doc/man7/notmuch-properties.rst
doc/man7/notmuch-search-terms.rst
doc/notmuch-emacs.rst
emacs/Makefile.local
emacs/notmuch-hello.el
emacs/notmuch-mua.el
emacs/notmuch-show.el
gmime-filter-reply.c
lib/Makefile.local
lib/database.cc
lib/index.cc
lib/message-property.cc
lib/message.cc
lib/notmuch-private.h
lib/notmuch.h
lib/query.cc
lib/string-map.c
lib/thread-fp.cc [new file with mode: 0644]
lib/thread-fp.h [new file with mode: 0644]
lib/thread.cc
mime-node.c
notmuch-client.h
notmuch-insert.c
notmuch-new.c
notmuch-reindex.c
notmuch-show.c
notmuch.c
parse-time-string/parse-time-string.h
performance-test/T04-thread-subquery.sh [new file with mode: 0755]
status.c
tag-util.h
test/T050-new.sh
test/T070-insert.sh
test/T080-search.sh
test/T190-multipart.sh
test/T310-emacs.sh
test/T357-index-decryption.sh
test/T410-argument-parsing.sh
test/T460-emacs-tree.sh
test/T585-thread-subquery.sh [new file with mode: 0755]
test/T610-message-property.sh
test/T670-duplicate-mid.sh
test/T700-reindex.sh
test/corpora/broken/loop/loop-12 [new file with mode: 0644]
test/corpora/broken/loop/loop-21 [new file with mode: 0644]
test/emacs-tree.expected-output/notmuch-tree-show-window [new file with mode: 0644]
test/emacs-tree.expected-output/notmuch-tree-single-thread [new file with mode: 0644]
test/emacs-tree.expected-output/notmuch-tree-tag-inbox [new file with mode: 0644]
test/emacs-tree.expected-output/notmuch-tree-tag-inbox-tagged [new file with mode: 0644]
test/emacs-tree.expected-output/notmuch-tree-tag-inbox-thread-tagged [new file with mode: 0644]
test/test-lib.sh
test/tree.expected-output/notmuch-tree-show-window [deleted file]
test/tree.expected-output/notmuch-tree-single-thread [deleted file]
test/tree.expected-output/notmuch-tree-tag-inbox [deleted file]
test/tree.expected-output/notmuch-tree-tag-inbox-tagged [deleted file]
test/tree.expected-output/notmuch-tree-tag-inbox-thread-tagged [deleted file]
util/util.h
version
vim/README

index 802efd98c30d2eeef2963ad210368a62091b5e5a..79802b7b1234aea09ad9dc1cfc3eeddea72ba446 100644 (file)
@@ -10,8 +10,7 @@ addons:
     - libxapian-dev
     - libgmime-2.6-dev
     - libtalloc-dev
-    - python-sphinx
-    - gdb
+    - python3-sphinx
     - gpgsm
 
 script:
diff --git a/AUTHORS b/AUTHORS
index 6d0f2de8ce45c79d77c951753de0332a8aba9106..5fe5006f58ce99916e94361346e1e19593605397 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,7 +3,7 @@ But there's really not much that he's done. There's been a lot of
 standing on shoulders here:
 
 William Morgan deserves credit for providing the primary inspiration
-for Notmuch with his program Sup (http://sup.rubyforge.org/).
+for Notmuch with his program Sup (https://sup-heliotrope.github.io/).
 
 Some people have contributed code that has made it into Notmuch
 without their specific knowledge (but with their full permission
diff --git a/INSTALL b/INSTALL
index 875014f01bcd1e201e3999a4d35b4ab4665fa91d..6e6f4799aee7ffc8137c6b76b59ae32894d59df6 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -46,7 +46,7 @@ Talloc, and zlib which are each described below:
        Without GMime, Notmuch would not be able to extract and index
        the actual text from email message encoded as BASE64, etc.
 
-       GMime is available from http://spruce.sourceforge.net/gmime/
+       GMime is available from https://github.com/jstedfast/gmime
 
        Talloc
        ------
@@ -70,7 +70,7 @@ Talloc, and zlib which are each described below:
        Notmuch needs the transparent write feature of zlib introduced
        in version 1.2.5.2 (Dec. 2011).
 
-       zlib is available from http://zlib.net
+       zlib is available from https://zlib.net
 
 Building Documentation
 ----------------------
@@ -80,19 +80,22 @@ of sphinx (Jul. 2010).
 
 Sphinx is available from www.sphinx-doc.org.
 
+To install the documentation as "info" pages, you will need the
+additional tools makeinfo and install-info.
+
 Installing Dependencies from Packages
 -------------------------------------
 
 On a modern, package-based operating system you can install all of the
-dependencies with a simple simple command line. For example:
+dependencies with a single simple command line. For example:
 
   For Debian and similar:
 
-        sudo apt-get install libxapian-dev libgmime-3.0-dev libtalloc-dev zlib1g-dev python-sphinx
+        sudo apt-get install libxapian-dev libgmime-3.0-dev libtalloc-dev zlib1g-dev python3-sphinx texinfo install-info
 
   For Fedora and similar:
 
-       sudo yum install xapian-core-devel gmime-devel libtalloc-devel zlib-devel python-sphinx
+       sudo yum install xapian-core-devel gmime-devel libtalloc-devel zlib-devel python3-sphinx texinfo info
 
 On other systems, a similar command can be used, but the details of
 the package names may be different.
index 1535c2ae8a7bcbe53ccfaa38efcdf2721ca28267..82145e1b4e8e83122f44bb3313fbe457e261bfe9 100644 (file)
@@ -1,7 +1,7 @@
 # -*- makefile -*-
 
 .PHONY: all
-all: notmuch notmuch-shared build-man ruby-bindings
+all: notmuch notmuch-shared build-man build-info ruby-bindings
 ifeq ($(MAKECMDGOALS),)
 ifeq ($(shell cat .first-build-message 2>/dev/null),)
        @NOTMUCH_FIRST_BUILD=1 $(MAKE) --no-print-directory all
@@ -76,7 +76,7 @@ release: verify-source-tree-and-version
        mv $(TAR_FILE) $(SHA256_FILE) $(GPG_FILE) releases
        $(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce
 ifeq ($(REALLY_UPLOAD),yes)
-       git push origin $(VERSION)
+       git push origin $(VERSION) $(DEB_TAG) release pristine-tar
        cd releases && scp $(TAR_FILE) $(SHA256_FILE) $(GPG_FILE) $(RELEASE_HOST):$(RELEASE_DIR)
        ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-* ; ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(TAR_FILE)"
 endif
@@ -176,7 +176,7 @@ verify-newer:
             echo "Refusing to replace an existing release."; \
             echo "Don't forget to update \"version\" as described in RELEASING before release." ; \
             false ;; \
-         *) echo "An unexpected error occured"; \
+         *) echo "An unexpected error occurred"; \
             false;; esac
 
 # The user has not set any verbosity, default to quiet mode and inform the
@@ -260,7 +260,7 @@ notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)
        $(call quiet,$(FINAL_NOTMUCH_LINKER) $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@
 
 .PHONY: install
-install: all install-man
+install: all install-man install-info
        mkdir -p "$(DESTDIR)$(prefix)/bin/"
        install notmuch-shared "$(DESTDIR)$(prefix)/bin/notmuch"
 ifeq ($(MAKECMDGOALS), install)
diff --git a/NEWS b/NEWS
index 01ac3942455f2a06b514d1987262e719c6a1abef..fc77f5323ea96f55094e62074dbb109fb2c25a91 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,67 @@
+Notmuch 0.27 (2018-06-13)
+=========================
+
+General
+-------
+
+Add support for thread:{} queries
+
+  Queries of the form `thread:{foo} and thread:{bar}` match threads
+  containing (possibly distinct) messages matching foo and bar. See
+  `notmuch-search-terms(7)` for details.
+
+Command Line Interface
+----------------------
+
+Add the --full-scan option to `notmuch new`
+
+  This option disables mtime based optimization of scanning for new mail.
+
+Add new --decrypt=stash option for `notmuch show`
+
+  This facilitates a workflow for encrypted messages where message
+  cleartext are indexed on first read, but the user's decryption key
+  does not have to be available during message receipt.
+
+Documentation
+-------------
+
+An initial manual for `notmuch-emacs` is now installed by default (in
+`info` format).
+
+Dependencies
+------------
+
+As of this release, support for versions of Xapian before 1.4.0 is
+deprecated, and may disappear in a future release of notmuch.
+
+Notmuch 0.26.2 (2018-04-28)
+===========================
+
+Library Changes
+---------------
+
+Work around Xapian bug with `get_mset(0,0, x)`.
+
+  This causes aborts in `_notmuch_query_count_documents` on
+  e.g. Fedora 28.  The underlying bug is fixed in Xapian commit
+  f92e2a936c1592, and will be fixed in Xapian 1.4.6.
+
+Make thread indexing more robust against reference loops
+
+  Choose a thread root by date in case of reference loops. Fix a
+  related abort in `notmuch show`.
+
+Notmuch 0.26.1 (2018-04-02)
+===========================
+
+Library Changes
+---------------
+
+Bump the library minor version. This should have happened in 0.26, but
+better late than never.
+
+
 Notmuch 0.26 (2018-01-09)
 =========================
 
@@ -664,7 +728,7 @@ Fixed constant values so they are not all zero anymore
   Previously, it was impossible to open writable database handles,
   because `DATABASE_MODE_READ_ONLY` and `DATABASE_MODE_READ_WRITE` were
   both set to zero.
-  The same issue occured with sort modes.
+  The same issue occurred with sort modes.
 
 Notmuch 0.22.2 (2016-09-08)
 ===========================
@@ -1024,7 +1088,7 @@ Path to gpg is now configurable
 Emacs
 -----
 
-Avoid rendering large text attachements.
+Avoid rendering large text attachments.
 
 Improved rendering of CID references in HTML.
 
@@ -1065,7 +1129,7 @@ Documentation
 Sphinx is now mandatory to build docs
 
   Support for using rst2man in place of sphinx to build the
-  docmumentation has been removed.
+  documentation has been removed.
 
 Improved notmuch-search-terms.7
 
@@ -1444,7 +1508,7 @@ Command-Line Interface
 The commands set consistent exit status codes on failures
 
   The cli commands now consistently set exit status of 1 on failures,
-  except where explicitly otherwise noted. The notable expections are
+  except where explicitly otherwise noted. The notable exceptions are
   the status codes for format version mismatches for commands that
   support formatted output.
 
@@ -1578,7 +1642,7 @@ uses `@{upstream}` instead of `FETCH_HEAD` to track upstream changes.
   2. Remove your `NMBGIT` repository (e.g. `mv .nmbug .nmbug.bak`).
   3. Use the new `clone` command to create a fresh clone:
 
-        nmbug clone http://nmbug.tethera.net/git/nmbug-tags.git
+        nmbug clone https://nmbug.notmuchmail.org/git/nmbug-tags.git
 
   4. If you had local commits in step 1, add a remote for that
      repository and fetch them into the new repository.
@@ -2654,7 +2718,7 @@ Turn "id:MSG-ID" links into buttons associated with notmuch searches
 
 Add keybinding ('c I') for stashing Message-ID's without an id: prefix
 
-  Reduces manual labour when stashing them for use outside notmuch.
+  Reduces manual labor when stashing them for use outside notmuch.
 
 Do not query on `notmuch-search` exit
 
@@ -2689,7 +2753,7 @@ mailing list.
 nmbug - share tags with a given prefix
 
   nmbug helps maintain a git repo containing all tags with a given
-  prefix (by default "notmuch::"). Tags can be shared by commiting
+  prefix (by default "notmuch::"). Tags can be shared by committing
   them to git in one location and restoring in another.
 
 Notmuch 0.9 (2011-10-01)
index 17b561caac52dfc17a1f4fc9e56758b32dbb25fd..18f958359bf0c58e23b7dee7b3c9586dcc9c29ec 100644 (file)
@@ -9,7 +9,7 @@ ifeq ($(HAVE_RUBY_DEV),1)
                EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
                LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
                NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \
-               ruby extconf.rb --vendor
+               $(RUBY) extconf.rb --vendor
        $(MAKE) -C $(dir)/ruby
 endif
 
@@ -18,3 +18,5 @@ CLEAN += $(patsubst %,$(dir)/ruby/%, \
        Makefile database.o directory.o filenames.o\
        init.o message.o messages.o mkmf.log notmuch.so query.o \
        status.o tags.o thread.o threads.o)
+
+CLEAN += bindings/ruby/.vendorarchdir.time
index 2a000655e93f84c8d458d702e13a0f682a45cf45..e60008693e017bec1b4eb49c84be3898e26fcf2a 100644 (file)
@@ -1,7 +1,7 @@
                     GNU GENERAL PUBLIC LICENSE
                        Version 3, 29 June 2007
 
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
index 5107a96ea2f4c32769bcca760072300a50113ea4..5b901c4ec4d82e18ed3a406a8dd7915e34668422 100644 (file)
@@ -215,4 +215,4 @@ latex_documents = [
 
 
 # Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
+intersphinx_mapping = {'https://docs.python.org/': None}
index a23ae41a875685214c45a57bfb41720e29f3538f..558c93de592af64be4c15839cf541a6d1f95fa4d 100644 (file)
@@ -14,7 +14,7 @@ Files and directories
       iterator and broke list(Filenames()). Use `len(list(names))`
       instead.
 
-:class:`Directoy` -- A directory entry in the database
+:class:`Directory` -- A directory entry in the database
 ------------------------------------------------------
 
 .. autoclass:: Directory
index 1a6cc3d52240a0881af9a429c584694339cbd287..b0033924a89b50bce6b1ade3905012260eb1f815 100644 (file)
 
    .. automethod:: get_tags
 
+   .. automethod:: get_property
+
+   .. automethod:: get_properties
+
    .. automethod:: maildir_flags_to_tags
 
    .. automethod:: tags_to_maildir_flags
index a1ae14fc40ccbc11608034b874ca7a3cd94436f0..342d665a224761a2557ea00233f7d99c7dbae321 100644 (file)
@@ -566,7 +566,7 @@ class Database(object):
         :returns: :class:`Message` or `None` if no message is found.
         :raises:
             :exc:`OutOfMemoryError`
-                  If an Out-of-memory occured while constructing the message.
+                  If an Out-of-memory occurred while constructing the message.
             :exc:`XapianError`
                   In case of a Xapian Exception. These exceptions
                   include "Database modified" situations, e.g. when the
@@ -591,7 +591,7 @@ class Database(object):
             function returns None if no message is found with the given
             filename.
 
-        :raises: :exc:`OutOfMemoryError` if an Out-of-memory occured while
+        :raises: :exc:`OutOfMemoryError` if an Out-of-memory occurred while
                  constructing the message.
         :raises: :exc:`XapianError` in case of a Xapian Exception.
                  These exceptions include "Database modified"
index 29f4fdf60d4b63650f00e16d22c0349c508618de..3bbc22b9f124767f25381ece8acca7a5f24f8aba 100644 (file)
@@ -67,7 +67,7 @@ class Filenames(Python3StringMixIn):
     def __init__(self, files_p, parent):
         """
         :param files_p: A pointer to an underlying *notmuch_tags_t*
-             structure. These are not publically exposed, so a user
+             structure. These are not publicly exposed, so a user
              will almost never instantiate a :class:`Tags` object
              herself. They are usually handed back as a result,
              e.g. in :meth:`Database.get_all_tags`.  *tags_p* must be
index 97413996c2577691bef8267c3f08e05053b830cf..11e328b76c6e8fbb94997ddbf19bcb0d47b41dd2 100644 (file)
@@ -75,6 +75,11 @@ class NotmuchMessageS(Structure):
 NotmuchMessageP = POINTER(NotmuchMessageS)
 
 
+class NotmuchMessagePropertiesS(Structure):
+    pass
+NotmuchMessagePropertiesP = POINTER(NotmuchMessagePropertiesS)
+
+
 class NotmuchTagsS(Structure):
     pass
 NotmuchTagsP = POINTER(NotmuchTagsS)
index d5b98e4fdfdf5ab19e41fcda61ce0fc57d7b301f..d242097a8299eff8885db7c93a64e9b3b1de8b27 100644 (file)
@@ -19,7 +19,7 @@ Copyright 2010 Sebastian Spaeth <Sebastian@SSpaeth.de>
 """
 
 
-from ctypes import c_char_p, c_long, c_uint, c_int
+from ctypes import c_char_p, c_long, c_uint, c_int, POINTER, byref
 from datetime import date
 from .globals import (
     nmlib,
@@ -29,6 +29,7 @@ from .globals import (
     NotmuchTagsP,
     NotmuchMessageP,
     NotmuchMessagesP,
+    NotmuchMessagePropertiesP,
     NotmuchFilenamesP,
 )
 from .errors import (
@@ -113,6 +114,36 @@ class Message(Python3StringMixIn):
     _maildir_flags_to_tags.argtypes = [NotmuchMessageP]
     _maildir_flags_to_tags.restype = c_int
 
+    """notmuch_message_get_property"""
+    _get_property = nmlib.notmuch_message_get_property
+    _get_property.argtypes = [NotmuchMessageP, c_char_p, POINTER(c_char_p)]
+    _get_property.restype = c_int
+
+    """notmuch_message_get_properties"""
+    _get_properties = nmlib.notmuch_message_get_properties
+    _get_properties.argtypes = [NotmuchMessageP, c_char_p, c_int]
+    _get_properties.restype = NotmuchMessagePropertiesP
+
+    """notmuch_message_properties_valid"""
+    _properties_valid = nmlib.notmuch_message_properties_valid
+    _properties_valid.argtypes = [NotmuchMessagePropertiesP]
+    _properties_valid.restype = bool
+
+    """notmuch_message_properties_value"""
+    _properties_value = nmlib.notmuch_message_properties_value
+    _properties_value.argtypes = [NotmuchMessagePropertiesP]
+    _properties_value.restype = c_char_p
+
+    """notmuch_message_properties_key"""
+    _properties_key = nmlib.notmuch_message_properties_key
+    _properties_key.argtypes = [NotmuchMessagePropertiesP]
+    _properties_key.restype = c_char_p
+
+    """notmuch_message_properties_move_to_next"""
+    _properties_move_to_next = nmlib.notmuch_message_properties_move_to_next
+    _properties_move_to_next.argtypes = [NotmuchMessagePropertiesP]
+    _properties_move_to_next.restype = None
+
     #Constants: Flags that can be set/get with set_flag
     FLAG = Enum(['MATCH'])
 
@@ -223,7 +254,7 @@ class Message(Python3StringMixIn):
         :returns: The header value as string
         :raises: :exc:`NotInitializedError` if the message is not
                  initialized
-        :raises: :exc:`NullPointerError` if any error occured
+        :raises: :exc:`NullPointerError` if any error occurred
         """
         if not self._msg:
             raise NotInitializedError()
@@ -295,7 +326,7 @@ class Message(Python3StringMixIn):
         :returns: A :class:`Tags` iterator.
         :raises: :exc:`NotInitializedError` if the message is not
                  initialized
-        :raises: :exc:`NullPointerError` if any error occured
+        :raises: :exc:`NullPointerError` if any error occurred
         """
         if not self._msg:
             raise NotInitializedError()
@@ -433,6 +464,53 @@ class Message(Python3StringMixIn):
     _freeze.argtypes = [NotmuchMessageP]
     _freeze.restype = c_uint
 
+    def get_property(self, prop):
+        """ Retrieve the value for a single property key
+
+        :param prop: The name of the property to get.
+        :returns: String with the property value or None if there is no such
+                  key. In the case of multiple values for the given key, the
+                  first one is retrieved.
+        :raises: :exc:`NotInitializedError` if message has not been
+                 initialized
+        """
+        if not self._msg:
+            raise NotInitializedError()
+
+        value = c_char_p()
+        status = Message._get_property(self._msg, _str(prop), byref(value))
+        if status != 0:
+            raise NotmuchError(status)
+
+        return value.value.decode('utf-8')
+
+    def get_properties(self, prop="", exact=False):
+        """ Get the properties of the message, returning a generator of
+        name, value pairs.
+
+        The generator will yield once per value. There might be more than one
+        value on each name, so the generator might yield the same name several
+        times.
+
+        :param prop: The name of the property to get. Otherwise it will return
+                     the full list of properties of the message.
+        :param exact: if True, require exact match with key. Otherwise
+                      treat as prefix.
+        :yields:  Each property values as a pair of `name, value`
+        :ytype:   pairs of str
+        :raises: :exc:`NotInitializedError` if message has not been
+                 initialized
+        """
+        if not self._msg:
+            raise NotInitializedError()
+
+        properties = Message._get_properties(self._msg, _str(prop), exact)
+        while Message._properties_valid(properties):
+            key = Message._properties_key(properties)
+            value = Message._properties_value(properties)
+            yield key.decode("utf-8"), value.decode("utf-8")
+            Message._properties_move_to_next(properties)
+
     def freeze(self):
         """Freezes the current state of 'message' within the database
 
index e17f1507ec9032299535e47222c706d55688e271..cae5da508f353f12cca585cb056c0b9ed92e29b3 100644 (file)
@@ -100,7 +100,7 @@ class Messages(object):
     def __init__(self, msgs_p, parent=None):
         """
         :param msgs_p:  A pointer to an underlying *notmuch_messages_t*
-             structure. These are not publically exposed, so a user
+             structure. These are not publicly exposed, so a user
              will almost never instantiate a :class:`Messages` object
              herself. They are usually handed back as a result,
              e.g. in :meth:`Query.search_messages`.  *msgs_p* must be
index 3b4a56accb1a2c7c7d3fb2351d078d1109f02ae1..fbb18ce47f004fe137a59ef13893f72481b276a9 100644 (file)
@@ -64,7 +64,7 @@ class Tags(Python3StringMixIn):
     def __init__(self, tags_p, parent=None):
         """
         :param tags_p: A pointer to an underlying *notmuch_tags_t*
-             structure. These are not publically exposed, so a user
+             structure. These are not publicly exposed, so a user
              will almost never instantiate a :class:`Tags` object
              herself. They are usually handed back as a result,
              e.g. in :meth:`Database.get_all_tags`.  *tags_p* must be
index ed96188541ae1606c1537f0b48c667139cd50eca..9aa0e08cec90ba212fa481bfc0aac1e26c293509 100644 (file)
@@ -71,7 +71,7 @@ class Thread(object):
     def __init__(self, thread_p, parent=None):
         """
         :param thread_p: A pointer to an internal notmuch_thread_t
-            Structure.  These are not publically exposed, so a user
+            Structure.  These are not publicly exposed, so a user
             will almost never instantiate a :class:`Thread` object
             herself. They are usually handed back as a result,
             e.g. when iterating through :class:`Threads`. *thread_p*
index 86f1f2ccc6da235bc389e050d9fb9619a3ffe726..0c382d5b8f187213b26fabd45c2c76486b7f5a01 100644 (file)
@@ -85,7 +85,7 @@ class Threads(Python3StringMixIn):
     def __init__(self, threads_p, parent=None):
         """
         :param threads_p:  A pointer to an underlying *notmuch_threads_t*
-             structure. These are not publically exposed, so a user
+             structure. These are not publicly exposed, so a user
              will almost never instantiate a :class:`Threads` object
              herself. They are usually handed back as a result,
              e.g. in :meth:`Query.search_threads`.  *threads_p* must be
index bc246330551462f8a71c00c916d93a85bdcf21c4..fbb282e32e4a9bbcc3712808d4d866d3b7bee6e3 100644 (file)
@@ -1,3 +1,3 @@
 # this file should be kept in sync with ../../../version
-__VERSION__ = '0.26'
+__VERSION__ = '0.27'
 SOVERSION = '5'
index 249b9664259cf3206a0b1d1f16f2abfae5e17c5b..15425697a215290e79a4d58e7cdf4884f3a5f2bc 100644 (file)
@@ -522,7 +522,7 @@ _notmuch_show()
            return
            ;;
         --decrypt)
-           COMPREPLY=( $( compgen -W "true auto false" -- "${cur}" ) )
+           COMPREPLY=( $( compgen -W "true auto false stash" -- "${cur}" ) )
            return
            ;;
     esac
index b177b14130f0a966ccec5b1453affbf92ad577c7..ab7e1610a0c58c83f942bb5754c14b2657384657 100755 (executable)
--- a/configure
+++ b/configure
@@ -62,6 +62,7 @@ CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}
 LDFLAGS=${LDFLAGS:-}
 XAPIAN_CONFIG=${XAPIAN_CONFIG:-}
 PYTHON=${PYTHON:-}
+RUBY=${RUBY:-ruby}
 
 # We don't allow the EMACS or GZIP Makefile variables inherit values
 # from the environment as we do with CC and CXX above. The reason is
@@ -118,6 +119,8 @@ Other environment variables can be used to control configure itself,
                        library. [$XAPIAN_CONFIG]
        PYTHON          Name of python command to use in
                        configure and the test suite.
+       RUBY            Name of ruby command to use in
+                       configure and the test suite.
 
 Additionally, various options can be specified on the configure
 command line.
@@ -136,6 +139,7 @@ Fine tuning of some installation directories is available:
        --libdir=DIR            Install libraries to DIR [PREFIX/lib]
        --includedir=DIR        Install header files to DIR [PREFIX/include]
        --mandir=DIR            Install man pages to DIR [PREFIX/share/man]
+       --infodir=DIR           Install man pages to DIR [PREFIX/share/man]
        --sysconfdir=DIR        Read-only single-machine data [PREFIX/etc]
        --emacslispdir=DIR      Emacs code [PREFIX/share/emacs/site-lisp]
        --emacsetcdir=DIR       Emacs miscellaneous files [PREFIX/share/emacs/site-lisp]
@@ -159,7 +163,6 @@ configure-script calling conventions, but don't do anything yet:
 
        --build=<cpu>-<vendor>-<os>     Currently ignored
        --host=<cpu>-<vendor>-<os>      Currently ignored
-       --infodir=DIR                   Currently ignored
        --datadir=DIR                   Currently ignored
        --localstatedir=DIR             Currently ignored
        --libexecdir=DIR                Currently ignored
@@ -182,6 +185,8 @@ for option; do
        INCLUDEDIR="${option#*=}"
     elif [ "${option%%=*}" = '--mandir' ] ; then
        MANDIR="${option#*=}"
+    elif [ "${option%%=*}" = '--infodir' ] ; then
+       INFODIR="${option#*=}"
     elif [ "${option%%=*}" = '--sysconfdir' ] ; then
        SYSCONFDIR="${option#*=}"
     elif [ "${option%%=*}" = '--emacslispdir' ] ; then
@@ -262,8 +267,6 @@ for option; do
        true
     elif [ "${option%%=*}" = '--host' ] ; then
        true
-    elif [ "${option%%=*}" = '--infodir' ] ; then
-       true
     elif [ "${option%%=*}" = '--datadir' ] ; then
        true
     elif [ "${option%%=*}" = '--localstatedir' ] ; then
@@ -621,7 +624,7 @@ fi
 have_ruby_dev=0
 if [ $WITH_RUBY = "1" ] ; then
     printf "Checking for ruby development files... "
-    if ruby -e "require 'mkmf'"> /dev/null 2>&1; then
+    if ${RUBY} -e "require 'mkmf'"> /dev/null 2>&1; then
        printf "Yes.\n"
        have_ruby_dev=1
     else
@@ -630,6 +633,8 @@ if [ $WITH_RUBY = "1" ] ; then
 fi
 
 have_sphinx=0
+have_makeinfo=0
+have_install_info=0
 if [ $WITH_DOCS = "1" ] ; then
     printf "Checking if sphinx is available and supports nroff output... "
     if command -v sphinx-build > /dev/null && ${python} -m sphinx.writers.manpage > /dev/null 2>&1 ; then
@@ -638,6 +643,20 @@ if [ $WITH_DOCS = "1" ] ; then
     else
        printf "No (so will not install man pages).\n"
     fi
+    printf "Checking if makeinfo is available... "
+    if command -v makeinfo > /dev/null; then
+       printf "Yes.\n"
+       have_makeinfo=1
+    else
+       printf "No (so will not build info pages).\n"
+    fi
+    printf "Checking if install-info is available... "
+    if command -v install-info > /dev/null; then
+       printf "Yes.\n"
+       have_install_info=1
+    else
+       printf "No (so will not install info pages).\n"
+    fi
 fi
 
 if [ $WITH_DESKTOP = "1" ]; then
@@ -696,7 +715,7 @@ elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then
     IFS="
 "
     for path in $ldconfig_paths; do
-       if [ "$path" = "$libdir_expanded" ]; then
+       if [ "$path" -ef "$libdir_expanded" ]; then
            libdir_in_ldconfig=1
        fi
     done
@@ -734,18 +753,18 @@ EOF
     fi
     if [ $have_zlib -eq 0 ]; then
        echo "  zlib library (>= version 1.2.5.2, including development files such as headers)"
-       echo "  http://zlib.net/"
+       echo "  https://zlib.net/"
        echo
     fi
     if [ $have_gmime -eq 0 ]; then
        echo "  GMime 2.6 library >= $GMIME_MINVER"
        echo "  (including development files such as headers)"
-       echo "  http://spruce.sourceforge.net/gmime/"
+       echo "  https://github.com/jstedfast/gmime/"
        echo
     fi
     if [ $have_glib -eq 0 ]; then
        echo "  Glib library >= 2.22 (including development files such as headers)"
-       echo "  http://ftp.gnome.org/pub/gnome/sources/glib/"
+       echo "  https://ftp.gnome.org/pub/gnome/sources/glib/"
        echo
     fi
     if [ $have_talloc -eq 0 ]; then
@@ -1027,6 +1046,9 @@ WARN_CFLAGS=${WARN_CFLAGS}
 # Name of python interpreter
 PYTHON = ${python}
 
+# Name of ruby interpreter
+RUBY = ${RUBY}
+
 # The prefix to which notmuch should be installed
 # Note: If you change this value here, be sure to ensure that the
 # LIBDIR_IN_LDCONFIG value below is still set correctly.
@@ -1046,6 +1068,9 @@ includedir = ${INCLUDEDIR:=\$(prefix)/include}
 # The directory to which man pages should be installed
 mandir = ${MANDIR:=\$(prefix)/share/man}
 
+# The directory to which man pages should be installed
+infodir = ${INFODIR:=\$(prefix)/share/info}
+
 # The directory to which read-only (configuration) files should be installed
 sysconfdir = ${SYSCONFDIR:=\$(prefix)/etc}
 
@@ -1062,6 +1087,12 @@ HAVE_EMACS = ${have_emacs}
 # Whether there's a sphinx-build binary available for building documentation
 HAVE_SPHINX=${have_sphinx}
 
+# Whether there's a makeinfo binary available for building info format documentation
+HAVE_MAKEINFO=${have_makeinfo}
+
+# Whether there's an install-info binary available for installing info format documentation
+HAVE_INSTALL_INFO=${have_install_info}
+
 # Whether there's a doxygen binary available for building api documentation
 HAVE_DOXYGEN=${have_doxygen}
 
@@ -1234,6 +1265,9 @@ NOTMUCH_HAVE_MAN=$((have_sphinx))
 # Name of python interpreter
 NOTMUCH_PYTHON=${python}
 
+# Name of ruby interpreter
+NOTMUCH_RUBY=${RUBY}
+
 # Are the ruby development files (and ruby) available? If not skip
 # building/testing ruby bindings.
 NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
index 89093b2da34dab037e4ccba6f4f7f767fe8564d3..5496198aaabf5efa6f1d91c8f70f7aec6570db73 100644 (file)
@@ -597,7 +597,7 @@ func (self *Threads) MoveToNext() {
  *
  * It's not strictly necessary to call this function. All memory from
  * the notmuch_threads_t object will be reclaimed when the
- * containg query object is destroyed.
+ * containing query object is destroyed.
  */
 func (self *Threads) Destroy() {
        if self.threads != nil {
@@ -937,7 +937,7 @@ func (self *Message) GetMessageId() string {
                return ""
        }
        id := C.notmuch_message_get_message_id(self.message)
-       // we dont own id
+       // we don't own id
        // defer C.free(unsafe.Pointer(id))
        if id == nil {
                return ""
@@ -962,7 +962,7 @@ func (self *Message) GetThreadId() string {
                return ""
        }
        id := C.notmuch_message_get_thread_id(self.message)
-       // we dont own id
+       // we don't own id
        // defer C.free(unsafe.Pointer(id))
 
        if id == nil {
@@ -1019,7 +1019,7 @@ func (self *Message) GetFileName() string {
                return ""
        }
        fname := C.notmuch_message_get_filename(self.message)
-       // we dont own fname
+       // we don't own fname
        // defer C.free(unsafe.Pointer(fname))
 
        if fname == nil {
@@ -1096,7 +1096,7 @@ func (self *Message) GetHeader(header string) string {
        var c_header *C.char = C.CString(header)
        defer C.free(unsafe.Pointer(c_header))
 
-       /* we dont own value */
+       /* we don't own value */
        value := C.notmuch_message_get_header(self.message, c_header)
        if value == nil {
                return ""
@@ -1335,7 +1335,7 @@ func (self *Tags) Get() string {
                return ""
        }
        s := C.notmuch_tags_get(self.tags)
-       // we dont own 's'
+       // we don't own 's'
 
        return C.GoString(s)
 }
index 8c9688fd5b70a32fb6822c3f92fde1f1f4080455..873e3b5c0fb8eaee10145d5d470849622de6554d 100644 (file)
@@ -1,3 +1,48 @@
+notmuch (0.27-1) unstable; urgency=medium
+
+  * New upstream feature release
+    - thread subqueries (match terms in different messages of same thread)
+    - notmuch new --full-scan (ignore mtimes)
+    - notmuch show --decrypt=stash (decrypt and stash on first read)
+
+ -- David Bremner <bremner@debian.org>  Tue, 12 Jun 2018 22:39:33 -0300
+
+notmuch (0.27~rc1-1) experimental; urgency=medium
+
+  * New upstream release candidate
+
+ -- David Bremner <bremner@debian.org>  Thu, 31 May 2018 08:19:00 -0300
+
+notmuch (0.27~rc0-1) experimental; urgency=medium
+
+  * New upstream release candidate
+
+ -- David Bremner <bremner@debian.org>  Sat, 26 May 2018 09:12:37 -0700
+
+notmuch (0.26.2-2) unstable; urgency=medium
+
+  * Mark gdb and dtach as <!nocheck>, meaning they are only needed for
+    the test suite.
+  * Re-enable gdb based tests on s390x, ppc64el, armel, mipsel, they
+    pass on porterbox. Leave disabled on mipsel64 (gdb tests still
+    failing), and mips (many tests fail on porterbox).
+
+ -- David Bremner <bremner@debian.org>  Sun, 06 May 2018 08:36:52 -0300
+
+notmuch (0.26.2-1) unstable; urgency=medium
+
+  * Upstream bugfix release
+    - Break reference loops when indexing, fixes INTERNAL_ERROR in "notmuch show"
+    - Don't call get_mset(0,0,X), fixes crash on some gcc8 using distros
+
+ -- David Bremner <bremner@debian.org>  Sat, 28 Apr 2018 08:10:24 -0300
+
+notmuch (0.26.1-1) unstable; urgency=medium
+
+  * Bump LIBRARY_MINOR_VERSION to 1, for new functions in 0.26
+
+ -- David Bremner <bremner@debian.org>  Mon, 02 Apr 2018 08:08:01 -0300
+
 notmuch (0.26-1~bpo9+1) stretch-backports; urgency=medium
 
   * Rebuild for stretch-backports.
@@ -544,7 +589,7 @@ notmuch (0.18-3) unstable; urgency=medium
 notmuch (0.18-2) unstable; urgency=medium
 
   * Disable atomicity tests on armhf. These should be re-enabled when
-    upstream relases a fix for this (in progress).
+    upstream releases a fix for this (in progress).
 
  -- David Bremner <bremner@debian.org>  Thu, 08 May 2014 08:28:33 +0900
 
@@ -965,7 +1010,7 @@ notmuch (0.6.1-1) unstable; urgency=low
 notmuch (0.6) unstable; urgency=low
 
   * New upstream release; see /usr/share/doc/notmuch/NEWS for
-    details. Hilights include:
+    details. Highlights include:
     - Folder-based search (Closes: #597222)
     - PGP/MIME decryption and verification
   * Document strict dependency on emacs23 (Closes: #631994).
index ab5bd4c8a1c5131007273aa7d004de81d41890c4..4c317c2242f1de8bce2788e09bfbd5f40e85cbfa 100644 (file)
@@ -6,7 +6,7 @@ Uploaders:
  Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
  Jameson Graef Rollins <jrollins@finestructure.net>,
  David Bremner <bremner@debian.org>
-Build-Conflicts: ruby1.8, gdb-minimal, gdb [s390x ia64 armel ppc64el mips mipsel mips64el]
+Build-Conflicts: ruby1.8, gdb-minimal, gdb [ia64 mips mips64el]
 Build-Depends:
  dpkg-dev (>= 1.17.14),
  debhelper (>= 10~),
@@ -24,8 +24,8 @@ Build-Depends:
  emacs25-nox | emacs25 (>=25~) | emacs25-lucid (>=25~) |
  emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~) |
  emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~),
- gdb [!s390x !ia64 !armel !ppc64el !mips !mipsel !mips64el !kfreebsd-any !alpha],
- dtach (>= 0.8),
+ gdb [!ia64 !mips !mips64el !kfreebsd-any !alpha] <!nocheck>,
+ dtach (>= 0.8) <!nocheck>,
  gpgsm <!nocheck>,
  gnupg <!nocheck>,
  bash-completion (>=1.9.0~)
index b4e9e172b5af6b7651044775f55b9a7844757aed..a070ae5ff8d55936afbecaf9f531c17528ae31eb 100644 (file)
@@ -1 +1,2 @@
 emacs/*.el
+debian/tmp/usr/share/info/*
index 4f1e94fd05fa8b7e80a8d4416eb2234901aa07b5..3950856fda8bacffcbbb57e3dca9e7fe26e97d58 100644 (file)
@@ -7,9 +7,6 @@ upstream-branch = master
 # The default branch for the debian patch (no patch in our case)
 debian-branch = debian/stretch-backports
 
-# Directory for performing the build
-export-dir = ./debian-build
-
 # Format for upstream tags
 upstream-tag = %(version)s
 
index 5e408213dea5298a1da2514ce3a69b7ccbef3722..308567b83892a0e05d5b7595de817749308c5585 100644 (file)
@@ -47,8 +47,10 @@ libnotmuch.so.5 libnotmuch5 #MINVER#
  notmuch_message_add_property@Base 0.23~rc0
  notmuch_message_add_tag@Base 0.3
  notmuch_message_count_files@Base 0.26~rc0
+ notmuch_message_count_properties@Base 0.27~rc0
  notmuch_message_destroy@Base 0.3
  notmuch_message_freeze@Base 0.3
+ notmuch_message_get_database@Base 0.27~rc0
  notmuch_message_get_date@Base 0.3
  notmuch_message_get_filename@Base 0.3
  notmuch_message_get_filenames@Base 0.5
index 1207a4aa107cb874c34076d0921a2958d201de9a..98d2d2e3fc7483e4fbf8b7c09e9970aecf018da2 100644 (file)
@@ -79,8 +79,8 @@ views
     An array of strings, which will be joined with 'and' to form the
     view query.
 
-.. _Gmane: http://gmane.org/
-.. _JSON: http://json.org/
+.. _Gmane: https://gmane.org/
+.. _JSON: https://json.org/
 .. _Python format string: https://docs.python.org/3/library/string.html#formatstrings
 .. _quoted: https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote
 
@@ -95,7 +95,7 @@ EXAMPLE
       "blurb": "For more information see <a href=\"https://notmuchmail.org/nmbug\">nmbug</a>",
       "header": "<html><head></head><body><h1>{title}</h1><p>{blurb}</p><h2>Views</h2>",
       "footer": "<hr><p>Generated: {datetime}</p></html>",
-      "message-url": "http://mid.gmane.org/{message-id}"
+      "message-url": "https://mid.gmane.org/{message-id}"
     },
     "views": [
       {
index a9c2a6ec5bf4267f6a16c9ab030409c6bad3c3e3..5789c5f442c351e545f353318360f213130ba221 100755 (executable)
@@ -415,7 +415,7 @@ _PAGES['html'] = HtmlPage(
     header=header_template.format(**context),
     footer=footer_template.format(**context),
     message_url_template=config['meta'].get(
-        'message-url', 'http://mid.gmane.org/{message-id}'),
+        'message-url', 'https://mid.gmane.org/{message-id}'),
     )
 
 if args.list_views:
index 5a7578b863aad83adeccb0abd9ce619662f71056..7ba948224bc732d807b80f7c3886ceb925af2426 100755 (executable)
@@ -51,7 +51,7 @@ then
                exit 1
        fi
 else
-       echo "Reading './version' file failed (suprisingly!)"
+       echo "Reading './version' file failed (surprisingly!)"
        exit 1
 fi < ./version
 
index c6f05ca879c0999f20b5c63bcfcfaa8a54cccc87..16459e3544c2d7d668691ad89e3f20457dcf77b3 100644 (file)
@@ -24,6 +24,12 @@ MAN_ROFF_FILES := $(MAN1_ROFF) $(MAN5_ROFF) $(MAN7_ROFF)
 
 MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
 
+MAN1_TEXI := $(patsubst $(srcdir)/doc/man1/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN1_RST))
+MAN5_TEXI := $(patsubst $(srcdir)/doc/man5/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN5_RST))
+MAN7_TEXI := $(patsubst $(srcdir)/doc/man7/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN7_RST))
+INFO_TEXI_FILES := $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI) $(DOCBUILDDIR)/texinfo/notmuch-emacs.texi
+INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
+
 .PHONY: sphinx-html sphinx-texinfo sphinx-info
 
 .PHONY: install-man build-man apidocs install-apidocs
@@ -89,15 +95,32 @@ install-man:
 else
 build-man: ${MAN_GZIP_FILES}
 install-man: ${MAN_GZIP_FILES}
-       mkdir -p "$(DESTDIR)$(mandir)/man1"
-       mkdir -p "$(DESTDIR)$(mandir)/man5"
-       mkdir -p "$(DESTDIR)$(mandir)/man7"
+       mkdir -m0755 -p "$(DESTDIR)$(mandir)/man1"
+       mkdir -m0755 -p "$(DESTDIR)$(mandir)/man5"
+       mkdir -m0755 -p "$(DESTDIR)$(mandir)/man7"
        install -m0644 $(filter %.1.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man1
        install -m0644 $(filter %.5.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man5
        install -m0644 $(filter %.7.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man7
        cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
 endif
 
+ifneq ($(HAVE_SPHINX)$(HAVE_MAKEINFO),11)
+build-info:
+       @echo "Missing sphinx or makeinfo, not building info pages"
+else
+build-info: sphinx-info
+endif
+
+ifneq ($(HAVE_SPHINX)$(HAVE_MAKEINFO)$(HAVE_INSTALL_INFO),111)
+install-info:
+       @echo "Missing prerequisites, not installing info pages"
+else
+install-info: build-info
+       mkdir -m0755 -p "$(DESTDIR)$(infodir)"
+       install -m0644 $(INFO_INFO_FILES) $(DESTDIR)$(infodir)
+       for file in $(INFO_INFO_FILES); do install-info $$file $(DESTDIR)$(infodir)/dir; done
+endif
+
 $(dir)/config.dox: version.stamp
        echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@
        echo "INPUT=${srcdir}/lib/notmuch.h" >> $@
index 68415d13c5b6b78c8fdba23566ff3bc667074bc1..c00d7d743e3e45a0b6111457b28b00140dedc4a8 100644 (file)
@@ -18,93 +18,89 @@ See **notmuch-search-terms(7)** for details of the supported syntax for
 
 Supported options for **address** include
 
-    ``--format=``\ (**json**\ \|\ **sexp**\ \|\ **text**\ \|\ **text0**)
-        Presents the results in either JSON, S-Expressions, newline
-        character separated plain-text (default), or null character
-        separated plain-text (compatible with **xargs(1)** -0 option
-        where available).
-
-    ``--format-version=N``
-        Use the specified structured output format version. This is
-        intended for programs that invoke **notmuch(1)** internally. If
-        omitted, the latest supported version will be used.
-
-    ``--output=(sender|recipients|count|address)``
-
-        Controls which information appears in the output. This option
-        can be given multiple times to combine different outputs.
-        When neither --output=sender nor --output=recipients is
-        given, --output=sender is implied.
-
-        **sender**
-            Output all addresses from the *From* header.
-
-            Note: Searching for **sender** should be much faster than
-            searching for **recipients**, because sender addresses are
-            cached directly in the database whereas other addresses
-            need to be fetched from message files.
-
-        **recipients**
-            Output all addresses from the *To*, *Cc* and *Bcc*
-            headers.
-
-        **count**
-            Print the count of how many times was the address
-            encountered during search.
-
-            Note: With this option, addresses are printed only after
-            the whole search is finished. This may take long time.
-
-        **address**
-            Output only the email addresses instead of the full
-            mailboxes with names and email addresses. This option has
-            no effect on the JSON or S-Expression output formats.
-
-    ``--deduplicate=(no|mailbox|address)``
-
-        Control the deduplication of results.
-
-        **no**
-            Output all occurrences of addresses in the matching
-            messages. This is not applicable with --output=count.
-
-        **mailbox**
-            Deduplicate addresses based on the full, case sensitive
-            name and email address, or mailbox. This is effectively
-            the same as piping the --deduplicate=no output to **sort |
-            uniq**, except for the order of results. This is the
-            default.
-
-        **address**
-            Deduplicate addresses based on the case insensitive
-            address part of the mailbox. Of all the variants (with
-            different name or case), print the one occurring most
-            frequently among the matching messages. If --output=count
-            is specified, include all variants in the count.
-
-    ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
-        This option can be used to present results in either
-        chronological order (**oldest-first**) or reverse chronological
-        order (**newest-first**).
-
-        By default, results will be displayed in reverse chronological
-        order, (that is, the newest results will be displayed first).
-
-        However, if either --output=count or --deduplicate=address is
-        specified, this option is ignored and the order of the results
-        is unspecified.
-
-    ``--exclude=(true|false)``
-        A message is called "excluded" if it matches at least one tag in
-        search.tag\_exclude that does not appear explicitly in the
-        search terms. This option specifies whether to omit excluded
-        messages in the search process.
-
-        The default value, **true**, prevents excluded messages from
-        matching the search terms.
-
-        **false** allows excluded messages to match search terms and
-        appear in displayed results.
+``--format=``\ (**json**\ \|\ **sexp**\ \|\ **text**\ \|\ **text0**)
+    Presents the results in either JSON, S-Expressions, newline
+    character separated plain-text (default), or null character
+    separated plain-text (compatible with **xargs(1)** -0 option where
+    available).
+
+``--format-version=N``
+    Use the specified structured output format version. This is
+    intended for programs that invoke **notmuch(1)** internally. If
+    omitted, the latest supported version will be used.
+
+``--output=(sender|recipients|count|address)``
+    Controls which information appears in the output. This option can
+    be given multiple times to combine different outputs.  When
+    neither --output=sender nor --output=recipients is
+    given, --output=sender is implied.
+
+    **sender**
+        Output all addresses from the *From* header.
+
+        Note: Searching for **sender** should be much faster than
+        searching for **recipients**, because sender addresses are
+        cached directly in the database whereas other addresses need
+        to be fetched from message files.
+
+    **recipients**
+        Output all addresses from the *To*, *Cc* and *Bcc* headers.
+
+    **count**
+        Print the count of how many times was the address encountered
+        during search.
+
+        Note: With this option, addresses are printed only after the
+        whole search is finished. This may take long time.
+
+    **address**
+        Output only the email addresses instead of the full mailboxes
+        with names and email addresses. This option has no effect on
+        the JSON or S-Expression output formats.
+
+``--deduplicate=(no|mailbox|address)``
+    Control the deduplication of results.
+
+    **no**
+        Output all occurrences of addresses in the matching
+        messages. This is not applicable with --output=count.
+
+    **mailbox**
+        Deduplicate addresses based on the full, case sensitive name
+        and email address, or mailbox. This is effectively the same as
+        piping the --deduplicate=no output to **sort | uniq**, except
+        for the order of results. This is the default.
+
+    **address**
+        Deduplicate addresses based on the case insensitive address
+        part of the mailbox. Of all the variants (with different name
+        or case), print the one occurring most frequently among the
+        matching messages. If --output=count is specified, include all
+        variants in the count.
+
+``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
+    This option can be used to present results in either chronological
+    order (**oldest-first**) or reverse chronological order
+    (**newest-first**).
+
+    By default, results will be displayed in reverse chronological
+    order, (that is, the newest results will be displayed first).
+
+    However, if either --output=count or --deduplicate=address is
+    specified, this option is ignored and the order of the results is
+    unspecified.
+
+``--exclude=(true|false)``
+    A message is called "excluded" if it matches at least one tag in
+    search.tag\_exclude that does not appear explicitly in the search
+    terms. This option specifies whether to omit excluded messages in
+    the search process.
+
+    The default value, **true**, prevents excluded messages from
+    matching the search terms.
+
+    **false** allows excluded messages to match search terms and
+    appear in displayed results.
 
 EXIT STATUS
 ===========
index 25692c5b48e7a3cf4e73982170e0cca361b37456..b05593ec22134181e9a31d642cfe9c8b4f5dba23 100644 (file)
@@ -24,14 +24,14 @@ process (which may be quite long) to protect data integrity.
 
 Supported options for **compact** include
 
-    ``--backup=``\ <directory>
-        Save the current database to the given directory before
-        replacing it with the compacted database. The backup directory
-        must not exist and it must reside on the same mounted filesystem
-        as the current database.
-
-    ``--quiet``
-        Do not report database compaction progress to stdout.
+``--backup=``\ <directory>
+    Save the current database to the given directory before replacing
+    it with the compacted database. The backup directory must not
+    exist and it must reside on the same mounted filesystem as the
+    current database.
+
+``--quiet``
+    Do not report database compaction progress to stdout.
 
 ENVIRONMENT
 ===========
index 9d6ff107cae37feb83ea6d30aa7ad5c4bca83757..899098084ae2beafea74017b3064de261c0a8917 100644 (file)
@@ -21,203 +21,189 @@ Items marked **[STORED IN DATABASE]** are only in the database.  They
 should not be placed in the configuration file, and should be accessed
 programmatically as described in the SYNOPSIS above.
 
-    **get**
-        The value of the specified configuration item is printed to
-        stdout. If the item has multiple values (it is a list), each
-        value is separated by a newline character.
+**get**
+    The value of the specified configuration item is printed to
+    stdout. If the item has multiple values (it is a list), each value
+    is separated by a newline character.
 
-    **set**
-        The specified configuration item is set to the given value. To
-        specify a multiple-value item (a list), provide each value as a
-        separate command-line argument.
+**set**
+    The specified configuration item is set to the given value. To
+    specify a multiple-value item (a list), provide each value as a
+    separate command-line argument.
 
-        If no values are provided, the specified configuration item will
-        be removed from the configuration file.
+    If no values are provided, the specified configuration item will
+    be removed from the configuration file.
 
-    **list**
-        Every configuration item is printed to stdout, each on a
-        separate line of the form:
+**list**
+    Every configuration item is printed to stdout, each on a separate
+    line of the form::
 
         *section*.\ *item*\ =\ *value*
 
-        No additional whitespace surrounds the dot or equals sign
-        characters. In a multiple-value item (a list), the values are
-        separated by semicolon characters.
+    No additional whitespace surrounds the dot or equals sign
+    characters. In a multiple-value item (a list), the values are
+    separated by semicolon characters.
 
 The available configuration items are described below.
 
-    **database.path**
-        The top-level directory where your mail currently exists and to
-        where mail will be delivered in the future. Files should be
-        individual email messages. Notmuch will store its database
-        within a sub-directory of the path configured here named
-        ``.notmuch``.
+**database.path**
+    The top-level directory where your mail currently exists and to
+    where mail will be delivered in the future. Files should be
+    individual email messages. Notmuch will store its database within
+    a sub-directory of the path configured here named ``.notmuch``.
 
-        Default: ``$MAILDIR`` variable if set, otherwise ``$HOME/mail``.
+    Default: ``$MAILDIR`` variable if set, otherwise ``$HOME/mail``.
+
+**user.name**
+    Your full name.
+
+    Default: ``$NAME`` variable if set, otherwise read from
+    ``/etc/passwd``.
 
-    **user.name**
-        Your full name.
+**user.primary\_email**
+    Your primary email address.
 
-        Default: ``$NAME`` variable if set, otherwise read from
-        ``/etc/passwd``.
+    Default: ``$EMAIL`` variable if set, otherwise constructed from
+    the username and hostname of the current machine.
 
-    **user.primary\_email**
-        Your primary email address.
-
-        Default: ``$EMAIL`` variable if set, otherwise constructed from the
-        username and hostname of the current machine.
-
-    **user.other\_email**
-        A list of other email addresses at which you receive email.
-
-        Default: not set.
-
-    **new.tags**
-        A list of tags that will be added to all messages incorporated
-        by **notmuch new**.
-
-        Default: ``unread;inbox``.
-
-    **new.ignore**
-        A list to specify files and directories that will not be
-        searched for messages by **notmuch new**. Each entry in the
-        list is either:
-
-          A file or a directory name, without path, that will be
-          ignored, regardless of the location in the mail store
-          directory hierarchy.
-
-        Or:
-
-          A regular expression delimited with // that will be matched
-          against the path of the file or directory relative to the
-          database path. Matching files and directories will be
-          ignored. The beginning and end of string must be explictly
-          anchored. For example, /.*/foo$/ would match "bar/foo" and
-          "bar/baz/foo", but not "foo" or "bar/foobar".
-
-        Default: empty list.
-
-    **search.exclude\_tags**
-        A list of tags that will be excluded from search results by
-        default. Using an excluded tag in a query will override that
-        exclusion.
-
-        Default: empty list. Note that **notmuch-setup(1)** puts
-        ``deleted;spam`` here when creating new configuration file.
-
-
-
-    **maildir.synchronize\_flags**
-        If true, then the following maildir flags (in message filenames)
-        will be synchronized with the corresponding notmuch tags:
-
-        +--------+-----------------------------------------------+
-        | Flag   | Tag                                           |
-        +========+===============================================+
-        | D      | draft                                         |
-        +--------+-----------------------------------------------+
-        | F      | flagged                                       |
-        +--------+-----------------------------------------------+
-        | P      | passed                                        |
-        +--------+-----------------------------------------------+
-        | R      | replied                                       |
-        +--------+-----------------------------------------------+
-        | S      | unread (added when 'S' flag is not present)   |
-        +--------+-----------------------------------------------+
-
-        The **notmuch new** command will notice flag changes in
-        filenames and update tags, while the **notmuch tag** and
-        **notmuch restore** commands will notice tag changes and update
-        flags in filenames.
-
-        If there have been any changes in the maildir (new messages
-        added, old ones removed or renamed, maildir flags changed,
-        etc.), it is advisable to run **notmuch new** before **notmuch
-        tag** or **notmuch restore** commands to ensure the tag changes
-        are properly synchronized to the maildir flags, as the commands
-        expect the database and maildir to be in sync.
-
-        Default: ``true``.
-
-    **crypto.gpg_path**
-
-        Name (or full path) of gpg binary to use in verification and
-        decryption of PGP/MIME messages.  NOTE: This configuration
-        item is deprecated, and will be ignored if notmuch is built
-        against GMime 3.0 or later.
-
-        Default: ``gpg``.
-
-    **index.decrypt**
-
-        **[STORED IN DATABASE]**
-
-        Policy for decrypting encrypted messages during indexing.
-        Must be one of: ``false``, ``auto``, ``nostash``, or
-        ``true``.
-
-        When indexing an encrypted e-mail message, if this variable is
-        set to ``true``, notmuch will try to decrypt the message and
-        index the cleartext, stashing a copy of any discovered session
-        keys for the message.  If ``auto``, it will try to index the
-        cleartext if a stashed session key is already known for the message
-        (e.g. from a previous copy), but will not try to access your
-        secret keys.  Use ``false`` to avoid decrypting even when a
-        stashed session key is already present.
-
-        ``nostash`` is the same as ``true`` except that it will not
-        stash newly-discovered session keys in the database.
-
-        From the command line (i.e. during **notmuch-new(1)**,
-        **notmuch-insert(1)**, or **notmuch-reindex(1)**), the user
-        can override the database's stored decryption policy with the
-        ``--decrypt=`` option.
-
-        Here is a table that summarizes the functionality of each of
-        these policies:
-
-        +------------------------+-------+------+---------+------+
-        |                        | false | auto | nostash | true |
-        +========================+=======+======+=========+======+
-        | Index cleartext using  |       |  X   |    X    |  X   |
-        | stashed session keys   |       |      |         |      |
-        +------------------------+-------+------+---------+------+
-        | Index cleartext        |       |      |    X    |  X   |
-        | using secret keys      |       |      |         |      |
-        +------------------------+-------+------+---------+------+
-        | Stash session keys     |       |      |         |  X   |
-        +------------------------+-------+------+---------+------+
-        | Delete stashed session |   X   |      |         |      |
-        | keys on reindex        |       |      |         |      |
-        +------------------------+-------+------+---------+------+
-
-        Stashed session keys are kept in the database as properties
-        associated with the message.  See ``session-key`` in
-        **notmuch-properties(7)** for more details about how they can
-        be useful.
-
-        Be aware that the notmuch index is likely sufficient (and a
-        stashed session key is certainly sufficient) to reconstruct
-        the cleartext of the message itself, so please ensure that the
-        notmuch message index is adequately protected.  DO NOT USE
-        ``index.decrypt=true`` or ``index.decrypt=nostash`` without
-        considering the security of your index.
-
-        Default: ``auto``.
-
-    **built_with.<name>**
-
-        Compile time feature <name>. Current possibilities include
-        "compact" (see **notmuch-compact(1)**)
-        and "field_processor" (see **notmuch-search-terms(7)**).
-
-    **query.<name>**
-
-        **[STORED IN DATABASE]**
-        Expansion for named query called <name>. See
-        **notmuch-search-terms(7)** for more information about named
-        queries.
+**user.other\_email**
+    A list of other email addresses at which you receive email.
+
+    Default: not set.
+
+**new.tags**
+    A list of tags that will be added to all messages incorporated by
+    **notmuch new**.
+
+    Default: ``unread;inbox``.
+
+**new.ignore**
+    A list to specify files and directories that will not be searched
+    for messages by **notmuch new**. Each entry in the list is either:
+
+    A file or a directory name, without path, that will be ignored,
+    regardless of the location in the mail store directory hierarchy.
+
+    Or:
+
+    A regular expression delimited with // that will be matched
+    against the path of the file or directory relative to the database
+    path. Matching files and directories will be ignored. The
+    beginning and end of string must be explicitly anchored. For
+    example, /.*/foo$/ would match "bar/foo" and "bar/baz/foo", but
+    not "foo" or "bar/foobar".
+
+    Default: empty list.
+
+**search.exclude\_tags**
+    A list of tags that will be excluded from search results by
+    default. Using an excluded tag in a query will override that
+    exclusion.
+
+    Default: empty list. Note that **notmuch-setup(1)** puts
+    ``deleted;spam`` here when creating new configuration file.
+
+**maildir.synchronize\_flags**
+    If true, then the following maildir flags (in message filenames)
+    will be synchronized with the corresponding notmuch tags:
+
+    +--------+-----------------------------------------------+
+    | Flag   | Tag                                           |
+    +========+===============================================+
+    | D      | draft                                         |
+    +--------+-----------------------------------------------+
+    | F      | flagged                                       |
+    +--------+-----------------------------------------------+
+    | P      | passed                                        |
+    +--------+-----------------------------------------------+
+    | R      | replied                                       |
+    +--------+-----------------------------------------------+
+    | S      | unread (added when 'S' flag is not present)   |
+    +--------+-----------------------------------------------+
+
+    The **notmuch new** command will notice flag changes in filenames
+    and update tags, while the **notmuch tag** and **notmuch restore**
+    commands will notice tag changes and update flags in filenames.
+
+    If there have been any changes in the maildir (new messages added,
+    old ones removed or renamed, maildir flags changed, etc.), it is
+    advisable to run **notmuch new** before **notmuch tag** or
+    **notmuch restore** commands to ensure the tag changes are
+    properly synchronized to the maildir flags, as the commands expect
+    the database and maildir to be in sync.
+
+    Default: ``true``.
+
+**crypto.gpg_path**
+    Name (or full path) of gpg binary to use in verification and
+    decryption of PGP/MIME messages.  NOTE: This configuration item is
+    deprecated, and will be ignored if notmuch is built against GMime
+    3.0 or later.
+
+    Default: ``gpg``.
+
+**index.decrypt** **[STORED IN DATABASE]**
+    Policy for decrypting encrypted messages during indexing.  Must be
+    one of: ``false``, ``auto``, ``nostash``, or ``true``.
+
+    When indexing an encrypted e-mail message, if this variable is set
+    to ``true``, notmuch will try to decrypt the message and index the
+    cleartext, stashing a copy of any discovered session keys for the
+    message.  If ``auto``, it will try to index the cleartext if a
+    stashed session key is already known for the message (e.g. from a
+    previous copy), but will not try to access your secret keys.  Use
+    ``false`` to avoid decrypting even when a stashed session key is
+    already present.
+
+    ``nostash`` is the same as ``true`` except that it will not stash
+    newly-discovered session keys in the database.
+
+    From the command line (i.e. during **notmuch-new(1)**,
+    **notmuch-insert(1)**, or **notmuch-reindex(1)**), the user can
+    override the database's stored decryption policy with the
+    ``--decrypt=`` option.
+
+    Here is a table that summarizes the functionality of each of these
+    policies:
+
+    +------------------------+-------+------+---------+------+
+    |                        | false | auto | nostash | true |
+    +========================+=======+======+=========+======+
+    | Index cleartext using  |       |  X   |    X    |  X   |
+    | stashed session keys   |       |      |         |      |
+    +------------------------+-------+------+---------+------+
+    | Index cleartext        |       |      |    X    |  X   |
+    | using secret keys      |       |      |         |      |
+    +------------------------+-------+------+---------+------+
+    | Stash session keys     |       |      |         |  X   |
+    +------------------------+-------+------+---------+------+
+    | Delete stashed session |   X   |      |         |      |
+    | keys on reindex        |       |      |         |      |
+    +------------------------+-------+------+---------+------+
+
+    Stashed session keys are kept in the database as properties
+    associated with the message.  See ``session-key`` in
+    **notmuch-properties(7)** for more details about how they can be
+    useful.
+
+    Be aware that the notmuch index is likely sufficient (and a
+    stashed session key is certainly sufficient) to reconstruct the
+    cleartext of the message itself, so please ensure that the notmuch
+    message index is adequately protected.  DO NOT USE
+    ``index.decrypt=true`` or ``index.decrypt=nostash`` without
+    considering the security of your index.
+
+    Default: ``auto``.
+
+**built_with.<name>**
+    Compile time feature <name>. Current possibilities include
+    "compact" (see **notmuch-compact(1)**) and "field_processor" (see
+    **notmuch-search-terms(7)**).
+
+**query.<name>** **[STORED IN DATABASE]**
+    Expansion for named query called <name>. See
+    **notmuch-search-terms(7)** for more information about named
+    queries.
 
 ENVIRONMENT
 ===========
index 35a2e5e870143a470e262434ec770dc4532b399c..9ca20dab274733ed0a049f83f55e5cd83b25951b 100644 (file)
@@ -22,39 +22,38 @@ See **notmuch-search-terms(7)** for details of the supported syntax for
 
 Supported options for **count** include
 
-    ``--output=(messages|threads|files)``
-
-        **messages**
-            Output the number of matching messages. This is the default.
-
-        **threads**
-            Output the number of matching threads.
-
-        **files**
-            Output the number of files associated with matching
-            messages. This may be bigger than the number of matching
-            messages due to duplicates (i.e. multiple files having the
-            same message-id).
-
-    ``--exclude=(true|false)``
-        Specify whether to omit messages matching search.tag\_exclude
-        from the count (the default) or not.
-
-    ``--batch``
-        Read queries from a file (stdin by default), one per line, and
-        output the number of matching messages (or threads) to stdout,
-        one per line. On an empty input line the count of all messages
-        (or threads) in the database will be output. This option is not
-        compatible with specifying search terms on the command line.
-
-    ``--lastmod``
-        Append lastmod (counter for number of database updates) and UUID
-        to the output. lastmod values are only comparable between databases
-        with the same UUID.
-
-    ``--input=``\ <filename>
-        Read input from given file, instead of from stdin. Implies
-        ``--batch``.
+``--output=(messages|threads|files)``
+    **messages**
+        Output the number of matching messages. This is the default.
+
+    **threads**
+        Output the number of matching threads.
+
+    **files**
+        Output the number of files associated with matching
+        messages. This may be bigger than the number of matching
+        messages due to duplicates (i.e. multiple files having the
+        same message-id).
+
+``--exclude=(true|false)``
+    Specify whether to omit messages matching search.tag\_exclude from
+    the count (the default) or not.
+
+``--batch``
+    Read queries from a file (stdin by default), one per line, and
+    output the number of matching messages (or threads) to stdout, one
+    per line. On an empty input line the count of all messages (or
+    threads) in the database will be output. This option is not
+    compatible with specifying search terms on the command line.
+
+``--lastmod``
+    Append lastmod (counter for number of database updates) and UUID
+    to the output. lastmod values are only comparable between
+    databases with the same UUID.
+
+``--input=``\ <filename>
+    Read input from given file, instead of from stdin. Implies
+    ``--batch``.
 
 SEE ALSO
 ========
index 7bc57d29468250e9a11e51ea5e7ce49a5ecde7d7..f8ec486871c120a729810b6a07d8585e0c0a0635 100644 (file)
@@ -26,86 +26,76 @@ the remaining arguments are search terms.
 
 Supported options for **dump** include
 
-    ``--gzip``
-        Compress the output in a format compatible with **gzip(1)**.
-
-    ``--format=(sup|batch-tag)``
-        Notmuch restore supports two plain text dump formats, both with one
-        message-id per line, followed by a list of tags.
-
-        **batch-tag**
-
-            The default **batch-tag** dump format is intended to more
-            robust against malformed message-ids and tags containing
-            whitespace or non-\ **ascii(7)** characters. Each line has
-            the form
-
-                +<*encoded-tag*\ > +<*encoded-tag*\ > ... --
-                id:<*quoted-message-id*\ >
-
-            Tags are hex-encoded by replacing every byte not matching
-            the regex **[A-Za-z0-9@=.,\_+-]** with **%nn** where nn is
-            the two digit hex encoding. The message ID is a valid
-            Xapian query, quoted using Xapian boolean term quoting
-            rules: if the ID contains whitespace or a close paren or
-            starts with a double quote, it must be enclosed in double
-            quotes and double quotes inside the ID must be
-            doubled. The astute reader will notice this is a special
-            case of the batch input format for **notmuch-tag(1)**;
-            note that the single message-id query is mandatory for
-            **notmuch-restore(1)**.
-
-        **sup**
-
-            The **sup** dump file format is specifically chosen to be
-            compatible with the format of files produced by
-            sup-dump. So if you've previously been using sup for mail,
-            then the **notmuch restore** command provides you a way to
-            import all of your tags (or labels as sup calls
-            them). Each line has the following form
-
-                <*message-id*\ > **(** <*tag*\ > ... **)**
-
-            with zero or more tags are separated by spaces. Note that
-            (malformed) message-ids may contain arbitrary non-null
-            characters. Note also that tags with spaces will not be
-            correctly restored with this format.
-
-    ``--include=(config|properties|tags)``
-
+``--gzip``
+    Compress the output in a format compatible with **gzip(1)**.
+
+``--format=(sup|batch-tag)``
+    Notmuch restore supports two plain text dump formats, both with
+    one message-id per line, followed by a list of tags.
+
+    **batch-tag**
+        The default **batch-tag** dump format is intended to more
+        robust against malformed message-ids and tags containing
+        whitespace or non-\ **ascii(7)** characters. Each line has the
+        form::
+
+         +<*encoded-tag*\ > +<*encoded-tag*\ > ... -- id:<*quoted-message-id*\ >
+
+        Tags are hex-encoded by replacing every byte not matching the
+        regex **[A-Za-z0-9@=.,\_+-]** with **%nn** where nn is the two
+        digit hex encoding. The message ID is a valid Xapian query,
+        quoted using Xapian boolean term quoting rules: if the ID
+        contains whitespace or a close paren or starts with a double
+        quote, it must be enclosed in double quotes and double quotes
+        inside the ID must be doubled. The astute reader will notice
+        this is a special case of the batch input format for
+        **notmuch-tag(1)**; note that the single message-id query is
+        mandatory for **notmuch-restore(1)**.
+
+    **sup**
+        The **sup** dump file format is specifically chosen to be
+        compatible with the format of files produced by sup-dump. So
+        if you've previously been using sup for mail, then the
+        **notmuch restore** command provides you a way to import all
+        of your tags (or labels as sup calls them). Each line has the
+        following form::
+
+          <*message-id*\ > **(** <*tag*\ > ... **)**
+
+        with zero or more tags are separated by spaces. Note that
+        (malformed) message-ids may contain arbitrary non-null
+        characters. Note also that tags with spaces will not be
+        correctly restored with this format.
+
+``--include=(config|properties|tags)``
     Control what kind of metadata is included in the output.
 
-      **config**
-
+    **config**
         Output configuration data stored in the database. Each line
         starts with "#@ ", followed by a space separated key-value
         pair.  Both key and value are hex encoded if needed.
 
-      **properties**
-
+    **properties**
         Output per-message (key,value) metadata.  Each line starts
         with "#= ", followed by a message id, and a space separated
         list of key=value pairs.  Ids, keys and values are hex encoded
         if needed.  See **notmuch-properties(7)** for more details.
 
-      **tags**
-
+    **tags**
         Output per-message boolean metadata, namely tags. See *format* above
         for description of the output.
 
-      The default is to include all available types of data.  The
-      option can be specified multiple times to select some subset. As
-      of version 3 of the dump format, there is a header line of the
-      following form
+    The default is to include all available types of data.  The option
+    can be specified multiple times to select some subset. As of
+    version 3 of the dump format, there is a header line of the
+    following form::
 
-      |
-      |  #notmuch-dump <*format*>:<*version*> <*included*>
+      #notmuch-dump <*format*>:<*version*> <*included*>
 
-      where <*included*> is a comma separated list of the above
-      options.
+    where <*included*> is a comma separated list of the above options.
 
-    ``--output=``\ <filename>
-        Write output to given file instead of stdout.
+``--output=``\ <filename>
+    Write output to given file instead of stdout.
 
 SEE ALSO
 ========
index 87787e20e531157b6ebc18a6d5d852634edc8ae0..a0476136f50340f9869d858a079b29e755e2df6a 100644 (file)
@@ -15,49 +15,49 @@ subject, recipients, and message body, or mailto: URL.
 
 Supported options for **emacs-mua** include
 
-    ``-h, --help``
-        Display help.
+``-h, --help``
+    Display help.
 
-    ``-s, --subject=``\ <subject>
-        Specify the subject of the message.
+``-s, --subject=``\ <subject>
+    Specify the subject of the message.
 
-    ``--to=``\ <to-address>
-        Specify a recipient (To).
+``--to=``\ <to-address>
+    Specify a recipient (To).
 
-    ``-c, --cc=``\ <cc-address>
-        Specify a carbon-copy (Cc) recipient.
+``-c, --cc=``\ <cc-address>
+    Specify a carbon-copy (Cc) recipient.
 
-    ``-b, --bcc=``\ <bcc-address>
-        Specify a blind-carbon-copy (Bcc) recipient.
+``-b, --bcc=``\ <bcc-address>
+    Specify a blind-carbon-copy (Bcc) recipient.
 
-    ``-i, --body=``\ <file>
-        Specify a file to include into the body of the message.
+``-i, --body=``\ <file>
+    Specify a file to include into the body of the message.
 
-    ``--hello``
-        Go to the Notmuch hello screen instead of the message composition
-        window if no message composition parameters are given.
+``--hello``
+    Go to the Notmuch hello screen instead of the message composition
+    window if no message composition parameters are given.
 
-    ``--no-window-system``
-        Even if a window system is available, use the current terminal.
+``--no-window-system``
+    Even if a window system is available, use the current terminal.
 
-    ``--client``
-        Use **emacsclient**, rather than **emacs**. For
-        **emacsclient** to work, you need an already running Emacs
-        with a server, or use ``--auto-daemon``.
+``--client``
+    Use **emacsclient**, rather than **emacs**. For **emacsclient** to
+    work, you need an already running Emacs with a server, or use
+    ``--auto-daemon``.
 
-    ``--auto-daemon``
-        Automatically start Emacs in daemon mode, if the Emacs server
-        is not running. Applicable with ``--client``. Implies
-        ``--create-frame``.
+``--auto-daemon``
+    Automatically start Emacs in daemon mode, if the Emacs server is
+    not running. Applicable with ``--client``. Implies
+    ``--create-frame``.
 
-    ``--create-frame``
-        Create a new frame instead of trying to use the current Emacs
-        frame. Applicable with ``--client``. This will be required
-        when Emacs is running (or automatically started with
-        ``--auto-daemon``) in daemon mode.
+``--create-frame``
+    Create a new frame instead of trying to use the current Emacs
+    frame. Applicable with ``--client``. This will be required when
+    Emacs is running (or automatically started with ``--auto-daemon``)
+    in daemon mode.
 
-    ``--print``
-        Output the resulting elisp to stdout instead of evaluating it.
+``--print``
+    Output the resulting elisp to stdout instead of evaluating it.
 
 The supported positional parameters and short options are a compatible
 subset of the **mutt** MUA command-line options. The options and
index 1a3dfe98299ae21b6501de65cad97ef9f91a18bb..86e2f567348ba5920c972a967b7e936c35e34d82 100644 (file)
@@ -31,48 +31,52 @@ more details on hooks.
 Option arguments must appear before any tag operation arguments.
 Supported options for **insert** include
 
-    ``--folder=<``\ folder\ **>**
-        Deliver the message to the specified folder, relative to the
-        top-level directory given by the value of **database.path**. The
-        default is the empty string, which means delivering to the
-        top-level directory.
-
-    ``--create-folder``
-        Try to create the folder named by the ``--folder`` option, if it
-        does not exist. Otherwise the folder must already exist for mail
-        delivery to succeed.
-
-    ``--keep``
-        Keep the message file if indexing fails, and keep the message
-        indexed if applying tags or maildir flag synchronization
-        fails. Ignore these errors and return exit status 0 to
-        indicate successful mail delivery.
-
-    ``--no-hooks``
-        Prevent hooks from being run.
-
-    ``--decrypt=(true|nostash|auto|false)``
-
-        If ``true`` and the message is encrypted, try to decrypt the
-        message while indexing, stashing any session keys discovered.
-        If ``auto``, and notmuch already knows about a session key for
-        the message, it will try decrypting using that session key but
-        will not try to access the user's secret keys.  If decryption
-        is successful, index the cleartext itself.  Either way, the
-        message is always stored to disk in its original form
-        (ciphertext).
-
-        ``nostash`` is the same as ``true`` except that it will not
-        stash newly-discovered session keys in the database.
-
-        Be aware that the index is likely sufficient (and a stashed
-        session key is certainly sufficient) to reconstruct the
-        cleartext of the message itself, so please ensure that the
-        notmuch message index is adequately protected. DO NOT USE
-        ``--decrypt=true`` or ``--decrypt=nostash`` without
-        considering the security of your index.
-
-        See also ``index.decrypt`` in **notmuch-config(1)**.
+``--folder=<``\ folder\ **>**
+    Deliver the message to the specified folder, relative to the
+    top-level directory given by the value of **database.path**. The
+    default is the empty string, which means delivering to the
+    top-level directory.
+
+``--create-folder``
+    Try to create the folder named by the ``--folder`` option, if it
+    does not exist. Otherwise the folder must already exist for mail
+    delivery to succeed.
+
+``--keep``
+    Keep the message file if indexing fails, and keep the message
+    indexed if applying tags or maildir flag synchronization
+    fails. Ignore these errors and return exit status 0 to indicate
+    successful mail delivery.
+
+``--no-hooks``
+    Prevent hooks from being run.
+
+``--world-readable``
+    When writing mail to the mailbox, allow it to be read by users
+    other than the current user.  Note that this does not override
+    umask.  By default, delivered mail is only readable by the current
+    user.
+
+``--decrypt=(true|nostash|auto|false)``
+    If ``true`` and the message is encrypted, try to decrypt the
+    message while indexing, stashing any session keys discovered.  If
+    ``auto``, and notmuch already knows about a session key for the
+    message, it will try decrypting using that session key but will
+    not try to access the user's secret keys.  If decryption is
+    successful, index the cleartext itself.  Either way, the message
+    is always stored to disk in its original form (ciphertext).
+
+    ``nostash`` is the same as ``true`` except that it will not stash
+    newly-discovered session keys in the database.
+
+    Be aware that the index is likely sufficient (and a stashed
+    session key is certainly sufficient) to reconstruct the cleartext
+    of the message itself, so please ensure that the notmuch message
+    index is adequately protected. DO NOT USE ``--decrypt=true`` or
+    ``--decrypt=nostash`` without considering the security of your
+    index.
+
+    See also ``index.decrypt`` in **notmuch-config(1)**.
 
 EXIT STATUS
 ===========
index 3ddd4621a3806c87bc2d54f2391033a6aeb04c92..5eeb49262e0dd6442a103fa02415fda394eb9797 100644 (file)
@@ -37,29 +37,32 @@ details on hooks.
 
 Supported options for **new** include
 
-    ``--no-hooks``
-        Prevents hooks from being run.
-
-    ``--quiet``
-        Do not print progress or results.
-
-    ``--decrypt=(true|nostash|auto|false)``
-
-        If ``true``, when encountering an encrypted message, try to
-        decrypt it while indexing, and stash any discovered session
-        keys.  If ``auto``, try to use any session key already known
-        to belong to this message, but do not attempt to use the
-        user's secret keys.  If decryption is successful, index the
-        cleartext of the message.
-
-        Be aware that the index is likely sufficient (and the session
-        key is certainly sufficient) to reconstruct the cleartext of
-        the message itself, so please ensure that the notmuch message
-        index is adequately protected.  DO NOT USE ``--decrypt=true``
-        or ``--decrypt=nostash`` without considering the security of
-        your index.
-
-        See also ``index.decrypt`` in **notmuch-config(1)**.
+``--no-hooks``
+    Prevents hooks from being run.
+
+``--quiet``
+    Do not print progress or results.
+
+``--decrypt=(true|nostash|auto|false)``
+    If ``true``, when encountering an encrypted message, try to
+    decrypt it while indexing, and stash any discovered session keys.
+    If ``auto``, try to use any session key already known to belong to
+    this message, but do not attempt to use the user's secret keys.
+    If decryption is successful, index the cleartext of the message.
+
+    Be aware that the index is likely sufficient (and the session key
+    is certainly sufficient) to reconstruct the cleartext of the
+    message itself, so please ensure that the notmuch message index is
+    adequately protected.  DO NOT USE ``--decrypt=true`` or
+    ``--decrypt=nostash`` without considering the security of your
+    index.
+
+    See also ``index.decrypt`` in **notmuch-config(1)**.
+
+``--full-scan``
+    By default notmuch-new uses directory modification times (mtimes)
+    to optimize the scanning of directories for new mail. This option turns
+    that optimization off.
 
 EXIT STATUS
 ===========
index 8b3083cf41e97535a4e397ba4677078b8e2c71ad..cd7c91a008ace0009b06b44ad4d67161d7a27bf1 100644 (file)
@@ -21,34 +21,71 @@ messages using the supplied options.
 
 Supported options for **reindex** include
 
-    ``--decrypt=(true|nostash|auto|false)``
+``--decrypt=(true|nostash|auto|false)``
+    If ``true``, when encountering an encrypted message, try to
+    decrypt it while reindexing, stashing any session keys discovered.
+    If ``auto``, and notmuch already knows about a session key for the
+    message, it will try decrypting using that session key but will
+    not try to access the user's secret keys.  If decryption is
+    successful, index the cleartext itself.
 
-        If ``true``, when encountering an encrypted message, try to
-        decrypt it while reindexing, stashing any session keys
-        discovered.  If ``auto``, and notmuch already knows about a
-        session key for the message, it will try decrypting using that
-        session key but will not try to access the user's secret keys.
-        If decryption is successful, index the cleartext itself.
+    ``nostash`` is the same as ``true`` except that it will not stash
+    newly-discovered session keys in the database.
 
-        ``nostash`` is the same as ``true`` except that it will not
-        stash newly-discovered session keys in the database.
+    If ``false``, notmuch reindex will also delete any stashed session
+    keys for all messages matching the search terms.
 
-        If ``false``, notmuch reindex will also delete any stashed
-        session keys for all messages matching the search terms.
+    Be aware that the index is likely sufficient (and a stashed
+    session key is certainly sufficient) to reconstruct the cleartext
+    of the message itself, so please ensure that the notmuch message
+    index is adequately protected. DO NOT USE ``--decrypt=true`` or
+    ``--decrypt=nostash`` without considering the security of your
+    index.
 
-        Be aware that the index is likely sufficient (and a stashed
-        session key is certainly sufficient) to reconstruct the
-        cleartext of the message itself, so please ensure that the
-        notmuch message index is adequately protected. DO NOT USE
-        ``--decrypt=true`` or ``--decrypt=nostash`` without
-        considering the security of your index.
+    See also ``index.decrypt`` in **notmuch-config(1)**.
 
-        See also ``index.decrypt`` in **notmuch-config(1)**.
+EXAMPLES
+========
+
+A user just received an encrypted message without indexing its
+cleartext.  After reading it (via ``notmuch show --decrypt=true``),
+they decide that they want to index its cleartext so that they can
+easily find it later and read it without having to have access to
+their secret keys:
+
+::
+
+ notmuch reindex --decrypt=true id:1234567@example.com
+
+A user wants to change their policy going forward to start indexing
+cleartext.  But they also want indexed access to the cleartext of all
+previously-received encrypted messages.  Some messages might have
+already been indexed in the clear (as in the example above). They can
+ask notmuch to just reindex the not-yet-indexed messages:
+
+::
+
+  notmuch config set index.decrypt true
+  notmuch reindex tag:encrypted and not property:index.decryption=success
+
+Later, the user changes their mind, and wants to stop indexing
+cleartext (perhaps their threat model has changed, or their trust in
+their index store has been shaken).  They also want to clear all of
+their old cleartext from the index.  Note that they compact the
+database afterward as a workaround for
+https://trac.xapian.org/ticket/742:
+
+::
+
+  notmuch config set index.decrypt false
+  notmuch reindex property:index.decryption=success
+  notmuch compact
 
 SEE ALSO
 ========
 
 **notmuch(1)**,
+**notmuch-compact(1)**,
 **notmuch-config(1)**,
 **notmuch-count(1)**,
 **notmuch-dump(1)**,
index 1b62e075c29689a561d94be970db20bf12b8d474..c893ba048b9c2b7abc48d926b506cce4d6b7ad60 100644 (file)
@@ -34,64 +34,62 @@ The resulting message template is output to stdout.
 
 Supported options for **reply** include
 
-    ``--format=``\ (**default**\ \|\ **json**\ \|\ **sexp**\ \|\ **headers-only**)
-
-        **default**
-            Includes subject and quoted message body as an RFC 2822
-            message.
-
-        **json**
-            Produces JSON output containing headers for a reply message
-            and the contents of the original message. This output can be
-            used by a client to create a reply message intelligently.
-
-        **sexp**
-            Produces S-Expression output containing headers for a reply
-            message and the contents of the original message. This
-            output can be used by a client to create a reply message
-            intelligently.
-
-        **headers-only**
-            Only produces In-Reply-To, References, To, Cc, and Bcc
-            headers.
-
-    ``--format-version=N``
-        Use the specified structured output format version. This is
-        intended for programs that invoke **notmuch(1)** internally. If
-        omitted, the latest supported version will be used.
-
-    ``--reply-to=``\ (**all**\ \|\ **sender**)
-
-        **all** (default)
-            Replies to all addresses.
-
-        **sender**
-            Replies only to the sender. If replying to user's own
-            message (Reply-to: or From: header is one of the user's
-            configured email addresses), try To:, Cc:, and Bcc: headers
-            in this order, and copy values from the first that contains
-            something other than only the user's addresses.
-
-    ``--decrypt=(false|auto|true)``
-
-        If ``true``, decrypt any MIME encrypted parts found in the
-        selected content (i.e., "multipart/encrypted" parts). Status
-        of the decryption will be reported (currently only supported
-        with --format=json and --format=sexp), and on successful
-        decryption the multipart/encrypted part will be replaced by
-        the decrypted content.
-
-        If ``auto``, and a session key is already known for the
-        message, then it will be decrypted, but notmuch will not try
-        to access the user's secret keys.
-
-        Use ``false`` to avoid even automatic decryption.
-
-        Non-automatic decryption expects a functioning
-        **gpg-agent(1)** to provide any needed credentials. Without
-        one, the decryption will likely fail.
-
-        Default: ``auto``
+``--format=``\ (**default**\ \|\ **json**\ \|\ **sexp**\ \|\ **headers-only**)
+    **default**
+        Includes subject and quoted message body as an RFC 2822
+        message.
+
+    **json**
+        Produces JSON output containing headers for a reply message
+        and the contents of the original message. This output can be
+        used by a client to create a reply message intelligently.
+
+    **sexp**
+        Produces S-Expression output containing headers for a reply
+        message and the contents of the original message. This output
+        can be used by a client to create a reply message
+        intelligently.
+
+    **headers-only**
+        Only produces In-Reply-To, References, To, Cc, and Bcc
+        headers.
+
+``--format-version=N``
+    Use the specified structured output format version. This is
+    intended for programs that invoke **notmuch(1)** internally. If
+    omitted, the latest supported version will be used.
+
+``--reply-to=``\ (**all**\ \|\ **sender**)
+    **all** (default)
+        Replies to all addresses.
+
+    **sender**
+        Replies only to the sender. If replying to user's own message
+        (Reply-to: or From: header is one of the user's configured
+        email addresses), try To:, Cc:, and Bcc: headers in this
+        order, and copy values from the first that contains something
+        other than only the user's addresses.
+
+``--decrypt=(false|auto|true)``
+
+    If ``true``, decrypt any MIME encrypted parts found in the
+    selected content (i.e., "multipart/encrypted" parts). Status
+    of the decryption will be reported (currently only supported
+    with --format=json and --format=sexp), and on successful
+    decryption the multipart/encrypted part will be replaced by
+    the decrypted content.
+
+    If ``auto``, and a session key is already known for the
+    message, then it will be decrypted, but notmuch will not try
+    to access the user's secret keys.
+
+    Use ``false`` to avoid even automatic decryption.
+
+    Non-automatic decryption expects a functioning
+    **gpg-agent(1)** to provide any needed credentials. Without
+    one, the decryption will likely fail.
+
+    Default: ``auto``
 
 See **notmuch-search-terms(7)** for details of the supported syntax for
 <search-terms>.
index b578af1fbf19ca6b5afdb479cac1ecdf2645a214..c0f47f261372fdf6f9afb2b7fa6ab5b9ba7b0d23 100644 (file)
@@ -16,68 +16,62 @@ The input is read from the given filename, if any, or from stdin.
 
 Supported options for **restore** include
 
-    ``--accumulate``
-        The union of the existing and new tags is applied, instead of
-        replacing each message's tags as they are read in from the dump
-        file.
-
-    ``--format=(sup|batch-tag|auto)``
-        Notmuch restore supports two plain text dump formats, with each
-        line specifying a message-id and a set of tags. For details of
-        the actual formats, see **notmuch-dump(1)**.
-
-        **sup**
-            The **sup** dump file format is specifically chosen to be
-            compatible with the format of files produced by sup-dump. So
-            if you've previously been using sup for mail, then the
-            **notmuch restore** command provides you a way to import all
-            of your tags (or labels as sup calls them).
-
-        **batch-tag**
-            The **batch-tag** dump format is intended to more robust
-            against malformed message-ids and tags containing whitespace
-            or non-\ **ascii(7)** characters. See **notmuch-dump(1)**
-            for details on this format.
-
-            **notmuch restore** updates the maildir flags according to
-            tag changes if the **maildir.synchronize\_flags**
-            configuration option is enabled. See **notmuch-config(1)**
-            for details.
-
-        **auto**
-            This option (the default) tries to guess the format from the
-            input. For correctly formed input in either supported
-            format, this heuristic, based the fact that batch-tag format
-            contains no parentheses, should be accurate.
-
-    ``--include=(config|properties|tags)``
-
-      Control what kind of metadata is restored.
-
-        **config**
-
-          Restore configuration data to the database. Each configuration line starts
-          with "#@ ", followed by a space separated key-value pair.
-          Both key and value are hex encoded if needed.
-
-        **properties**
-
-          Restore per-message (key,value) metadata.  Each line starts
-          with "#= ", followed by a message id, and a space separated
-          list of key=value pairs.  Ids, keys and values are hex
-          encoded if needed.  See **notmuch-properties(7)** for more
-          details.
-
-        **tags**
-
-          Restore per-message metadata, namely tags. See *format* above
-          for more details.
-
-      The default is to restore all available types of data.  The
-      option can be specified multiple times to select some subset.
-
-    ``--input=``\ <filename>
-        Read input from given file instead of stdin.
+``--accumulate``
+    The union of the existing and new tags is applied, instead of
+    replacing each message's tags as they are read in from the dump
+    file.
+
+``--format=(sup|batch-tag|auto)``
+    Notmuch restore supports two plain text dump formats, with each
+    line specifying a message-id and a set of tags. For details of the
+    actual formats, see **notmuch-dump(1)**.
+
+    **sup**
+        The **sup** dump file format is specifically chosen to be
+        compatible with the format of files produced by sup-dump. So
+        if you've previously been using sup for mail, then the
+        **notmuch restore** command provides you a way to import all
+        of your tags (or labels as sup calls them).
+
+    **batch-tag**
+        The **batch-tag** dump format is intended to more robust
+        against malformed message-ids and tags containing whitespace
+        or non-\ **ascii(7)** characters. See **notmuch-dump(1)** for
+        details on this format.
+
+        **notmuch restore** updates the maildir flags according to tag
+        changes if the **maildir.synchronize\_flags** configuration
+        option is enabled. See **notmuch-config(1)** for details.
+
+    **auto**
+        This option (the default) tries to guess the format from the
+        input. For correctly formed input in either supported format,
+        this heuristic, based the fact that batch-tag format contains
+        no parentheses, should be accurate.
+
+``--include=(config|properties|tags)``
+    Control what kind of metadata is restored.
+
+    **config**
+        Restore configuration data to the database. Each configuration
+        line starts with "#@ ", followed by a space separated
+        key-value pair.  Both key and value are hex encoded if needed.
+
+    **properties**
+        Restore per-message (key,value) metadata.  Each line starts
+        with "#= ", followed by a message id, and a space separated
+        list of key=value pairs.  Ids, keys and values are hex encoded
+        if needed.  See **notmuch-properties(7)** for more details.
+
+    **tags**
+        Restore per-message metadata, namely tags. See *format* above
+        for more details.
+
+    The default is to restore all available types of data. The option
+    can be specified multiple times to select some subset.
+
+``--input=``\ <filename>
+    Read input from given file instead of stdin.
 
 GZIPPED INPUT
 =============
index 67c1ce904c0152d22a53b9b46ace5c6df67df84f..e42da2aec65407a69c069995a2172569d728ea2e 100644 (file)
@@ -24,118 +24,118 @@ See **notmuch-search-terms(7)** for details of the supported syntax for
 
 Supported options for **search** include
 
-    ``--format=``\ (**json**\ \|\ **sexp**\ \|\ **text**\ \|\ **text0**)
-        Presents the results in either JSON, S-Expressions, newline
-        character separated plain-text (default), or null character
-        separated plain-text (compatible with **xargs(1)** -0 option
-        where available).
-
-    ``--format-version=N``
-        Use the specified structured output format version. This is
-        intended for programs that invoke **notmuch(1)** internally. If
-        omitted, the latest supported version will be used.
-
-    ``--output=(summary|threads|messages|files|tags)``
-
-        **summary**
-            Output a summary of each thread with any message matching
-            the search terms. The summary includes the thread ID, date,
-            the number of messages in the thread (both the number
-            matched and the total number), the authors of the thread and
-           the subject. In the case where a thread contains multiple files for
-           some messages, the total number of files is printed in parentheses
-           (see below for an example).
-
-        **threads**
-            Output the thread IDs of all threads with any message
-            matching the search terms, either one per line
-            (--format=text), separated by null characters
-            (--format=text0), as a JSON array (--format=json), or an
-            S-Expression list (--format=sexp).
-
-        **messages**
-            Output the message IDs of all messages matching the search
-            terms, either one per line (--format=text), separated by
-            null characters (--format=text0), as a JSON array
-            (--format=json), or as an S-Expression list (--format=sexp).
-
-        **files**
-            Output the filenames of all messages matching the search
-            terms, either one per line (--format=text), separated by
-            null characters (--format=text0), as a JSON array
-            (--format=json), or as an S-Expression list (--format=sexp).
-
-            Note that each message may have multiple filenames
-            associated with it. All of them are included in the output
-            (unless limited with the --duplicate=N option). This may
-            be particularly confusing for **folder:** or **path:**
-            searches in a specified directory, as the messages may
-            have duplicates in other directories that are included in
-            the output, although these files alone would not match the
-            search.
-
-        **tags**
-            Output all tags that appear on any message matching the
-            search terms, either one per line (--format=text), separated
-            by null characters (--format=text0), as a JSON array
-            (--format=json), or as an S-Expression list (--format=sexp).
-
-    ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
-        This option can be used to present results in either
-        chronological order (**oldest-first**) or reverse chronological
-        order (**newest-first**).
-
-        Note: The thread order will be distinct between these two
-        options (beyond being simply reversed). When sorting by
-        **oldest-first** the threads will be sorted by the oldest
-        message in each thread, but when sorting by **newest-first** the
-        threads will be sorted by the newest message in each thread.
-
-        By default, results will be displayed in reverse chronological
-        order, (that is, the newest results will be displayed first).
-
-    ``--offset=[-]N``
-        Skip displaying the first N results. With the leading '-', start
-        at the Nth result from the end.
-
-    ``--limit=N``
-        Limit the number of displayed results to N.
-
-    ``--exclude=(true|false|all|flag)``
-        A message is called "excluded" if it matches at least one tag in
-        search.tag\_exclude that does not appear explicitly in the
-        search terms. This option specifies whether to omit excluded
-        messages in the search process.
-
-        The default value, **true**, prevents excluded messages from
-        matching the search terms.
-
-        **all** additionally prevents excluded messages from appearing
-        in displayed results, in effect behaving as though the excluded
+``--format=``\ (**json**\ \|\ **sexp**\ \|\ **text**\ \|\ **text0**)
+    Presents the results in either JSON, S-Expressions, newline
+    character separated plain-text (default), or null character
+    separated plain-text (compatible with **xargs(1)** -0 option where
+    available).
+
+``--format-version=N``
+    Use the specified structured output format version. This is
+    intended for programs that invoke **notmuch(1)** internally. If
+    omitted, the latest supported version will be used.
+
+``--output=(summary|threads|messages|files|tags)``
+    **summary**
+        Output a summary of each thread with any message matching the
+        search terms. The summary includes the thread ID, date, the
+        number of messages in the thread (both the number matched and
+        the total number), the authors of the thread and the
+        subject. In the case where a thread contains multiple files
+        for some messages, the total number of files is printed in
+        parentheses (see below for an example).
+
+    **threads**
+        Output the thread IDs of all threads with any message matching
+        the search terms, either one per line (--format=text),
+        separated by null characters (--format=text0), as a JSON array
+        (--format=json), or an S-Expression list (--format=sexp).
+
+    **messages**
+        Output the message IDs of all messages matching the search
+        terms, either one per line (--format=text), separated by null
+        characters (--format=text0), as a JSON array (--format=json),
+        or as an S-Expression list (--format=sexp).
+
+    **files**
+        Output the filenames of all messages matching the search
+        terms, either one per line (--format=text), separated by null
+        characters (--format=text0), as a JSON array (--format=json),
+        or as an S-Expression list (--format=sexp).
+
+        Note that each message may have multiple filenames associated
+        with it. All of them are included in the output (unless
+        limited with the --duplicate=N option). This may be
+        particularly confusing for **folder:** or **path:** searches
+        in a specified directory, as the messages may have duplicates
+        in other directories that are included in the output, although
+        these files alone would not match the search.
+
+    **tags**
+        Output all tags that appear on any message matching the search
+        terms, either one per line (--format=text), separated by null
+        characters (--format=text0), as a JSON array (--format=json),
+        or as an S-Expression list (--format=sexp).
+
+``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
+    This option can be used to present results in either chronological
+    order (**oldest-first**) or reverse chronological order
+    (**newest-first**).
+
+    Note: The thread order will be distinct between these two options
+    (beyond being simply reversed). When sorting by **oldest-first**
+    the threads will be sorted by the oldest message in each thread,
+    but when sorting by **newest-first** the threads will be sorted by
+    the newest message in each thread.
+
+    By default, results will be displayed in reverse chronological
+    order, (that is, the newest results will be displayed first).
+
+``--offset=[-]N``
+    Skip displaying the first N results. With the leading '-', start
+    at the Nth result from the end.
+
+``--limit=N``
+    Limit the number of displayed results to N.
+
+``--exclude=(true|false|all|flag)``
+    A message is called "excluded" if it matches at least one tag in
+    search.tag\_exclude that does not appear explicitly in the search
+    terms. This option specifies whether to omit excluded messages in
+    the search process.
+
+    **true** (default)
+        Prevent excluded messages from matching the search terms.
+
+    **all**
+        Additionally prevent excluded messages from appearing in
+        displayed results, in effect behaving as though the excluded
         messages do not exist.
 
-        **false** allows excluded messages to match search terms and
-        appear in displayed results. Excluded messages are still marked
-        in the relevant outputs.
+    **false**
+        Allow excluded messages to match search terms and appear in
+        displayed results. Excluded messages are still marked in the
+        relevant outputs.
 
-        **flag** only has an effect when ``--output=summary``. The
-        output is almost identical to **false**, but the "match count"
-        is the number of matching non-excluded messages in the thread,
-        rather than the number of matching messages.
+    **flag**
+        Only has an effect when ``--output=summary``. The output is
+        almost identical to **false**, but the "match count" is the
+        number of matching non-excluded messages in the thread, rather
+        than the number of matching messages.
 
-    ``--duplicate=N``
-        For ``--output=files``, output the Nth filename associated
-        with each message matching the query (N is 1-based). If N is
-        greater than the number of files associated with the message,
-        don't print anything.
+``--duplicate=N``
+    For ``--output=files``, output the Nth filename associated with
+    each message matching the query (N is 1-based). If N is greater
+    than the number of files associated with the message, don't print
+    anything.
 
-        For ``--output=messages``, only output message IDs of messages
-        matching the search terms that have at least N filenames
-        associated with them.
+    For ``--output=messages``, only output message IDs of messages
+    matching the search terms that have at least N filenames
+    associated with them.
 
-        Note that this option is orthogonal with the **folder:** search
-        prefix. The prefix matches messages based on filenames. This
-        option filters filenames of the matching messages.
+    Note that this option is orthogonal with the **folder:** search
+    prefix. The prefix matches messages based on filenames. This
+    option filters filenames of the matching messages.
 
 EXAMPLE
 =======
@@ -146,9 +146,9 @@ message having multiple filenames.
 ::
 
   % notmuch search date:today.. and tag:bad-news
-  thread:0000000000063c10 Today [1/1] Some Persun; To the bone (inbox unread)
-  thread:0000000000063c25 Today [1/1(2)] Ann Other; Bears (inbox unread)
-  thread:0000000000063c00 Today [1/1] A Thurd; Bites, stings, sad feelings (inbox unread)
+  thread:0000000000063c10 Today [1/1] Some Persun; To the bone (bad-news inbox unread)
+  thread:0000000000063c25 Today [1/1(2)] Ann Other; Bears (bad-news inbox unread)
+  thread:0000000000063c00 Today [1/1] A Thurd; Bites, stings, sad feelings (bad-news unread)
 
 EXIT STATUS
 ===========
index 7d2b38cbb97eb3c1dc1c61282330af75da5123c6..b2667537c220d88905d5c486af18016064644b13 100644 (file)
@@ -23,149 +23,171 @@ post-processor (such as the emacs interface to notmuch).
 
 Supported options for **show** include
 
-    ``--entire-thread=(true|false)``
-        If true, **notmuch show** outputs all messages in the thread of
-        any message matching the search terms; if false, it outputs only
-        the matching messages. For ``--format=json`` and
-        ``--format=sexp`` this defaults to true. For other formats, this
-        defaults to false.
-
-    ``--format=(text|json|sexp|mbox|raw)``
-
-        **text** (default for messages)
-            The default plain-text format has all text-content MIME
-            parts decoded. Various components in the output,
-            (**message**, **header**, **body**, **attachment**, and MIME
-            **part**), will be delimited by easily-parsed markers. Each
-            marker consists of a Control-L character (ASCII decimal 12),
-            the name of the marker, and then either an opening or
-            closing brace, ('{' or '}'), to either open or close the
-            component. For a multipart MIME message, these parts will be
-            nested.
-
-        **json**
-            The output is formatted with Javascript Object Notation
-            (JSON). This format is more robust than the text format for
-            automated processing. The nested structure of multipart MIME
-            messages is reflected in nested JSON output. By default JSON
-            output includes all messages in a matching thread; that is,
-            by default,
-            ``--format=json`` sets ``--entire-thread``. The caller can
-            disable this behaviour by setting ``--entire-thread=false``.
-            The JSON output is always encoded as UTF-8 and any message
-            content included in the output will be charset-converted to
-            UTF-8.
-
-        **sexp**
-            The output is formatted as the Lisp s-expression (sexp)
-            equivalent of the JSON format above. Objects are formatted
-            as property lists whose keys are keywords (symbols preceded
-            by a colon). True is formatted as ``t`` and both false and
-            null are formatted as ``nil``. As for JSON, the s-expression
-            output is always encoded as UTF-8.
-
-        **mbox**
-            All matching messages are output in the traditional, Unix
-            mbox format with each message being prefixed by a line
-            beginning with "From " and a blank line separating each
-            message. Lines in the message content beginning with "From "
-            (preceded by zero or more '>' characters) have an additional
-            '>' character added. This reversible escaping is termed
-            "mboxrd" format and described in detail here:
+``--entire-thread=(true|false)``
+    If true, **notmuch show** outputs all messages in the thread of
+    any message matching the search terms; if false, it outputs only
+    the matching messages. For ``--format=json`` and ``--format=sexp``
+    this defaults to true. For other formats, this defaults to false.
+
+``--format=(text|json|sexp|mbox|raw)``
+    **text** (default for messages)
+        The default plain-text format has all text-content MIME parts
+        decoded. Various components in the output, (**message**,
+        **header**, **body**, **attachment**, and MIME **part**), will
+        be delimited by easily-parsed markers. Each marker consists of
+        a Control-L character (ASCII decimal 12), the name of the
+        marker, and then either an opening or closing brace, ('{' or
+        '}'), to either open or close the component. For a multipart
+        MIME message, these parts will be nested.
+
+    **json**
+        The output is formatted with Javascript Object Notation
+        (JSON). This format is more robust than the text format for
+        automated processing. The nested structure of multipart MIME
+        messages is reflected in nested JSON output. By default JSON
+        output includes all messages in a matching thread; that is, by
+        default, ``--format=json`` sets ``--entire-thread``. The
+        caller can disable this behaviour by setting
+        ``--entire-thread=false``.  The JSON output is always encoded
+        as UTF-8 and any message content included in the output will
+        be charset-converted to UTF-8.
+
+    **sexp**
+        The output is formatted as the Lisp s-expression (sexp)
+        equivalent of the JSON format above. Objects are formatted as
+        property lists whose keys are keywords (symbols preceded by a
+        colon). True is formatted as ``t`` and both false and null are
+        formatted as ``nil``. As for JSON, the s-expression output is
+        always encoded as UTF-8.
+
+    **mbox**
+        All matching messages are output in the traditional, Unix mbox
+        format with each message being prefixed by a line beginning
+        with "From " and a blank line separating each message. Lines
+        in the message content beginning with "From " (preceded by
+        zero or more '>' characters) have an additional '>' character
+        added. This reversible escaping is termed "mboxrd" format and
+        described in detail here:
 
             http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
 
-        **raw** (default if --part is given)
-            Write the raw bytes of the given MIME part of a message to
-            standard out. For this format, it is an error to specify a
-            query that matches more than one message.
-
-            If the specified part is a leaf part, this outputs the
-            body of the part after performing content transfer
-            decoding (but no charset conversion). This is suitable for
-            saving attachments, for example.
-
-            For a multipart or message part, the output includes the
-            part headers as well as the body (including all child
-            parts). No decoding is performed because multipart and
-            message parts cannot have non-trivial content transfer
-            encoding. Consumers of this may need to implement MIME
-            decoding and similar functions.
-
-    ``--format-version=N``
-        Use the specified structured output format version. This is
-        intended for programs that invoke **notmuch(1)** internally. If
-        omitted, the latest supported version will be used.
-
-    ``--part=N``
-        Output the single decoded MIME part N of a single message. The
-        search terms must match only a single message. Message parts are
-        numbered in a depth-first walk of the message MIME structure,
-        and are identified in the 'json', 'sexp' or 'text' output
-        formats.
-
-        Note that even a message with no MIME structure or a single
-        body part still has two MIME parts: part 0 is the whole
-        message (headers and body) and part 1 is just the body.
-
-    ``--verify``
-        Compute and report the validity of any MIME cryptographic
-        signatures found in the selected content (ie. "multipart/signed"
-        parts). Status of the signature will be reported (currently only
-        supported with --format=json and --format=sexp), and the
-        multipart/signed part will be replaced by the signed data.
-
-    ``--decrypt=(false|auto|true)``
-        If ``true``, decrypt any MIME encrypted parts found in the
-        selected content (i.e. "multipart/encrypted" parts). Status of
-        the decryption will be reported (currently only supported
-        with --format=json and --format=sexp) and on successful
-        decryption the multipart/encrypted part will be replaced by
-        the decrypted content.
-
-        If ``auto``, and a session key is already known for the
-        message, then it will be decrypted, but notmuch will not try
-        to access the user's keys.
-
-        Use ``false`` to avoid even automatic decryption.
-
-        Non-automatic decryption expects a functioning
-        **gpg-agent(1)** to provide any needed credentials. Without
-        one, the decryption will fail.
-
-        Note: ``true`` implies --verify.
-
-        Default: ``auto``
-
-    ``--exclude=(true|false)``
-        Specify whether to omit threads only matching
-        search.tag\_exclude from the search results (the default) or
-        not. In either case the excluded message will be marked with the
-        exclude flag (except when output=mbox when there is nowhere to
-        put the flag).
-
-        If --entire-thread is specified then complete threads are
-        returned regardless (with the excluded flag being set when
-        appropriate) but threads that only match in an excluded message
-        are not returned when ``--exclude=true.``
-
-        The default is ``--exclude=true.``
-
-    ``--body=(true|false)``
-        If true (the default) **notmuch show** includes the bodies of
-        the messages in the output; if false, bodies are omitted.
-        ``--body=false`` is only implemented for the json and sexp
-        formats and it is incompatible with ``--part > 0.``
-
-        This is useful if the caller only needs the headers as body-less
-        output is much faster and substantially smaller.
-
-    ``--include-html``
-        Include "text/html" parts as part of the output (currently only
-        supported with --format=json and --format=sexp). By default,
-        unless ``--part=N`` is used to select a specific part or
-        ``--include-html`` is used to include all "text/html" parts, no
-        part with content type "text/html" is included in the output.
+    **raw** (default if --part is given)
+        Write the raw bytes of the given MIME part of a message to
+        standard out. For this format, it is an error to specify a
+        query that matches more than one message.
+
+        If the specified part is a leaf part, this outputs the body of
+        the part after performing content transfer decoding (but no
+        charset conversion). This is suitable for saving attachments,
+        for example.
+
+        For a multipart or message part, the output includes the part
+        headers as well as the body (including all child parts). No
+        decoding is performed because multipart and message parts
+        cannot have non-trivial content transfer encoding. Consumers
+        of this may need to implement MIME decoding and similar
+        functions.
+
+``--format-version=N``
+    Use the specified structured output format version. This is
+    intended for programs that invoke **notmuch(1)** internally. If
+    omitted, the latest supported version will be used.
+
+``--part=N``
+    Output the single decoded MIME part N of a single message. The
+    search terms must match only a single message. Message parts are
+    numbered in a depth-first walk of the message MIME structure, and
+    are identified in the 'json', 'sexp' or 'text' output formats.
+
+    Note that even a message with no MIME structure or a single body
+    part still has two MIME parts: part 0 is the whole message
+    (headers and body) and part 1 is just the body.
+
+``--verify``
+    Compute and report the validity of any MIME cryptographic
+    signatures found in the selected content (ie. "multipart/signed"
+    parts). Status of the signature will be reported (currently only
+    supported with --format=json and --format=sexp), and the
+    multipart/signed part will be replaced by the signed data.
+
+``--decrypt=(false|auto|true|stash)``
+    If ``true``, decrypt any MIME encrypted parts found in the
+    selected content (i.e. "multipart/encrypted" parts). Status of
+    the decryption will be reported (currently only supported
+    with --format=json and --format=sexp) and on successful
+    decryption the multipart/encrypted part will be replaced by
+    the decrypted content.
+
+    ``stash`` behaves like ``true``, but upon successful decryption it
+    will also stash the message's session key in the database, and
+    index the cleartext of the message, enabling automatic decryption
+    in the future.
+
+    If ``auto``, and a session key is already known for the
+    message, then it will be decrypted, but notmuch will not try
+    to access the user's keys.
+
+    Use ``false`` to avoid even automatic decryption.
+
+    Non-automatic decryption (``stash`` or ``true``, in the absence of
+    a stashed session key) expects a functioning **gpg-agent(1)** to
+    provide any needed credentials. Without one, the decryption will
+    fail.
+
+    Note: setting either ``true`` or ``stash`` here implies
+    ``--verify``.
+
+    Here is a table that summarizes each of these policies:
+
+    +------------------------+-------+------+------+-------+
+    |                        | false | auto | true | stash |
+    +========================+=======+======+======+=======+
+    | Show cleartext if      |       |  X   |  X   |   X   |
+    | session key is         |       |      |      |       |
+    | already known          |       |      |      |       |
+    +------------------------+-------+------+------+-------+
+    | Use secret keys to     |       |      |  X   |   X   |
+    | show cleartext         |       |      |      |       |
+    +------------------------+-------+------+------+-------+
+    | Stash any newly        |       |      |      |   X   |
+    | recovered session keys,|       |      |      |       |
+    | reindexing message if  |       |      |      |       |
+    | found                  |       |      |      |       |
+    +------------------------+-------+------+------+-------+
+
+    Note: ``--decrypt=stash`` requires write access to the database.
+    Otherwise, ``notmuch show`` operates entirely in read-only mode.
+
+    Default: ``auto``
+
+``--exclude=(true|false)``
+    Specify whether to omit threads only matching search.tag\_exclude
+    from the search results (the default) or not. In either case the
+    excluded message will be marked with the exclude flag (except when
+    output=mbox when there is nowhere to put the flag).
+
+    If --entire-thread is specified then complete threads are returned
+    regardless (with the excluded flag being set when appropriate) but
+    threads that only match in an excluded message are not returned
+    when ``--exclude=true.``
+
+    The default is ``--exclude=true.``
+
+``--body=(true|false)``
+    If true (the default) **notmuch show** includes the bodies of the
+    messages in the output; if false, bodies are omitted.
+    ``--body=false`` is only implemented for the json and sexp formats
+    and it is incompatible with ``--part > 0.``
+
+    This is useful if the caller only needs the headers as body-less
+    output is much faster and substantially smaller.
+
+``--include-html``
+    Include "text/html" parts as part of the output (currently only
+    supported with --format=json and --format=sexp). By default,
+    unless ``--part=N`` is used to select a specific part or
+    ``--include-html`` is used to include all "text/html" parts, no
+    part with content type "text/html" is included in the output.
 
 A common use of **notmuch show** is to display a single thread of email
 messages. For this, use a search term of "thread:<thread-id>" as can be
index 88e454ba5c5b75c55f2e0c4d78e22c06de03b78b..c2324f5a94ea88b4e40410176347ac41a3f39135 100644 (file)
@@ -32,23 +32,22 @@ the **maildir.synchronize\_flags** configuration option is enabled. See
 
 Supported options for **tag** include
 
-    ``--remove-all``
-        Remove all tags from each message matching the search terms
-        before applying the tag changes appearing on the command line.
-        This means setting the tags of each message to the tags to be
-        added. If there are no tags to be added, the messages will have
-        no tags.
-
-    ``--batch``
-        Read batch tagging operations from a file (stdin by default).
-        This is more efficient than repeated **notmuch tag**
-        invocations. See `TAG FILE FORMAT <#tag_file_format>`__ below
-        for the input format. This option is not compatible with
-        specifying tagging on the command line.
-
-    ``--input=``\ <filename>
-        Read input from given file, instead of from stdin. Implies
-        ``--batch``.
+``--remove-all``
+    Remove all tags from each message matching the search terms before
+    applying the tag changes appearing on the command line.  This
+    means setting the tags of each message to the tags to be added. If
+    there are no tags to be added, the messages will have no tags.
+
+``--batch``
+    Read batch tagging operations from a file (stdin by default).
+    This is more efficient than repeated **notmuch tag**
+    invocations. See `TAG FILE FORMAT <#tag_file_format>`__ below for
+    the input format. This option is not compatible with specifying
+    tagging on the command line.
+
+``--input=``\ <filename>
+    Read input from given file, instead of from stdin. Implies
+    ``--batch``.
 
 TAG FILE FORMAT
 ===============
index 358f42e8d5bef9335a9649839b0e73289ddadc61..d2cd8da55cb99e0d20792fdbe326e415bd0109f7 100644 (file)
@@ -39,28 +39,27 @@ OPTIONS
 
 Supported global options for ``notmuch`` include
 
-    ``--help`` [command-name]
-       Print a synopsis of available commands and exit.
-       With an optional command name, show the man page
-       for that subcommand.
+``--help`` [command-name]
+    Print a synopsis of available commands and exit. With an optional
+    command name, show the man page for that subcommand.
 
-    ``--version``
-       Print the installed version of notmuch, and exit.
+``--version``
+    Print the installed version of notmuch, and exit.
 
-    ``--config=FILE``
-       Specify the configuration file to use. This overrides any
-       configuration file specified by ${NOTMUCH\_CONFIG}.
+``--config=FILE``
+    Specify the configuration file to use. This overrides any
+    configuration file specified by ${NOTMUCH\_CONFIG}.
 
-    ``--uuid=HEX``
-       Enforce that the database UUID (a unique identifier which
-       persists until e.g. the database is compacted)
-       is HEX; exit with an error if it is not. This is useful to
-       detect rollover in modification counts on messages. You can
-       find this UUID using e.g. ``notmuch count --lastmod``
+``--uuid=HEX``
+    Enforce that the database UUID (a unique identifier which persists
+    until e.g. the database is compacted) is HEX; exit with an error
+    if it is not. This is useful to detect rollover in modification
+    counts on messages. You can find this UUID using e.g. ``notmuch
+    count --lastmod``
 
 All global options except ``--config`` can also be specified after the
-command. For example, ``notmuch subcommand --uuid=HEX`` is
-equivalent to ``notmuch --uuid=HEX subcommand``.
+command. For example, ``notmuch subcommand --uuid=HEX`` is equivalent
+to ``notmuch --uuid=HEX subcommand``.
 
 COMMANDS
 ========
index f07e4dabf21ab5dc608eb989d3e4c94218391fbe..de2ed0c2358809746a6fcf8e73c7569ee0f00e01 100644 (file)
@@ -17,34 +17,33 @@ have executable permissions.
 
 The currently available hooks are described below.
 
-    **pre-new**
-        This hook is invoked by the **new** command before scanning or
-        importing new messages into the database. If this hook exits
-        with a non-zero status, notmuch will abort further processing of
-        the **new** command.
-
-        Typically this hook is used for fetching or delivering new mail
-        to be imported into the database.
-
-    **post-new**
-        This hook is invoked by the **new** command after new messages
-        have been imported into the database and initial tags have been
-        applied. The hook will not be run if there have been any errors
-        during the scan or import.
-
-        Typically this hook is used to perform additional query-based
-        tagging on the imported messages.
-
-    **post-insert**
-
-        This hook is invoked by the **insert** command after the
-        message has been delivered, added to the database, and initial
-        tags have been applied. The hook will not be run if there have
-        been any errors during the message delivery; what is regarded
-        as successful delivery depends on the ``--keep`` option.
-
-        Typically this hook is used to perform additional query-based
-        tagging on the delivered messages.
+**pre-new**
+    This hook is invoked by the **new** command before scanning or
+    importing new messages into the database. If this hook exits with
+    a non-zero status, notmuch will abort further processing of the
+    **new** command.
+
+    Typically this hook is used for fetching or delivering new mail to
+    be imported into the database.
+
+**post-new**
+    This hook is invoked by the **new** command after new messages
+    have been imported into the database and initial tags have been
+    applied. The hook will not be run if there have been any errors
+    during the scan or import.
+
+    Typically this hook is used to perform additional query-based
+    tagging on the imported messages.
+
+**post-insert**
+    This hook is invoked by the **insert** command after the message
+    has been delivered, added to the database, and initial tags have
+    been applied. The hook will not be run if there have been any
+    errors during the message delivery; what is regarded as successful
+    delivery depends on the ``--keep`` option.
+
+    Typically this hook is used to perform additional query-based
+    tagging on the delivered messages.
 
 SEE ALSO
 ========
index 07d36a1a5993fefb0f815f7c82a44b8bef741f1a..802e6763341e55db0699121a391e07262368e3a2 100644 (file)
@@ -54,7 +54,6 @@ The following properties are set by notmuch internally in the course
 of its normal activity.
 
 **index.decryption**
-
     If a message contains encrypted content, and notmuch tries to
     decrypt that content during indexing, it will add the property
     ``index.decryption=success`` when the cleartext was successfully
index 6d2bf62ad7a15c42a6ae25293f1248678f6be4f2..8a5eeb189179a41220139f634b6499172285d379 100644 (file)
@@ -42,7 +42,7 @@ of the prefixes with <regex> forms can be also used to restrict the
 results to those whose value matches a regular expression (see
 **regex(7)**) delimited with //, for example::
 
-   notmuch search 'from:/bob@.*[.]example[.]com/'
+   notmuch search 'from:"/bob@.*[.]example[.]com/"'
 
 from:<name-or-address> or from:/<regex>/
     The **from:** prefix is used to match the name or address of
@@ -83,6 +83,22 @@ thread:<thread-id>
     messages). These thread ID values can be seen in the first column
     of output from **notmuch search**
 
+thread:{<notmuch query>}
+    If notmuch is built with **Xapian Field Processors** (see below),
+    threads may be searched for indirectly by providing an arbitrary
+    notmuch query in **{}**. For example, the following returns
+    threads containing a message from mallory and one (not necessarily
+    the same message) with Subject containing the word "crypto".
+
+    ::
+
+       % notmuch search 'thread:"{from:mallory}" and thread:"{subject:crypto}"'
+
+    The performance of such queries can vary wildly. To understand
+    this, the user should think of the query **thread:{<something>}**
+    as expanding to all of the thread IDs which match **<something>**;
+    notmuch then performs a second search using the expanded query.
+
 path:<directory-path> or path:<directory-path>/** or path:/<regex>/
     The **path:** prefix searches for email messages that are in
     particular directories within the mail store. The directory must
@@ -121,13 +137,14 @@ date:<since>..<until> or date:<date>
     expression, and supported syntax for <since> and <until> date and
     time expressions.
 
-    The time range can also be specified using timestamps with a
-    syntax of:
+    The time range can also be specified using timestamps without
+    including the date prefix using a syntax of:
 
     <initial-timestamp>..<final-timestamp>
 
     Each timestamp is a number representing the number of seconds
-    since 1970-01-01 00:00:00 UTC.
+    since 1970-01-01 00:00:00 UTC. Specifying a time range this way
+    is considered legacy and predates the date prefix.
 
 lastmod:<initial-revision>..<final-revision>
     The **lastmod:** prefix can be used to restrict the result by the
@@ -272,6 +289,33 @@ Both of these will match a subject "Free Delicious Pizza" while
 
 will not.
 
+Quoting
+-------
+
+Double quotes are also used by the notmuch query parser to protect
+boolean terms, regular expressions, or subqueries containing spaces or
+other special characters, e.g.
+
+::
+
+   tag:"a tag"
+
+::
+
+   folder:"/^.*/(Junk|Spam)$/"
+
+::
+
+   thread:"{from:mallory and date:2009}"
+
+As with phrases, you need to protect the double quotes from the shell
+e.g.
+
+::
+
+   % notmuch search 'folder:"/^.*/(Junk|Spam)$/"'
+   % notmuch search 'thread:"{from:mallory and date:2009}" and thread:{to:mallory}'
+
 DATE AND TIME SEARCH
 ====================
 
@@ -296,6 +340,13 @@ In this case, <since> is taken as the earliest time it could describe
 could describe (the end of yesterday). Similarly, date:january..february
 matches from the beginning of January to the end of February.
 
+If specifying a time range using timestamps in conjunction with the
+date prefix, each timestamp must be preceded by @ (ASCII hex 40). As
+above, each timestamp is a number representing the number of seconds
+since 1970-01-01 00:00:00 UTC. For example:
+
+    date:@<initial-timestamp>..@<final-timestamp>
+
 date:<expr>..! can be used as a shorthand for date:<expr>..<expr>. The
 expansion takes place before interpretation, and thus, for example,
 date:monday..! matches from the beginning of Monday until the end of
@@ -405,6 +456,7 @@ Currently the following features require field processor support:
 - non-range date queries, e.g. "date:today"
 - named queries e.g. "query:my_special_query"
 - regular expression searches, e.g. "subject:/^\\[SPAM\\]/"
+- thread subqueries, e.g. "thread:{from:bob}"
 
 SEE ALSO
 ========
index 5e25996f69b4e9c7f03ab340bba941b78d4c45ef..ce2e358e2134e2dfb4c86a2fe89f2d00a7eb4f45 100644 (file)
@@ -177,9 +177,65 @@ variables.
 notmuch-show
 ============
 
+``notmuch-show-mode`` is used to display a single thread of email from
+your email archives.
+
+By default, various components of email messages, (citations,
+signatures, already-read messages), are hidden. You can make
+these parts visible by clicking with the mouse button or by
+pressing RET after positioning the cursor on a hidden part.
+
+``<space>``
+    Scroll the current message (if necessary),
+    advance to the next message, or advance to the next thread (if
+    already on the last message of a thread).
+
+``N``
+    Move to next message
+
+``P``
+    Move to previous message (or start of current message)
+
+``n``
+    Move to next matching message
+
+``p``
+    Move to previous matching message
+
+``+,-``
+    Add or remove arbitrary tags from the current message.
+
+``?``
+    Display full set of key bindings
+
+.. _notmuch-tree:
+
 notmuch-tree
 ============
 
+``notmuch-tree-mode`` displays the results of a "notmuch tree" of your
+email archives. Each line in the buffer represents a single
+message giving the relative date, the author, subject, and any
+tags.
+
+``<return>``
+   Displays that message.
+
+``N``
+    Move to next message
+
+``P``
+    Move to previous message
+
+``n``
+    Move to next matching message
+
+``p``
+    Move to previous matching message
+
+``?``
+    Display full set of key bindings
+
 Global key bindings
 ===================
 
@@ -189,6 +245,9 @@ following key bindings:
 ``j``
     Jump to saved searches using :ref:`notmuch-jump`.
 
+``k``
+    Tagging operations using :ref:`notmuch-tag-jump`
+
 .. _notmuch-jump:
 
 notmuch-jump
@@ -202,6 +261,22 @@ example, in the default configuration ``j i`` jumps immediately to the
 inbox search.  When you press ``j``, notmuch-jump shows the saved
 searches and their shortcut keys in the mini-buffer.
 
+.. _notmuch-tag-jump:
+
+notmuch-tag-jump
+----------------
+
+Tagging operations configured through ``notmuch-tagging-keys`` can
+be accessed via :kbd:`k` in :ref:`notmuch-show`,
+:ref:`notmuch-search` and :ref:`notmuch-tree`.  With a
+prefix (:kbd:`C-u k`), notmuch displays a menu of the reverses of the
+operations specified in ``notmuch-tagging-keys``; i.e. each
+``+tag`` is replaced by ``-tag`` and vice versa.
+
+:index:`notmuch-tagging-keys`
+
+   A list of keys and corresponding tagging operations.
+
 Configuration
 =============
 
index 040e64d435724b450008260e9351e52b3551fdfe..1b3ef5847a4060a0bb4503356d90caf1a11a9d18 100644 (file)
@@ -80,9 +80,14 @@ endif
 
 elpa: $(ELPA_FILE)
 
-notmuch-emacs-%.tar: ${elpa_sources}
+ELPA_DIR=.elpa-build/notmuch-${ELPA_VERSION}
+notmuch-emacs-%.tar: ${elpa_sources} build-info
        mkdir -p .elpa-build/notmuch-${ELPA_VERSION}
-       cp ${elpa_sources} .elpa-build/notmuch-${ELPA_VERSION}
+       cp ${elpa_sources} ${ELPA_DIR}
+ifeq ($(HAVE_SPHINX)$(HAVE_MAKEINFO)$(HAVE_INSTALL_INFO),111)
+       cp ${INFO_INFO_FILES} ${ELPA_DIR}
+       for file in ${INFO_INFO_FILES}; do install-info $$file ${ELPA_DIR}/dir; done
+endif
        tar -C .elpa-build -cf $@ notmuch-${ELPA_VERSION}
        rm -r .elpa-build
 
index c858a20b6cc751d73d457272b0586da3d20e49db..aff8beb510173fbf74cf8fe704828529ba3f458a 100644 (file)
@@ -864,7 +864,7 @@ Supports the following entries in OPTIONS as a plist:
 :hide-if-empty - hide if no buttons would be shown
    (only makes sense without :show-empty-searches)
 :filter - This can be a function that takes the search query as its argument and
-   returns a filter to be used in conjuction with the query for that search or nil
+   returns a filter to be used in conjunction with the query for that search or nil
    to hide the element. This can also be a string that is used as a combined with
    each query using \"and\".
 :filter-count - Separate filter to generate the count displayed each search. Accepts
index 59b546a65f072b18420e80aced14f22f938fac87..fc8ac687e8208b64d95c9032e7e3e22ea989e5ca 100644 (file)
@@ -103,7 +103,7 @@ Note that these functions use `mail-citation-hook' if that is non-nil."
   "Function to decide which parts get a header when replying.
 
 This function specifies which parts of a mime message with
-mutiple parts get a header."
+multiple parts get a header."
   :type '(radio (const :tag "No part headers"
                               notmuch-show-reply-insert-header-p-never)
                (const :tag "All except multipart/* and hidden parts"
index 43debb260610d724a6100d74d7cf983c54ffd149..a0a58373aa675a330dc57c04f94bcde622a0f53e 100644 (file)
@@ -183,7 +183,7 @@ each attachment handler is logged in buffers with names beginning
 24.3 to work.")
 
 (defcustom notmuch-show-stash-mlarchive-link-alist
-  '(("Gmane" . "http://mid.gmane.org/")
+  '(("Gmane" . "https://mid.gmane.org/")
     ("MARC" . "https://marc.info/?i=")
     ("Mail Archive, The" . "https://mid.mail-archive.com/")
     ("LKML" . "https://lkml.kernel.org/r/")
index a1ba4b45411be8c26f28f1906c71a6428c2cdada..f673c0a27385803a684540b6ce0078ad453f6f92 100644 (file)
@@ -113,7 +113,7 @@ filter_filter (GMimeFilter *filter, char *inbuf, size_t inlen, size_t prespace,
               char **outbuf, size_t *outlen, size_t *outprespace)
 {
        GMimeFilterReply *reply = (GMimeFilterReply *) filter;
-       register const char *inptr = inbuf;
+       const char *inptr = inbuf;
        const char *inend = inbuf + inlen;
        char *outptr;
 
index 8aa03891d775b7591e3f67a5a66fe8cd9c98ca9b..5dc057c090133b5c4be9647635a623188eeff6d2 100644 (file)
@@ -58,7 +58,8 @@ libnotmuch_cxx_srcs =         \
        $(dir)/query-fp.cc      \
        $(dir)/config.cc        \
        $(dir)/regexp-fields.cc \
-       $(dir)/thread.cc
+       $(dir)/thread.cc \
+       $(dir)/thread-fp.cc
 
 libnotmuch_modules := $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
 
index 02444e09e965c4ce0dbc396d5ed48b5abce5ba0a..9cf8062cbe7caa2c5f7ecd714ca934c7f96b1e76 100644 (file)
@@ -21,6 +21,7 @@
 #include "database-private.h"
 #include "parse-time-vrp.h"
 #include "query-fp.h"
+#include "thread-fp.h"
 #include "regexp-fields.h"
 #include "string-util.h"
 
@@ -258,7 +259,8 @@ prefix_t prefix_table[] = {
     { "directory",             "XDIRECTORY",   NOTMUCH_FIELD_NO_FLAGS },
     { "file-direntry",         "XFDIRENTRY",   NOTMUCH_FIELD_NO_FLAGS },
     { "directory-direntry",    "XDDIRENTRY",   NOTMUCH_FIELD_NO_FLAGS },
-    { "thread",                        "G",            NOTMUCH_FIELD_EXTERNAL },
+    { "thread",                        "G",            NOTMUCH_FIELD_EXTERNAL |
+                                               NOTMUCH_FIELD_PROCESSOR },
     { "tag",                   "K",            NOTMUCH_FIELD_EXTERNAL |
                                                NOTMUCH_FIELD_PROCESSOR },
     { "is",                    "K",            NOTMUCH_FIELD_EXTERNAL |
@@ -317,6 +319,8 @@ _setup_query_field (const prefix_t *prefix, notmuch_database_t *notmuch)
            fp = (new DateFieldProcessor())->release ();
        else if (STRNCMP_LITERAL(prefix->name, "query") == 0)
            fp = (new QueryFieldProcessor (*notmuch->query_parser, notmuch))->release ();
+       else if (STRNCMP_LITERAL(prefix->name, "thread") == 0)
+           fp = (new ThreadFieldProcessor (*notmuch->query_parser, notmuch))->release ();
        else
            fp = (new RegexpFieldProcessor (prefix->name, prefix->flags,
                                            *notmuch->query_parser, notmuch))->release ();
index 0ad683fac51b7704b1f15ee0c6c24b331dcfd02f..3f694387c36c2cc21c1509881f7596e3b7980b14 100644 (file)
@@ -176,7 +176,7 @@ filter_filter (GMimeFilter *gmime_filter, char *inbuf, size_t inlen, size_t pres
 {
     NotmuchFilterDiscardNonTerm *filter = (NotmuchFilterDiscardNonTerm *) gmime_filter;
     const scanner_state_t *states = filter->states;
-    register const char *inptr = inbuf;
+    const char *inptr = inbuf;
     const char *inend = inbuf + inlen;
     char *outptr;
 
@@ -385,7 +385,7 @@ _index_mime_part (notmuch_message_t *message,
     const char *charset;
 
     if (! part) {
-       _notmuch_database_log (_notmuch_message_database (message),
+       _notmuch_database_log (notmuch_message_get_database (message),
                              "Warning: Not indexing empty mime part.\n");
        return;
     }
@@ -411,7 +411,7 @@ _index_mime_part (notmuch_message_t *message,
                                         g_mime_multipart_get_part (multipart, i));
                    continue;
                } else if (i != GMIME_MULTIPART_SIGNED_CONTENT) {
-                   _notmuch_database_log (_notmuch_message_database (message),
+                   _notmuch_database_log (notmuch_message_get_database (message),
                                           "Warning: Unexpected extra parts of multipart/signed. Indexing anyway.\n");
                }
            }
@@ -424,7 +424,7 @@ _index_mime_part (notmuch_message_t *message,
                                               GMIME_MULTIPART_ENCRYPTED (part));
                } else {
                    if (i != GMIME_MULTIPART_ENCRYPTED_VERSION) {
-                       _notmuch_database_log (_notmuch_message_database (message),
+                       _notmuch_database_log (notmuch_message_get_database (message),
                                               "Warning: Unexpected extra parts of multipart/encrypted.\n");
                    }
                }
@@ -447,7 +447,7 @@ _index_mime_part (notmuch_message_t *message,
     }
 
     if (! (GMIME_IS_PART (part))) {
-       _notmuch_database_log (_notmuch_message_database (message),
+       _notmuch_database_log (notmuch_message_get_database (message),
                              "Warning: Not indexing unknown mime part: %s.\n",
                              g_type_name (G_OBJECT_TYPE (part)));
        return;
@@ -528,7 +528,7 @@ _index_encrypted_mime_part (notmuch_message_t *message,
     if (!indexopts || (notmuch_indexopts_get_decrypt_policy (indexopts) == NOTMUCH_DECRYPT_FALSE))
        return;
 
-    notmuch = _notmuch_message_database (message);
+    notmuch = notmuch_message_get_database (message);
 
     GMimeCryptoContext* crypto_ctx = NULL;
 #if (GMIME_MAJOR_VERSION < 3)
index 35eaf3c60f3f43f72c0cae818a77bc09a5e260dd..710ba0460665c6e506a2efe24b2a12c242321980 100644 (file)
@@ -16,7 +16,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see http://www.gnu.org/licenses/ .
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
  *
  * Author: David Bremner <david@tethera.net>
  */
@@ -36,6 +36,31 @@ notmuch_message_get_property (notmuch_message_t *message, const char *key, const
     return NOTMUCH_STATUS_SUCCESS;
 }
 
+notmuch_status_t
+notmuch_message_count_properties (notmuch_message_t *message, const char *key, unsigned int *count)
+{
+    if (! count || ! key || ! message)
+       return NOTMUCH_STATUS_NULL_POINTER;
+
+    notmuch_string_map_t *map;
+    map = _notmuch_message_property_map (message);
+    if (! map)
+       return NOTMUCH_STATUS_NULL_POINTER;
+
+    notmuch_string_map_iterator_t *matcher = _notmuch_string_map_iterator_create (map, key, true);
+    if (! matcher)
+       return NOTMUCH_STATUS_OUT_OF_MEMORY;
+
+    *count = 0;
+    while (_notmuch_string_map_iterator_valid (matcher)) {
+       (*count)++;
+       _notmuch_string_map_iterator_move_to_next (matcher);
+    }
+
+    _notmuch_string_map_iterator_destroy (matcher);
+    return NOTMUCH_STATUS_SUCCESS;
+}
+
 static notmuch_status_t
 _notmuch_message_modify_property (notmuch_message_t *message, const char *key, const char *value,
                                  bool delete_it)
@@ -44,7 +69,7 @@ _notmuch_message_modify_property (notmuch_message_t *message, const char *key, c
     notmuch_status_t status;
     char *term = NULL;
 
-    status = _notmuch_database_ensure_writable (_notmuch_message_database (message));
+    status = _notmuch_database_ensure_writable (notmuch_message_get_database (message));
     if (status)
        return status;
 
@@ -92,7 +117,7 @@ _notmuch_message_remove_all_properties (notmuch_message_t *message, const char *
     notmuch_status_t status;
     const char * term_prefix;
 
-    status = _notmuch_database_ensure_writable (_notmuch_message_database (message));
+    status = _notmuch_database_ensure_writable (notmuch_message_get_database (message));
     if (status)
        return status;
 
index d5db89b6606c7da011c2a80c5ce460f769f32650..153e4bed01e370021ec508e76fe7746fc91bcddd 100644 (file)
@@ -268,7 +268,7 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch,
 
        doc_id = _notmuch_database_generate_doc_id (notmuch);
     } catch (const Xapian::Error &error) {
-       _notmuch_database_log(_notmuch_message_database (message), "A Xapian exception occurred creating message: %s\n",
+       _notmuch_database_log(notmuch_message_get_database (message), "A Xapian exception occurred creating message: %s\n",
                 error.get_msg().c_str());
        notmuch->exception_reported = true;
        *status_ret = NOTMUCH_PRIVATE_STATUS_XAPIAN_EXCEPTION;
@@ -318,6 +318,23 @@ _notmuch_message_get_term (notmuch_message_t *message,
     return value;
 }
 
+/*
+ * For special applications where we only want the thread id, reading
+ * in all metadata is a heavy I/O penalty.
+ */
+const char *
+_notmuch_message_get_thread_id_only (notmuch_message_t *message)
+{
+
+    Xapian::TermIterator i = message->doc.termlist_begin ();
+    Xapian::TermIterator end = message->doc.termlist_end ();
+
+    message->thread_id = _notmuch_message_get_term (message, i, end,
+                                                   _find_prefix ("thread"));
+    return message->thread_id;
+}
+
+
 static void
 _notmuch_message_ensure_metadata (notmuch_message_t *message, void *field)
 {
@@ -495,7 +512,7 @@ _notmuch_message_ensure_message_file (notmuch_message_t *message)
        return;
 
     message->message_file = _notmuch_message_file_open_ctx (
-       _notmuch_message_database (message), message, filename);
+       notmuch_message_get_database (message), message, filename);
 }
 
 const char *
@@ -525,7 +542,7 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header)
                return talloc_strdup (message, value.c_str ());
 
        } catch (Xapian::Error &error) {
-           _notmuch_database_log(_notmuch_message_database (message), "A Xapian exception occurred when reading header: %s\n",
+           _notmuch_database_log(notmuch_message_get_database (message), "A Xapian exception occurred when reading header: %s\n",
                     error.get_msg().c_str());
            message->notmuch->exception_reported = true;
            return NULL;
@@ -646,7 +663,7 @@ _notmuch_message_remove_indexed_terms (notmuch_message_t *message)
            notmuch_database_t *notmuch = message->notmuch;
 
            if (!notmuch->exception_reported) {
-               _notmuch_database_log(_notmuch_message_database (message), "A Xapian exception occurred creating message: %s\n",
+               _notmuch_database_log(notmuch_message_get_database (message), "A Xapian exception occurred creating message: %s\n",
                                      error.get_msg().c_str());
                notmuch->exception_reported = true;
            }
@@ -1042,7 +1059,7 @@ notmuch_message_get_date (notmuch_message_t *message)
     try {
        value = message->doc.get_value (NOTMUCH_VALUE_TIMESTAMP);
     } catch (Xapian::Error &error) {
-       _notmuch_database_log(_notmuch_message_database (message), "A Xapian exception occurred when reading date: %s\n",
+       _notmuch_database_log(notmuch_message_get_database (message), "A Xapian exception occurred when reading date: %s\n",
                 error.get_msg().c_str());
        message->notmuch->exception_reported = true;
        return 0;
@@ -1908,7 +1925,7 @@ notmuch_message_destroy (notmuch_message_t *message)
 }
 
 notmuch_database_t *
-_notmuch_message_database (notmuch_message_t *message)
+notmuch_message_get_database (const notmuch_message_t *message)
 {
     return message->notmuch;
 }
@@ -1985,7 +2002,7 @@ notmuch_message_reindex (notmuch_message_t *message,
     /* strdup it because the metadata may be invalidated */
     orig_thread_id = talloc_strdup (message, orig_thread_id);
 
-    notmuch = _notmuch_message_database (message);
+    notmuch = notmuch_message_get_database (message);
 
     ret = _notmuch_database_ensure_writable (notmuch);
     if (ret)
index 1093429cfc77026289f49754c7ea5c84330c71e6..3764a6a996fd64448d99446d38b472cf3084f0d7 100644 (file)
@@ -532,11 +532,13 @@ _notmuch_message_id_parse (void *ctx, const char *message_id, const char **next)
 void
 _notmuch_message_add_reply (notmuch_message_t *message,
                            notmuch_message_t *reply);
-notmuch_database_t *
-_notmuch_message_database (notmuch_message_t *message);
 
 void
 _notmuch_message_remove_unprefixed_terms (notmuch_message_t *message);
+
+const char *
+_notmuch_message_get_thread_id_only(notmuch_message_t *message);
+
 /* sha1.c */
 
 char *
index 39759b7ac6d5ba73fe9d3c3636f9dd6ff41e79bc..247f6ad71ebf1223b32f1c2b5e226261a309ffc1 100644 (file)
@@ -58,7 +58,7 @@ NOTMUCH_BEGIN_DECLS
  * version in Makefile.local.
  */
 #define LIBNOTMUCH_MAJOR_VERSION       5
-#define LIBNOTMUCH_MINOR_VERSION       0
+#define LIBNOTMUCH_MINOR_VERSION       2
 #define LIBNOTMUCH_MICRO_VERSION       0
 
 
@@ -869,7 +869,7 @@ notmuch_query_get_sort (const notmuch_query_t *query);
  *
  * NOTMUCH_STATUS_SUCCESS: excluded was added successfully.
  *
- * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured.
+ * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occurred.
  *      Most likely a problem lazily parsing the query string.
  *
  * NOTMUCH_STATUS_IGNORED: tag is explicitly present in the query, so
@@ -1065,7 +1065,7 @@ notmuch_threads_destroy (notmuch_threads_t *threads);
  *
  * NOTMUCH_STATUS_SUCCESS: query completed successfully.
  *
- * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured. The
+ * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occurred. The
  *      value of *count is not defined.
  *
  * @since libnotmuch 5 (notmuch 0.25)
@@ -1101,7 +1101,7 @@ notmuch_query_count_messages_st (notmuch_query_t *query, unsigned int *count);
 
  * NOTMUCH_STATUS_SUCCESS: query completed successfully.
  *
- * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured. The
+ * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occurred. The
  *      value of *count is not defined.
  *
  * @since libnotmuch 5 (notmuch 0.25)
@@ -1345,6 +1345,14 @@ notmuch_messages_destroy (notmuch_messages_t *messages);
 notmuch_tags_t *
 notmuch_messages_collect_tags (notmuch_messages_t *messages);
 
+/**
+ * Get the database associated with this message.
+ *
+ * @since libnotmuch 5.2 (notmuch 0.27)
+ */
+notmuch_database_t *
+notmuch_message_get_database (const notmuch_message_t *message);
+
 /**
  * Get the message ID of 'message'.
  *
@@ -1778,7 +1786,7 @@ notmuch_message_destroy (notmuch_message_t *message);
  *
  * @returns
  * - NOTMUCH_STATUS_NULL_POINTER: *value* may not be NULL.
- * - NOTMUCH_STATUS_SUCCESS: No error occured.
+ * - NOTMUCH_STATUS_SUCCESS: No error occurred.
  * @since libnotmuch 4.4 (notmuch 0.23)
  */
 notmuch_status_t
@@ -1790,7 +1798,7 @@ notmuch_message_get_property (notmuch_message_t *message, const char *key, const
  * @returns
  * - NOTMUCH_STATUS_ILLEGAL_ARGUMENT: *key* may not contain an '=' character.
  * - NOTMUCH_STATUS_NULL_POINTER: Neither *key* nor *value* may be NULL.
- * - NOTMUCH_STATUS_SUCCESS: No error occured.
+ * - NOTMUCH_STATUS_SUCCESS: No error occurred.
  * @since libnotmuch 4.4 (notmuch 0.23)
  */
 notmuch_status_t
@@ -1804,7 +1812,7 @@ notmuch_message_add_property (notmuch_message_t *message, const char *key, const
  * @returns
  * - NOTMUCH_STATUS_ILLEGAL_ARGUMENT: *key* may not contain an '=' character.
  * - NOTMUCH_STATUS_NULL_POINTER: Neither *key* nor *value* may be NULL.
- * - NOTMUCH_STATUS_SUCCESS: No error occured.
+ * - NOTMUCH_STATUS_SUCCESS: No error occurred.
  * @since libnotmuch 4.4 (notmuch 0.23)
  */
 notmuch_status_t
@@ -1819,7 +1827,7 @@ notmuch_message_remove_property (notmuch_message_t *message, const char *key, co
  * @returns
  * - NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in
  *   read-only mode so message cannot be modified.
- * - NOTMUCH_STATUS_SUCCESS: No error occured.
+ * - NOTMUCH_STATUS_SUCCESS: No error occurred.
  *
  * @since libnotmuch 4.4 (notmuch 0.23)
  */
@@ -1835,7 +1843,7 @@ notmuch_message_remove_all_properties (notmuch_message_t *message, const char *k
  * @returns
  * - NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in
  *   read-only mode so message cannot be modified.
- * - NOTMUCH_STATUS_SUCCESS: No error occured.
+ * - NOTMUCH_STATUS_SUCCESS: No error occurred.
  *
  * @since libnotmuch 5.1 (notmuch 0.26)
  */
@@ -1882,6 +1890,22 @@ typedef struct _notmuch_string_map_iterator notmuch_message_properties_t;
 notmuch_message_properties_t *
 notmuch_message_get_properties (notmuch_message_t *message, const char *key, notmuch_bool_t exact);
 
+/**
+ * Return the number of properties named "key" belonging to the specific message.
+ *
+ * @param[in] message  The message to examine
+ * @param[in] key      key to count
+ * @param[out] count   The number of matching properties associated with this message.
+ *
+ * @returns
+ *
+ * NOTMUCH_STATUS_SUCCESS: successful count, possibly some other error.
+ *
+ * @since libnotmuch 5.2 (notmuch 0.27)
+ */
+notmuch_status_t
+notmuch_message_count_properties (notmuch_message_t *message, const char *key, unsigned int *count);
+
 /**
  * Is the given *properties* iterator pointing at a valid (key,value)
  * pair.
index d633fa3d908ae08c1e1493b6caa29b8d3570c409..7fdf992de7162a758d6ea869515ad07e15aaa4a6 100644 (file)
@@ -652,9 +652,9 @@ _notmuch_query_count_documents (notmuch_query_t *query, const char *type, unsign
        /*
         * Set the checkatleast parameter to the number of documents
         * in the database to make get_matches_estimated() exact.
-        * Set the max parameter to 0 to avoid fetching documents we will discard.
+        * Set the max parameter to 1 to avoid fetching documents we will discard.
         */
-       mset = enquire.get_mset (0, 0,
+       mset = enquire.get_mset (0, 1,
                                 notmuch->xapian_db->get_doccount ());
 
        count = mset.get_matches_estimated();
index 5aac8bcc8a8996b36050287183ca3e0893fe922e..ad818207f5d4a91450336a99af2518ffcd2b8bc3 100644 (file)
@@ -14,7 +14,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see http://www.gnu.org/licenses/ .
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
  *
  * Author: David Bremner <david@tethera.net>
  */
diff --git a/lib/thread-fp.cc b/lib/thread-fp.cc
new file mode 100644 (file)
index 0000000..7327700
--- /dev/null
@@ -0,0 +1,67 @@
+/* thread-fp.cc - "thread:" field processor glue
+ *
+ * This file is part of notmuch.
+ *
+ * Copyright © 2018 David Bremner
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
+ *
+ * Author: David Bremner <david@tethera.net>
+ */
+
+#include "database-private.h"
+#include "thread-fp.h"
+#include <iostream>
+
+#if HAVE_XAPIAN_FIELD_PROCESSOR
+
+Xapian::Query
+ThreadFieldProcessor::operator() (const std::string & str)
+{
+    notmuch_status_t status;
+    const char *thread_prefix = _find_prefix ("thread");
+
+    if (str.at (0) == '{') {
+       if (str.size () <= 1 || str.at (str.size () - 1) != '}') {
+           throw Xapian::QueryParserError ("missing } in '" + str + "'");
+       } else {
+           std::string subquery_str = str.substr (1, str.size () - 2);
+           notmuch_query_t *subquery = notmuch_query_create (notmuch, subquery_str.c_str ());
+           notmuch_messages_t *messages;
+           std::set<std::string> terms;
+
+           if (! subquery)
+               throw Xapian::QueryParserError ("failed to create subquery for '" + subquery_str + "'");
+
+           status = notmuch_query_search_messages (subquery, &messages);
+           if (status)
+               throw Xapian::QueryParserError ("failed to search messages for '" + subquery_str + "'");
+
+           for (; notmuch_messages_valid (messages); notmuch_messages_move_to_next (messages)) {
+               std::string term = thread_prefix;
+               notmuch_message_t *message;
+               message = notmuch_messages_get (messages);
+               term += _notmuch_message_get_thread_id_only (message);
+               terms.insert (term);
+           }
+           return Xapian::Query (Xapian::Query::OP_OR, terms.begin (), terms.end ());
+       }
+    } else {
+       /* literal thread id */
+       std::string term = thread_prefix + str;
+       return Xapian::Query (term);
+    }
+
+}
+#endif
diff --git a/lib/thread-fp.h b/lib/thread-fp.h
new file mode 100644 (file)
index 0000000..47c066c
--- /dev/null
@@ -0,0 +1,42 @@
+/* thread-fp.h - thread field processor glue
+ *
+ * This file is part of notmuch.
+ *
+ * Copyright © 2018 David Bremner
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
+ *
+ * Author: David Bremner <david@tethera.net>
+ */
+
+#ifndef NOTMUCH_THREAD_FP_H
+#define NOTMUCH_THREAD_FP_H
+
+#include <xapian.h>
+#include "notmuch.h"
+
+#if HAVE_XAPIAN_FIELD_PROCESSOR
+class ThreadFieldProcessor : public Xapian::FieldProcessor {
+ protected:
+    Xapian::QueryParser &parser;
+    notmuch_database_t *notmuch;
+
+ public:
+    ThreadFieldProcessor (Xapian::QueryParser &parser_, notmuch_database_t *notmuch_)
+       : parser(parser_), notmuch(notmuch_) { };
+
+    Xapian::Query operator()(const std::string & str);
+};
+#endif
+#endif /* NOTMUCH_THREAD_FP_H */
index 3561b27f743976d2c2d1918d33fc2a8d33469c74..e961c76bf37a8d3cbee2a4041da48ef92340b03a 100644 (file)
@@ -390,11 +390,15 @@ _thread_add_matched_message (notmuch_thread_t *thread,
 static void
 _resolve_thread_relationships (notmuch_thread_t *thread)
 {
-    notmuch_message_node_t *node;
+    notmuch_message_node_t *node, *first_node;
     notmuch_message_t *message, *parent;
     const char *in_reply_to;
 
-    for (node = thread->message_list->head; node; node = node->next) {
+    first_node = thread->message_list->head;
+    if (! first_node)
+       return;
+
+    for (node = first_node->next; node; node = node->next) {
        message = node->message;
        in_reply_to = _notmuch_message_get_in_reply_to (message);
        if (in_reply_to && strlen (in_reply_to) &&
@@ -406,6 +410,25 @@ _resolve_thread_relationships (notmuch_thread_t *thread)
            _notmuch_message_list_add_message (thread->toplevel_list, message);
     }
 
+    /*
+     * if we reach the end of the list without finding a top-level
+     * message, that means the thread is a cycle (or set of cycles)
+     * and any message can be considered top-level.  Choose the oldest
+     * message, which happens to be first in our list.
+     */
+    if (first_node) {
+       message = first_node->message;
+       in_reply_to = _notmuch_message_get_in_reply_to (message);
+       if (thread->toplevel_list->head &&
+           in_reply_to && strlen (in_reply_to) &&
+           g_hash_table_lookup_extended (thread->message_hash,
+                                         in_reply_to, NULL,
+                                         (void **) &parent))
+           _notmuch_message_add_reply (parent, message);
+       else
+           _notmuch_message_list_add_message (thread->toplevel_list, message);
+    }
+
     /* XXX: After scanning through the entire list looking for parents
      * via "In-Reply-To", we should do a second pass that looks at the
      * list of messages IDs in the "References" header instead. (And
index 11df082b86cd03520d17fbf5ff9ae5e547878af5..2a24e537c6a25fa4b79785f33062826666b63b88 100644 (file)
@@ -197,16 +197,18 @@ node_decrypt_and_verify (mime_node_t *node, GMimeObject *part,
     GError *err = NULL;
     GMimeDecryptResult *decrypt_result = NULL;
     GMimeMultipartEncrypted *encrypteddata = GMIME_MULTIPART_ENCRYPTED (part);
+    notmuch_message_t *message = NULL;
 
     if (! node->decrypted_child) {
-       mime_node_t *parent;
-       for (parent = node; parent; parent = parent->parent)
-           if (parent->envelope_file)
+       for (mime_node_t *parent = node; parent; parent = parent->parent)
+           if (parent->envelope_file) {
+               message = parent->envelope_file;
                break;
+           }
 
        node->decrypted_child = _notmuch_crypto_decrypt (&node->decrypt_attempted,
                                                         node->ctx->crypto->decrypt,
-                                                        parent ? parent->envelope_file : NULL,
+                                                        message,
                                                         cryptoctx, encrypteddata, &decrypt_result, &err);
     }
     if (! node->decrypted_child) {
@@ -225,6 +227,18 @@ node_decrypt_and_verify (mime_node_t *node, GMimeObject *part,
            g_object_ref (node->sig_list);
            set_signature_list_destructor (node);
        }
+
+#if HAVE_GMIME_SESSION_KEYS
+       if (node->ctx->crypto->decrypt == NOTMUCH_DECRYPT_TRUE && message) {
+           notmuch_database_t *db = notmuch_message_get_database (message);
+           const char *session_key = g_mime_decrypt_result_get_session_key (decrypt_result);
+           if (db && session_key)
+               print_status_message ("Failed to stash session key in the database",
+                                     message,
+                                     notmuch_message_add_property (message, "session-key",
+                                                                   session_key));
+       }
+#endif
        g_object_unref (decrypt_result);
     }
 
index 0985a7b0a334006904814cfe2e5b2d4127976ec2..6c84ecc01af6cebb5f9df2325c024933e0c36cba 100644 (file)
@@ -481,6 +481,11 @@ print_status_query (const char *loc,
                    const notmuch_query_t *query,
                    notmuch_status_t status);
 
+notmuch_status_t
+print_status_message (const char *loc,
+                     const notmuch_message_t *message,
+                     notmuch_status_t status);
+
 notmuch_status_t
 print_status_database (const char *loc,
                       const notmuch_database_t *database,
index 48490b51deb26c315bae42b9a7591c828d7c45a7..d229c9dc7ac9fa28468436d6146ed3770cdb80cc 100644 (file)
@@ -159,10 +159,10 @@ mkdir_recursive (const void *ctx, const char *path, int mode)
  * otherwise. Partial results are not cleaned up on errors.
  */
 static bool
-maildir_create_folder (const void *ctx, const char *maildir)
+maildir_create_folder (const void *ctx, const char *maildir, bool world_readable)
 {
     const char *subdirs[] = { "cur", "new", "tmp" };
-    const int mode = 0700;
+    const int mode = (world_readable ? 0755 : 0700);
     char *subdir;
     unsigned int i;
 
@@ -211,10 +211,11 @@ tempfilename (const void *ctx)
  * is not touched).
  */
 static int
-maildir_mktemp (const void *ctx, const char *maildir, char **path_out)
+maildir_mktemp (const void *ctx, const char *maildir, bool world_readable, char **path_out)
 {
     char *filename, *path;
     int fd;
+    const int mode = (world_readable ? 0644 : 0600);
 
     do {
        filename = tempfilename (ctx);
@@ -227,7 +228,7 @@ maildir_mktemp (const void *ctx, const char *maildir, char **path_out)
            return -1;
        }
 
-       fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0600);
+       fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, mode);
     } while (fd == -1 && errno == EEXIST);
 
     if (fd == -1) {
@@ -289,12 +290,12 @@ copy_fd (int fdout, int fdin)
  * the file, or NULL on errors.
  */
 static char *
-maildir_write_tmp (const void *ctx, int fdin, const char *maildir)
+maildir_write_tmp (const void *ctx, int fdin, const char *maildir, bool world_readable)
 {
     char *path;
     int fdout;
 
-    fdout = maildir_mktemp (ctx, maildir, &path);
+    fdout = maildir_mktemp (ctx, maildir, world_readable, &path);
     if (fdout < 0)
        return NULL;
 
@@ -323,11 +324,11 @@ FAIL:
  * errors.
  */
 static char *
-maildir_write_new (const void *ctx, int fdin, const char *maildir)
+maildir_write_new (const void *ctx, int fdin, const char *maildir, bool world_readable)
 {
     char *cleanpath, *tmppath, *newpath, *newdir;
 
-    tmppath = maildir_write_tmp (ctx, fdin, maildir);
+    tmppath = maildir_write_tmp (ctx, fdin, maildir, world_readable);
     if (! tmppath)
        return NULL;
     cleanpath = tmppath;
@@ -457,6 +458,7 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[])
     bool create_folder = false;
     bool keep = false;
     bool hooks = true;
+    bool world_readable = false;
     bool synchronize_flags;
     char *maildir;
     char *newpath;
@@ -467,7 +469,8 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[])
        { .opt_string = &folder, .name = "folder", .allow_empty = true },
        { .opt_bool = &create_folder, .name = "create-folder" },
        { .opt_bool = &keep, .name = "keep" },
-       { .opt_bool =  &hooks, .name = "hooks" },
+       { .opt_bool = &hooks, .name = "hooks" },
+       { .opt_bool = &world_readable, .name = "world-readable" },
        { .opt_inherit = notmuch_shared_indexing_options },
        { .opt_inherit = notmuch_shared_options },
        { }
@@ -523,7 +526,7 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[])
     }
 
     strip_trailing (maildir, '/');
-    if (create_folder && ! maildir_create_folder (config, maildir))
+    if (create_folder && ! maildir_create_folder (config, maildir, world_readable))
        return EXIT_FAILURE;
 
     /* Set up our handler for SIGINT. We do not set SA_RESTART so that copying
@@ -535,7 +538,7 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[])
     sigaction (SIGINT, &action, NULL);
 
     /* Write the message to the Maildir new directory. */
-    newpath = maildir_write_new (config, STDIN_FILENO, maildir);
+    newpath = maildir_write_new (config, STDIN_FILENO, maildir, world_readable);
     if (! newpath) {
        return EXIT_FAILURE;
     }
index c43457053dd1f36f9aea5109904b6a2ed9a2c8af..6a54a1a169feb23aa0d860f66548e69d60e24dc0 100644 (file)
@@ -47,6 +47,7 @@ typedef struct {
     int output_is_a_tty;
     enum verbosity verbosity;
     bool debug;
+    bool full_scan;
     const char **new_tags;
     size_t new_tags_length;
     const char **ignore_verbatim;
@@ -527,7 +528,7 @@ add_files (notmuch_database_t *notmuch,
      * mistakenly return the total number of directory entries, since
      * that only inflates the count beyond 2.
      */
-    if (directory && fs_mtime == db_mtime && st.st_nlink == 2) {
+    if (directory && (! state->full_scan) && fs_mtime == db_mtime && st.st_nlink == 2) {
        /* There's one catch: pass 1 below considers symlinks to
         * directories to be directories, but these don't increase the
         * file system link count.  So, only bail early if the
@@ -618,7 +619,7 @@ add_files (notmuch_database_t *notmuch,
      * being discovered until the clock catches up and the directory
      * is modified again).
      */
-    if (directory && fs_mtime == db_mtime)
+    if (directory && (! state->full_scan) && fs_mtime == db_mtime)
        goto DONE;
 
     /* If the database has never seen this directory before, we can
@@ -1053,6 +1054,7 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])
     add_files_state_t add_files_state = {
        .verbosity = VERBOSITY_NORMAL,
        .debug = false,
+       .full_scan = false,
        .output_is_a_tty = isatty (fileno (stdout)),
     };
     struct timeval tv_start;
@@ -1073,6 +1075,7 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])
        { .opt_bool = &quiet, .name = "quiet" },
        { .opt_bool = &verbose, .name = "verbose" },
        { .opt_bool = &add_files_state.debug, .name = "debug" },
+       { .opt_bool = &add_files_state.full_scan, .name = "full-scan" },
        { .opt_bool = &hooks, .name = "hooks" },
        { .opt_inherit = notmuch_shared_indexing_options },
        { .opt_inherit = notmuch_shared_options },
index 5d702510ae2965d36325222274c46aae6ba3aa67..d8589120cae94ed4fa4efa1c3cfdda9520d5697d 100644 (file)
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see http://www.gnu.org/licenses/ .
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
  *
  * Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  */
index 9871159ded91ea66bed6cd45d6192e25b099b6cd..1072ea558dfbcc04b91b4aa9041c3f7dd8692adf 100644 (file)
@@ -873,6 +873,11 @@ show_message (void *ctx,
     void *local = talloc_new (ctx);
     mime_node_t *root, *part;
     notmuch_status_t status;
+    unsigned int session_keys = 0;
+    notmuch_status_t session_key_count_error = NOTMUCH_STATUS_SUCCESS;
+
+    if (params->crypto.decrypt == NOTMUCH_DECRYPT_TRUE)
+       session_key_count_error = notmuch_message_count_properties (message, "session-key", &session_keys);
 
     status = mime_node_open (local, message, &(params->crypto), &root);
     if (status)
@@ -880,6 +885,21 @@ show_message (void *ctx,
     part = mime_node_seek_dfs (root, (params->part < 0 ? 0 : params->part));
     if (part)
        status = format->part (local, sp, part, indent, params);
+#if HAVE_GMIME_SESSION_KEYS
+    if (params->crypto.decrypt == NOTMUCH_DECRYPT_TRUE && session_key_count_error == NOTMUCH_STATUS_SUCCESS) {
+       unsigned int new_session_keys = 0;
+       if (notmuch_message_count_properties (message, "session-key", &new_session_keys) == NOTMUCH_STATUS_SUCCESS &&
+           new_session_keys > session_keys) {
+           /* try a quiet re-indexing */
+           notmuch_indexopts_t *indexopts = notmuch_database_get_default_indexopts (notmuch_message_get_database (message));
+           if (indexopts) {
+               notmuch_indexopts_set_decrypt_policy (indexopts, NOTMUCH_DECRYPT_AUTO);
+               print_status_message ("Error re-indexing message with --decrypt=stash",
+                                     message, notmuch_message_reindex (message, indexopts));
+           }
+       }
+    }
+#endif
   DONE:
     talloc_free (local);
     return status;
@@ -1104,6 +1124,7 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
          (notmuch_keyword_t []){ { "false", NOTMUCH_DECRYPT_FALSE },
                                  { "auto", NOTMUCH_DECRYPT_AUTO },
                                  { "true", NOTMUCH_DECRYPT_NOSTASH },
+                                 { "stash", NOTMUCH_DECRYPT_TRUE },
                                  { 0, 0 } } },
        { .opt_bool = &params.crypto.verify, .name = "verify" },
        { .opt_bool = &params.output_body, .name = "body" },
@@ -1119,7 +1140,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
     notmuch_process_shared_options (argv[0]);
 
     /* explicit decryption implies verification */
-    if (params.crypto.decrypt == NOTMUCH_DECRYPT_NOSTASH)
+    if (params.crypto.decrypt == NOTMUCH_DECRYPT_NOSTASH ||
+       params.crypto.decrypt == NOTMUCH_DECRYPT_TRUE)
        params.crypto.verify = true;
 
     /* specifying a part implies single message display */
@@ -1182,8 +1204,11 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])
     params.crypto.gpgpath = notmuch_config_get_crypto_gpg_path (config);
 #endif
 
+    notmuch_database_mode_t mode = NOTMUCH_DATABASE_MODE_READ_ONLY;
+    if (params.crypto.decrypt == NOTMUCH_DECRYPT_TRUE)
+       mode = NOTMUCH_DATABASE_MODE_READ_WRITE;
     if (notmuch_database_open (notmuch_config_get_database_path (config),
-                              NOTMUCH_DATABASE_MODE_READ_ONLY, &notmuch))
+                              mode, &notmuch))
        return EXIT_FAILURE;
 
     notmuch_exit_if_unmatched_db_uuid (notmuch);
index 2d193aa8814aa0cb4aca79977dff2da8dbc59acd..7810b68569f5eb47be8d54bca78aa5206e6cd741 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -26,7 +26,7 @@
  * Notmuch subcommand hook.
  *
  * The return value will be used as notmuch exit status code,
- * preferrably EXIT_SUCCESS or EXIT_FAILURE.
+ * preferably EXIT_SUCCESS or EXIT_FAILURE.
  */
 typedef int (*command_function_t) (notmuch_config_t *config, int argc, char *argv[]);
 
index 2063bcadb3faf8d21cd49787b44ccbec1af88e4c..c394ecde1f5bc22538dd8bc8e9c2ae7d91e878ed 100644 (file)
@@ -90,7 +90,7 @@ enum {
  *   seconds. This is useful for callers that require a value for
  *   inclusive comparison of the result.
  *
- * Return 0 (PARSE_TIME_OK) for succesfully parsed date/time, or one
+ * Return 0 (PARSE_TIME_OK) for successfully parsed date/time, or one
  * of PARSE_TIME_ERR_* on error. 't' is not modified on error.
  */
 int parse_time_string (const char *s, time_t *t, const time_t *ref, int round);
diff --git a/performance-test/T04-thread-subquery.sh b/performance-test/T04-thread-subquery.sh
new file mode 100755 (executable)
index 0000000..665d5a6
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+test_description='thread subqueries'
+
+. $(dirname "$0")/perf-test-lib.sh || exit 1
+
+time_start
+
+time_run "search thread:{} ..." "notmuch search thread:{date:2010} and thread:{from:linus}"
+time_run "search thread:{} ..." "notmuch search thread:{date:2010} and thread:{from:linus}"
+time_run "search thread:{} ..." "notmuch search thread:{date:2010} and thread:{from:linus}"
+
+time_done
index 8bc2fe4b47ecba8af5246f8389f9e62f2e33f88c..01fd8c99b8069030ffde0c026a095cbd701cbdfb 100644 (file)
--- a/status.c
+++ b/status.c
@@ -20,6 +20,26 @@ print_status_query (const char *loc,
     return status;
 }
 
+notmuch_status_t
+print_status_message (const char *loc,
+                     const notmuch_message_t *message,
+                     notmuch_status_t status)
+{
+    if (status) {
+       const char *msg;
+       notmuch_database_t *notmuch;
+
+       fprintf (stderr, "%s: %s\n", loc,
+                notmuch_status_to_string (status));
+
+       notmuch = notmuch_message_get_database (message);
+       msg = notmuch_database_status_string (notmuch);
+       if (msg)
+           fputs (msg, stderr);
+    }
+    return status;
+}
+
 notmuch_status_t
 print_status_database (const char *loc,
                    const notmuch_database_t *notmuch,
index a2f0ddfaa280b5d3e743efba6976581ac793c1a9..ba0d98c858d52ffd9583a8af0c290bc7dc6e0daa 100644 (file)
@@ -36,7 +36,7 @@ typedef enum {
 typedef enum {
     TAG_PARSE_OUT_OF_MEMORY = -1,
 
-    /* Line parsed successfuly. */
+    /* Line parsed successfully. */
     TAG_PARSE_SUCCESS = 0,
 
     /* Line has a syntax error */
index cd5223643725efa2170880c50e7e8fd1d6465c6e..dfc8508f83e20ea93d370ec6a059d12df52e93db 100755 (executable)
@@ -12,6 +12,10 @@ generate_message
 output=$(NOTMUCH_NEW --debug)
 test_expect_equal "$output" "Added 1 new message to the database."
 
+test_begin_subtest "Single message (full-scan)"
+generate_message
+output=$(NOTMUCH_NEW --debug --full-scan 2>&1)
+test_expect_equal "$output" "Added 1 new message to the database."
 
 test_begin_subtest "Multiple new messages"
 generate_message
@@ -19,11 +23,19 @@ generate_message
 output=$(NOTMUCH_NEW --debug)
 test_expect_equal "$output" "Added 2 new messages to the database."
 
+test_begin_subtest "Multiple new messages (full-scan)"
+generate_message
+generate_message
+output=$(NOTMUCH_NEW --debug --full-scan 2>&1)
+test_expect_equal "$output" "Added 2 new messages to the database."
 
 test_begin_subtest "No new messages (non-empty DB)"
 output=$(NOTMUCH_NEW --debug)
 test_expect_equal "$output" "No new mail."
 
+test_begin_subtest "No new messages (full-scan)"
+output=$(NOTMUCH_NEW --debug --full-scan 2>&1)
+test_expect_equal "$output" "No new mail."
 
 test_begin_subtest "New directories"
 rm -rf "${MAIL_DIR}"/* "${MAIL_DIR}"/.notmuch
@@ -87,7 +99,7 @@ notmuch new > /dev/null
 
 mv "${MAIL_DIR}"/dir "${MAIL_DIR}"/dir-renamed
 
-output=$(NOTMUCH_NEW --debug)
+output=$(NOTMUCH_NEW --debug --full-scan)
 test_expect_equal "$output" "(D) add_files, pass 2: queuing passed directory ${MAIL_DIR}/dir for deletion from database
 No new mail. Detected 3 file renames."
 
@@ -95,7 +107,7 @@ No new mail. Detected 3 file renames."
 test_begin_subtest "Deleted directory"
 rm -rf "${MAIL_DIR}"/dir-renamed
 
-output=$(NOTMUCH_NEW --debug)
+output=$(NOTMUCH_NEW --debug --full-scan)
 test_expect_equal "$output" "(D) add_files, pass 2: queuing passed directory ${MAIL_DIR}/dir-renamed for deletion from database
 No new mail. Removed 3 messages."
 
@@ -114,7 +126,7 @@ test_begin_subtest "Deleted directory (end of list)"
 
 rm -rf "${MAIL_DIR}"/zzz
 
-output=$(NOTMUCH_NEW --debug)
+output=$(NOTMUCH_NEW --debug --full-scan)
 test_expect_equal "$output" "(D) add_files, pass 3: queuing leftover directory ${MAIL_DIR}/zzz for deletion from database
 No new mail. Removed 3 messages."
 
@@ -165,7 +177,7 @@ test_begin_subtest "Deleted two-level directory"
 
 rm -rf "${MAIL_DIR}"/two
 
-output=$(NOTMUCH_NEW --debug)
+output=$(NOTMUCH_NEW --debug --full-scan)
 test_expect_equal "$output" "(D) add_files, pass 3: queuing leftover directory ${MAIL_DIR}/two for deletion from database
 No new mail. Removed 3 messages."
 
@@ -211,7 +223,7 @@ Subject: Test mbox message 2
 
 Body 2.
 EOF
-output=$(NOTMUCH_NEW --debug 2>&1)
+output=$(NOTMUCH_NEW --debug --full-scan 2>&1)
 test_expect_equal "$output" \
 "Note: Ignoring non-mail file: ${MAIL_DIR}/.git/config
 Note: Ignoring non-mail file: ${MAIL_DIR}/.ignored_hidden_file
@@ -224,17 +236,31 @@ test_begin_subtest "Ignore files and directories specified in new.ignore"
 generate_message
 notmuch config set new.ignore .git ignored_file .ignored_hidden_file
 touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan.
-output=$(NOTMUCH_NEW 2>&1)
-test_expect_equal "$output" "Added 1 new message to the database."
+NOTMUCH_NEW --debug 2>&1 | sort > OUTPUT
+cat <<EOF > EXPECTED
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.git
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/ignored_file
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/.git
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/ignored_file
+Added 1 new message to the database.
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "Ignore files and directories specified in new.ignore (full-scan)"
+generate_message
+notmuch config set new.ignore .git ignored_file .ignored_hidden_file
+NOTMUCH_NEW --debug --full-scan 2>&1 | sort > OUTPUT
+# reuse EXPECTED from previous test
+test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Ignore files and directories specified in new.ignore (multiple occurrences)"
 notmuch config set new.ignore .git ignored_file .ignored_hidden_file
 notmuch new > /dev/null # ensure that files/folders will be printed in ASCII order.
-touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan.
-touch "${MAIL_DIR}"      # likewise for MAIL_DIR
 mkdir -p "${MAIL_DIR}"/one/two/three/.git
 touch "${MAIL_DIR}"/{one,one/two,one/two/three}/ignored_file
-output=$(NOTMUCH_NEW --debug 2>&1 | sort)
+output=$(NOTMUCH_NEW --debug --full-scan 2>&1 | sort)
 test_expect_equal "$output" \
 "(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.git
 (D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file
@@ -261,7 +287,7 @@ test_expect_equal "$output" "No new mail."
 
 test_begin_subtest "Ignore files and directories specified in new.ignore (regexp)"
 notmuch config set new.ignore ".git" "/^bro.*ink\$/" "/ignored.*file/"
-output=$(NOTMUCH_NEW --debug 2>&1 | sort)
+output=$(NOTMUCH_NEW --debug --full-scan 2>&1 | sort)
 test_expect_equal "$output" \
 "(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.git
 (D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file
@@ -354,4 +380,17 @@ exit status: 75
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+add_email_corpus broken
+test_begin_subtest "reference loop does not crash"
+test_expect_code 0 "notmuch show --format=json id:mid-loop-12@example.org id:mid-loop-21@example.org > OUTPUT"
+
+test_begin_subtest "reference loop ordered by date"
+threadid=$(notmuch search --output=threads  id:mid-loop-12@example.org)
+notmuch show --format=mbox $threadid | grep '^Date'  > OUTPUT
+cat <<EOF > EXPECTED
+Date: Thu, 16 Jun 2016 22:14:41 -0400
+Date: Fri, 17 Jun 2016 22:14:41 -0400
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_done
index 40519bb2f2176c04d4ecf2ccde1dfe1be5b18c4e..05be473ab17ea629457733163f0fe1c693fc0b2e 100755 (executable)
@@ -4,6 +4,10 @@ test_description='"notmuch insert"'
 
 test_require_external_prereq gdb
 
+# subtests about file permissions assume that we're working with umask
+# 022 by default.
+umask 022
+
 # Create directories and database before inserting.
 mkdir -p "$MAIL_DIR"/{cur,new,tmp}
 mkdir -p "$MAIL_DIR"/Drafts/{cur,new,tmp}
@@ -37,6 +41,9 @@ notmuch insert < "$gen_msg_filename"
 cur_msg_filename=$(notmuch search --output=files "subject:insert-subject")
 test_expect_equal_file "$cur_msg_filename" "$gen_msg_filename"
 
+test_begin_subtest "Permissions on inserted message should be 0600"
+test_expect_equal "600" "$(stat -c %a "$cur_msg_filename")"
+
 test_begin_subtest "Insert message adds default tags"
 output=$(notmuch show --format=json "subject:insert-subject")
 expected='[[[{
@@ -73,6 +80,27 @@ notmuch insert +custom < "$gen_msg_filename"
 output=$(notmuch search --output=messages tag:custom)
 test_expect_equal "$output" "id:$gen_msg_id"
 
+test_begin_subtest "Insert tagged world-readable message"
+gen_insert_msg
+notmuch insert --world-readable +world-readable-test < "$gen_msg_filename"
+cur_msg_filename=$(notmuch search --output=files "tag:world-readable-test")
+test_expect_equal_file "$cur_msg_filename" "$gen_msg_filename"
+
+test_begin_subtest "Permissions on inserted world-readable message should be 0644"
+test_expect_equal "644" "$(stat -c %a "$cur_msg_filename")"
+
+test_begin_subtest "Insert tagged world-readable message with group-only umask"
+oldumask=$(umask)
+umask 027
+gen_insert_msg
+notmuch insert --world-readable +world-readable-umask-test < "$gen_msg_filename"
+cur_msg_filename=$(notmuch search --output=files "tag:world-readable-umask-test")
+umask "$oldumask"
+test_expect_equal_file "$cur_msg_filename" "$gen_msg_filename"
+
+test_begin_subtest "Permissions on inserted world-readable message with funny umask should be 0640"
+test_expect_equal "640" "$(stat -c %a "$cur_msg_filename")"
+
 test_begin_subtest "Insert message, add/remove tags"
 gen_insert_msg
 notmuch insert +custom -unread < "$gen_msg_filename"
@@ -170,6 +198,23 @@ output=$(notmuch search --output=files path:F/G/H/I/J/new tag:folder)
 basename=$(basename "$output")
 test_expect_equal_file "$gen_msg_filename" "${MAIL_DIR}/F/G/H/I/J/new/${basename}"
 
+test_begin_subtest "Created subfolder should have permissions 0700"
+test_expect_equal "700" "$(stat -c %a "${MAIL_DIR}/F/G/H/I/J")"
+test_begin_subtest "Created subfolder new/ should also have permissions 0700"
+test_expect_equal "700" "$(stat -c %a "${MAIL_DIR}/F/G/H/I/J/new")"
+
+test_begin_subtest "Insert message, create world-readable subfolder"
+gen_insert_msg
+notmuch insert --folder=F/G/H/I/J/K --create-folder --world-readable +folder-world-readable < "$gen_msg_filename"
+output=$(notmuch search --output=files path:F/G/H/I/J/K/new tag:folder-world-readable)
+basename=$(basename "$output")
+test_expect_equal_file "$gen_msg_filename" "${MAIL_DIR}/F/G/H/I/J/K/new/${basename}"
+
+test_begin_subtest "Created world-readable subfolder should have permissions 0755"
+test_expect_equal "755" "$(stat -c %a "${MAIL_DIR}/F/G/H/I/J/K")"
+test_begin_subtest "Created world-readable subfolder new/ should also have permissions 0755"
+test_expect_equal "755" "$(stat -c %a "${MAIL_DIR}/F/G/H/I/J/K/new")"
+
 test_begin_subtest "Insert message, create existing subfolder"
 gen_insert_msg
 notmuch insert --folder=F/G/H/I/J --create-folder +folder < "$gen_msg_filename"
index 70f2854973a9ca29e1cf0c9d483cf1b00564e7f4..a3f0dead1420239fd654c89ea04531d1ee141729 100755 (executable)
@@ -85,11 +85,11 @@ add_message '[subject]="search by to (name)"' '[date]="Sat, 01 Jan 2000 12:00:00
 output=$(notmuch search 'to:"Search By To Name"' | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"
 
-test_begin_subtest "Search by to: (name and adress)"
+test_begin_subtest "Search by to: (name and address)"
 output=$(notmuch search 'to:"Search By To Name <test@example.com>"' | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"
 
-test_begin_subtest "Search by to: without prefix (name and adress)"
+test_begin_subtest "Search by to: without prefix (name and address)"
 output=$(notmuch search '"Search By To Name <test@example.com>"' | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"
 
index f73535b7bf7e7d45afa2ff28a193ac8363a8713d..3eeac1db7920fad67b1c935a13f20b376748d2ee 100755 (executable)
@@ -319,7 +319,7 @@ This is an embedded message, with a multipart/alternative part.
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
-test_begin_subtest "--format=text --part=7, inline attachement"
+test_begin_subtest "--format=text --part=7, inline attachment"
 notmuch show --format=text --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
 \fattachment{ ID: 7, Filename: attachment, Content-type: text/plain
index ba08167f33eab4c5e475828235eaca7b73df323f..9bf68b480591ece6825991a47096642cbbffbb81 100755 (executable)
@@ -866,7 +866,7 @@ id:bought
 bought
 inbox,stashtest
 ${gen_msg_filename}
-http://mid.gmane.org/bought
+https://mid.gmane.org/bought
 https://marc.info/?i=bought
 https://mid.mail-archive.com/bought
 EOF
index 2b8e05b839bcb934679c76098902fa3eb1ee75ea..c5435f4faeb70292ba824bca05a03930523fa372 100755 (executable)
@@ -50,7 +50,7 @@ test_expect_equal \
 
 test_begin_subtest "show the message body of the encrypted message"
 notmuch dump wumpus
-output=$(notmuch show wumpus | awk '/^\014part}/{ f=0 }; { if (f) { print $0 } } /^\014part{ ID: 3/{ f=1 }')
+output=$(notmuch show wumpus | notmuch_show_part 3)
 expected='This is a test encrypted message with a wumpus.'
 if [ $NOTMUCH_HAVE_GMIME_SESSION_KEYS -eq 0 ]; then
     test_subtest_known_broken
@@ -80,6 +80,24 @@ test_expect_equal \
     "$output" \
     "$expected"
 
+# show the message using stashing decryption
+test_begin_subtest "stash decryption during show"
+output=$(notmuch show --decrypt=stash tag:encrypted subject:002 | notmuch_show_part 3)
+expected='This is a test encrypted message with a wumpus.'
+test_expect_equal \
+    "$output" \
+    "$expected"
+
+test_begin_subtest "search should now find the contents"
+output=$(notmuch search wumpus)
+expected='thread:0000000000000003   2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (encrypted inbox unread)'
+if [ $NOTMUCH_HAVE_GMIME_SESSION_KEYS -eq 0 ]; then
+    test_subtest_known_broken
+fi
+test_expect_equal \
+    "$output" \
+    "$expected"
+
 # try reinserting it with decryption, should appear again, but now we
 # have two copies of the message:
 test_begin_subtest "message cleartext is present after reinserting with --decrypt=true"
@@ -198,14 +216,14 @@ test_expect_equal \
     "$expected"
 
 test_begin_subtest "show one of the messages with --decrypt=true"
-output=$(notmuch show --decrypt=true thread:0000000000000001 | awk '/^\014part}/{ f=0 }; { if (f) { print $0 } } /^\014part{ ID: 3/{ f=1 }')
+output=$(notmuch show --decrypt=true thread:0000000000000001 | notmuch_show_part 3)
 expected='This is a test encrypted message with a wumpus.'
 test_expect_equal \
     "$output" \
     "$expected"
 
 test_begin_subtest "Ensure that we cannot show the message with --decrypt=auto"
-output=$(notmuch show thread:0000000000000001 | awk '/^\014part}/{ f=0 }; { if (f) { print $0 } } /^\014part{ ID: 3/{ f=1 }')
+output=$(notmuch show thread:0000000000000001 | notmuch_show_part 3)
 expected='Non-text part: application/octet-stream'
 test_expect_equal \
     "$output" \
@@ -256,7 +274,7 @@ test_expect_equal \
     "$expected"
 
 test_begin_subtest "notmuch show should show cleartext if session key is present"
-output=$(notmuch show id:simple-encrypted@crypto.notmuchmail.org | awk '/^\014part}/{ f=0 }; { if (f) { print $0 } } /^\014part{ ID: 3/{ f=1 }')
+output=$(notmuch show id:simple-encrypted@crypto.notmuchmail.org | notmuch_show_part 3)
 expected='This is a top sekrit message.'
 if [ $NOTMUCH_HAVE_GMIME_SESSION_KEYS -eq 0 ]; then
     test_subtest_known_broken
@@ -266,7 +284,7 @@ test_expect_equal \
     "$expected"
 
 test_begin_subtest "notmuch show should show nothing if decryption is explicitly disallowed"
-output=$(notmuch show --decrypt=false id:simple-encrypted@crypto.notmuchmail.org | awk '/^\014part}/{ f=0 }; { if (f) { print $0 } } /^\014part{ ID: 3/{ f=1 }')
+output=$(notmuch show --decrypt=false id:simple-encrypted@crypto.notmuchmail.org | notmuch_show_part 3)
 expected='Non-text part: application/octet-stream'
 test_expect_equal \
     "$output" \
index a384ce8603338f28e8acaf5086abef11179e8421..b31d239a6f8330bfe8ec33018ce3d4598d83130b 100755 (executable)
@@ -73,7 +73,7 @@ positional arg 1 bananas
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
-test_begin_subtest "test keyword arguments with non-default value separted by a space"
+test_begin_subtest "test keyword arguments with non-default value separated by a space"
 $TEST_DIRECTORY/arg-test --boolkeyword false bananas > OUTPUT
 cat <<EOF > EXPECTED
 boolkeyword 0
index 0f4e4503fd6e472eff47565fe7a0a7252d2c9d27..cb2c90b80991ec4a1bf31529bc1f6e74493eefdd 100755 (executable)
@@ -3,7 +3,7 @@
 test_description="emacs tree view interface"
 . $(dirname "$0")/test-lib.sh || exit 1
 
-EXPECTED=$NOTMUCH_SRCDIR/test/tree.expected-output
+EXPECTED=$NOTMUCH_SRCDIR/test/emacs-tree.expected-output
 
 add_email_corpus
 
diff --git a/test/T585-thread-subquery.sh b/test/T585-thread-subquery.sh
new file mode 100755 (executable)
index 0000000..71ced14
--- /dev/null
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 David Bremner
+#
+
+test_description='test of searching by using thread subqueries'
+
+. $(dirname "$0")/test-lib.sh || exit 1
+
+add_email_corpus
+
+test_begin_subtest "Basic query that matches no messages"
+count=$(notmuch count from:keithp and to:keithp)
+test_expect_equal 0 "$count"
+
+test_begin_subtest "Same query against threads"
+notmuch search thread:{from:keithp} and thread:{to:keithp} | notmuch_search_sanitize > OUTPUT
+cat<<EOF > EXPECTED
+thread:XXX   2009-11-18 [7/7] Lars Kellogg-Stedman, Mikhail Gusarov, Keith Packard, Carl Worth; [notmuch] Working with Maildir storage? (inbox signed unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "Mix thread and non-threads query"
+notmuch search thread:{from:keithp} and to:keithp | notmuch_search_sanitize > OUTPUT
+cat<<EOF > EXPECTED
+thread:XXX   2009-11-18 [1/7] Lars Kellogg-Stedman| Mikhail Gusarov, Keith Packard, Carl Worth; [notmuch] Working with Maildir storage? (inbox signed unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "Compound subquery"
+notmuch search 'thread:"{from:keithp and date:2009}" and thread:{to:keithp}' | notmuch_search_sanitize > OUTPUT
+cat<<EOF > EXPECTED
+thread:XXX   2009-11-18 [7/7] Lars Kellogg-Stedman, Mikhail Gusarov, Keith Packard, Carl Worth; [notmuch] Working with Maildir storage? (inbox signed unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "Syntax/quoting error in subquery"
+notmuch search 'thread:{from:keithp and date:2009} and thread:{to:keithp}' 1>OUTPUT 2>&1
+cat<<EOF > EXPECTED
+notmuch search: A Xapian exception occurred
+A Xapian exception occurred parsing query: missing } in '{from:keithp'
+Query string was: thread:{from:keithp and date:2009} and thread:{to:keithp}
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_done
index 74b3f5a1811f5fa6664f157d28480d6214b25cf6..0abef82433d7742cc84577c9836ff7b528d7599d 100755 (executable)
@@ -256,4 +256,63 @@ id:4EFC743A.3060609@april.org
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+test_begin_subtest "msg.get_property (python)"
+test_python <<'EOF'
+import notmuch
+db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
+msg = db.find_message("4EFC743A.3060609@april.org")
+print("testkey1 = {0}".format(msg.get_property("testkey1")))
+print("testkey3 = {0}".format(msg.get_property("testkey3")))
+EOF
+cat <<'EOF' > EXPECTED
+testkey1 = alice
+testkey3 = alice3
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "msg.get_properties (python)"
+test_python <<'EOF'
+import notmuch
+db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
+msg = db.find_message("4EFC743A.3060609@april.org")
+for (key,val) in msg.get_properties("testkey1"):
+        print("{0} = {1}".format(key,val))
+EOF
+cat <<'EOF' > EXPECTED
+testkey1 = alice
+testkey1 = bob
+testkey1 = testvalue1
+testkey1 = testvalue2
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "msg.get_properties (python, prefix)"
+test_python <<'EOF'
+import notmuch
+db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
+msg = db.find_message("4EFC743A.3060609@april.org")
+for (key,val) in msg.get_properties("testkey"):
+        print("{0} = {1}".format(key,val))
+EOF
+cat <<'EOF' > EXPECTED
+testkey1 = alice
+testkey1 = bob
+testkey1 = testvalue1
+testkey1 = testvalue2
+testkey3 = alice3
+testkey3 = bob3
+testkey3 = testvalue3
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "msg.get_properties (python, exact)"
+test_python <<'EOF'
+import notmuch
+db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
+msg = db.find_message("4EFC743A.3060609@april.org")
+for (key,val) in msg.get_properties("testkey",True):
+        print("{0} = {1}".format(key,val))
+EOF
+test_expect_equal_file /dev/null OUTPUT
+
 test_done
index c198c506378ca077d75d0213008a373dc5826464..bf8cc3a816b65e8cc858411979fcd22340ac2e2d 100755 (executable)
@@ -47,6 +47,16 @@ EOF
 notmuch search --output=files subject:'"message 2"' | notmuch_dir_sanitize > OUTPUT
 test_expect_equal_file EXPECTED OUTPUT
 
+test_begin_subtest 'Regexp search for second subject'
+test_subtest_known_broken
+cat <<EOF >EXPECTED
+MAIL_DIR/copy0
+MAIL_DIR/copy1
+MAIL_DIR/copy2
+EOF
+notmuch search --output=files 'subject:"/message 2/"' | notmuch_dir_sanitize > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
 add_message '[id]="duplicate"' '[body]="sekrit" [filename]=copy3'
 test_begin_subtest 'search for body in duplicate file'
 cat <<EOF >EXPECTED
index 2b7bc6588b8db736f2bbb4a843c43e49388eeefb..9e795896a4661bb27b844b4fb47860981a6edd51 100755 (executable)
@@ -66,7 +66,6 @@ notmuch restore < prop-dump
 notmuch reindex '*'
 notmuch dump | grep '^#=' | sort > OUTPUT
 test_expect_equal_file prop-dump OUTPUT
-test_done
 
 add_email_corpus lkml
 
diff --git a/test/corpora/broken/loop/loop-12 b/test/corpora/broken/loop/loop-12
new file mode 100644 (file)
index 0000000..b5c3af7
--- /dev/null
@@ -0,0 +1,8 @@
+From: Alice <alice@example.org>
+To: Daniel <daniel@example.org>
+Subject: referencing in-reply-to-loop-21
+Message-ID: <mid-loop-12@example.org>
+In-Reply-To: <mid-loop-21@example.org>
+Date: Thu, 16 Jun 2016 22:14:41 -0400
+
+Note Message-ID and In-Reply-To: in file in-reply-to-loop-21
diff --git a/test/corpora/broken/loop/loop-21 b/test/corpora/broken/loop/loop-21
new file mode 100644 (file)
index 0000000..234f032
--- /dev/null
@@ -0,0 +1,8 @@
+From: Alice <alice@example.org>
+To: Daniel <daniel@example.org>
+Subject: referencing in-reply-to-loop-12
+Message-ID: <mid-loop-21@example.org>
+In-Reply-To: <mid-loop-12@example.org>
+Date: Fri, 17 Jun 2016 22:14:41 -0400
+
+Note Message-ID and In-Reply-To: in file in-reply-to-loop-12
diff --git a/test/emacs-tree.expected-output/notmuch-tree-show-window b/test/emacs-tree.expected-output/notmuch-tree-show-window
new file mode 100644 (file)
index 0000000..7d860c6
--- /dev/null
@@ -0,0 +1,41 @@
+Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)
+Subject: [notmuch] Working with Maildir storage?
+To: notmuch@notmuchmail.org
+Date: Tue, 17 Nov 2009 14:00:54 -0500
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ Unknown key ID 0xD74695063141ACD8 or unsupported algorithm ]
+[ text/plain ]
+I saw the LWN article and decided to take a look at notmuch.  I'm
+currently using mutt and mairix to index and read a collection of
+Maildir mail folders (around 40,000 messages total).
+
+notmuch indexed the messages without complaint, but my attempt at
+searching bombed out. Running, for example:
+
+  notmuch search storage
+
+Resulted in 4604 lines of errors along the lines of:
+
+  Error opening
+  /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+  Too many open files
+
+I'm curious if this is expected behavior (i.e., notmuch does not work
+with Maildir) or if something else is going on.
+
+Cheers,
+
+[ 4-line signature. Click/Enter to show. ]
+-- 
+Lars Kellogg-Stedman <lars@seas.harvard.edu>
+Senior Technologist, Computing and Information Technology
+Harvard University School of Engineering and Applied Sciences
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+_______________________________________________
+notmuch mailing list
+notmuch@notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
diff --git a/test/emacs-tree.expected-output/notmuch-tree-single-thread b/test/emacs-tree.expected-output/notmuch-tree-single-thread
new file mode 100644 (file)
index 0000000..2285d10
--- /dev/null
@@ -0,0 +1,6 @@
+  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox)
+  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox unread)
+  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
+  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
+  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
+End of search results.
diff --git a/test/emacs-tree.expected-output/notmuch-tree-tag-inbox b/test/emacs-tree.expected-output/notmuch-tree-tag-inbox
new file mode 100644 (file)
index 0000000..f28d485
--- /dev/null
@@ -0,0 +1,53 @@
+  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox unread)
+  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox unread)
+  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread)
+  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search        instead of going into an infinite loop (attachment inbox unread)
+  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox unread)
+  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox signed unread)
+  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox unread)
+  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox unread)
+  2009-11-17  Jan Janak             ├─► ...                                               (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox unread)
+  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox unread)
+  2009-11-18  Carl Worth             ╰─► ...                                              (inbox unread)
+  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove    inbox (and unread) tags (inbox unread)
+  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
+  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox signed unread)
+  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox signed unread)
+  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox signed unread)
+  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox unread)
+  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox unread)
+  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox signed unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox unread)
+  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox unread)
+  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
+  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
+  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
+  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that    highlights URLs and uses word-wrap (inbox unread)
+  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread)
+  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox unread)
+  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox unread)
+  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox unread)
+  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox unread)
+  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox unread)
+  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox unread)
+  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool       subdirectories into tags (inbox unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before  statting (inbox unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++     libs. (inbox unread)
+  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment inbox signed unread)
+  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment inbox signed unread)
+  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox unread)
+  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment inbox unread)
+  2009-11-17  Carl Worth            ╰─► ...                                               (inbox unread)
+End of search results.
diff --git a/test/emacs-tree.expected-output/notmuch-tree-tag-inbox-tagged b/test/emacs-tree.expected-output/notmuch-tree-tag-inbox-tagged
new file mode 100644 (file)
index 0000000..428c0ae
--- /dev/null
@@ -0,0 +1,53 @@
+  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox unread)
+  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox test_tag unread)
+  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread)
+  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search        instead of going into an infinite loop (attachment inbox unread)
+  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox unread)
+  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox signed unread)
+  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox unread)
+  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox unread)
+  2009-11-17  Jan Janak             ├─► ...                                               (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox unread)
+  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox unread)
+  2009-11-18  Carl Worth             ╰─► ...                                              (inbox unread)
+  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove    inbox (and unread) tags (inbox unread)
+  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
+  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox signed unread)
+  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox signed unread)
+  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox signed unread)
+  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox unread)
+  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox unread)
+  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox signed unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox unread)
+  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox unread)
+  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
+  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
+  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
+  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that    highlights URLs and uses word-wrap (inbox unread)
+  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread)
+  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox unread)
+  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox unread)
+  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox unread)
+  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox unread)
+  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox unread)
+  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox unread)
+  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool       subdirectories into tags (inbox unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before  statting (inbox unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++     libs. (inbox unread)
+  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment inbox signed unread)
+  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment inbox signed unread)
+  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox unread)
+  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment inbox unread)
+  2009-11-17  Carl Worth            ╰─► ...                                               (inbox unread)
+End of search results.
diff --git a/test/emacs-tree.expected-output/notmuch-tree-tag-inbox-thread-tagged b/test/emacs-tree.expected-output/notmuch-tree-tag-inbox-thread-tagged
new file mode 100644 (file)
index 0000000..828c525
--- /dev/null
@@ -0,0 +1,53 @@
+  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox unread)
+  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox unread)
+  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread)
+  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search        instead of going into an infinite loop (attachment inbox unread)
+  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox unread)
+  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox signed unread)
+  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox unread)
+  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox unread)
+  2009-11-17  Jan Janak             ├─► ...                                               (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
+  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox unread)
+  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox unread)
+  2009-11-18  Carl Worth             ╰─► ...                                              (inbox unread)
+  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove    inbox (and unread) tags (inbox unread)
+  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
+  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox signed test_thread_tag unread)
+  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox signed test_thread_tag unread)
+  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox signed test_thread_tag unread)
+  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox test_thread_tag unread)
+  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox test_thread_tag unread)
+  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox signed test_thread_tag unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox test_thread_tag unread)
+  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox unread)
+  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox unread)
+  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
+  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
+  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
+  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that    highlights URLs and uses word-wrap (inbox unread)
+  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread)
+  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox unread)
+  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox unread)
+  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox unread)
+  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox unread)
+  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox unread)
+  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox unread)
+  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool       subdirectories into tags (inbox unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before  statting (inbox unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++     libs. (inbox unread)
+  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment inbox signed unread)
+  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment inbox signed unread)
+  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox unread)
+  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment inbox unread)
+  2009-11-17  Carl Worth            ╰─► ...                                               (inbox unread)
+End of search results.
index 5b2125142929b182723c75b3519776fc03298ad7..fca5277dfea3d4e21af869f5d4cf0031f3b8347e 100644 (file)
@@ -621,6 +621,11 @@ notmuch_config_sanitize ()
     notmuch_dir_sanitize | notmuch_built_with_sanitize
 }
 
+notmuch_show_part ()
+{
+    awk '/^\014part}/{ f=0 }; { if (f) { print $0 } } /^\014part{ ID: '"$1"'/{ f=1 }'
+}
+
 # End of notmuch helper functions
 
 # Use test_set_prereq to tell that a particular prerequisite is available.
@@ -1003,7 +1008,7 @@ test_python() {
 }
 
 test_ruby() {
-    MAIL_DIR=$MAIL_DIR ruby -I $NOTMUCH_SRCDIR/bindings/ruby> OUTPUT
+    MAIL_DIR=$MAIL_DIR $NOTMUCH_RUBY -I $NOTMUCH_SRCDIR/bindings/ruby> OUTPUT
 }
 
 test_C () {
diff --git a/test/tree.expected-output/notmuch-tree-show-window b/test/tree.expected-output/notmuch-tree-show-window
deleted file mode 100644 (file)
index 7d860c6..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)
-Subject: [notmuch] Working with Maildir storage?
-To: notmuch@notmuchmail.org
-Date: Tue, 17 Nov 2009 14:00:54 -0500
-
-[ multipart/mixed ]
-[ multipart/signed ]
-[ Unknown key ID 0xD74695063141ACD8 or unsupported algorithm ]
-[ text/plain ]
-I saw the LWN article and decided to take a look at notmuch.  I'm
-currently using mutt and mairix to index and read a collection of
-Maildir mail folders (around 40,000 messages total).
-
-notmuch indexed the messages without complaint, but my attempt at
-searching bombed out. Running, for example:
-
-  notmuch search storage
-
-Resulted in 4604 lines of errors along the lines of:
-
-  Error opening
-  /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
-  Too many open files
-
-I'm curious if this is expected behavior (i.e., notmuch does not work
-with Maildir) or if something else is going on.
-
-Cheers,
-
-[ 4-line signature. Click/Enter to show. ]
--- 
-Lars Kellogg-Stedman <lars@seas.harvard.edu>
-Senior Technologist, Computing and Information Technology
-Harvard University School of Engineering and Applied Sciences
-[ application/pgp-signature ]
-[ text/plain ]
-[ 4-line signature. Click/Enter to show. ]
-_______________________________________________
-notmuch mailing list
-notmuch@notmuchmail.org
-http://notmuchmail.org/mailman/listinfo/notmuch
diff --git a/test/tree.expected-output/notmuch-tree-single-thread b/test/tree.expected-output/notmuch-tree-single-thread
deleted file mode 100644 (file)
index 2285d10..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox)
-  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox unread)
-  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
-  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
-  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
-End of search results.
diff --git a/test/tree.expected-output/notmuch-tree-tag-inbox b/test/tree.expected-output/notmuch-tree-tag-inbox
deleted file mode 100644 (file)
index f28d485..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox unread)
-  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox unread)
-  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread)
-  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search        instead of going into an infinite loop (attachment inbox unread)
-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox unread)
-  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox signed unread)
-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox unread)
-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox unread)
-  2009-11-17  Jan Janak             ├─► ...                                               (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox unread)
-  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox unread)
-  2009-11-18  Carl Worth             ╰─► ...                                              (inbox unread)
-  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove    inbox (and unread) tags (inbox unread)
-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
-  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox signed unread)
-  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox signed unread)
-  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox signed unread)
-  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox unread)
-  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox unread)
-  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox signed unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox unread)
-  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox unread)
-  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
-  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
-  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
-  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that    highlights URLs and uses word-wrap (inbox unread)
-  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread)
-  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox unread)
-  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox unread)
-  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox unread)
-  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox unread)
-  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox unread)
-  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox unread)
-  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool       subdirectories into tags (inbox unread)
-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before  statting (inbox unread)
-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread)
-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++     libs. (inbox unread)
-  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment inbox signed unread)
-  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment inbox signed unread)
-  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox unread)
-  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment inbox unread)
-  2009-11-17  Carl Worth            ╰─► ...                                               (inbox unread)
-End of search results.
diff --git a/test/tree.expected-output/notmuch-tree-tag-inbox-tagged b/test/tree.expected-output/notmuch-tree-tag-inbox-tagged
deleted file mode 100644 (file)
index 428c0ae..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox unread)
-  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox test_tag unread)
-  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread)
-  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search        instead of going into an infinite loop (attachment inbox unread)
-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox unread)
-  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox signed unread)
-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox unread)
-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox unread)
-  2009-11-17  Jan Janak             ├─► ...                                               (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox unread)
-  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox unread)
-  2009-11-18  Carl Worth             ╰─► ...                                              (inbox unread)
-  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove    inbox (and unread) tags (inbox unread)
-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
-  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox signed unread)
-  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox signed unread)
-  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox signed unread)
-  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox unread)
-  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox unread)
-  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox signed unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox unread)
-  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox unread)
-  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
-  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
-  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
-  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that    highlights URLs and uses word-wrap (inbox unread)
-  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread)
-  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox unread)
-  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox unread)
-  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox unread)
-  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox unread)
-  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox unread)
-  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox unread)
-  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool       subdirectories into tags (inbox unread)
-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before  statting (inbox unread)
-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread)
-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++     libs. (inbox unread)
-  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment inbox signed unread)
-  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment inbox signed unread)
-  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox unread)
-  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment inbox unread)
-  2009-11-17  Carl Worth            ╰─► ...                                               (inbox unread)
-End of search results.
diff --git a/test/tree.expected-output/notmuch-tree-tag-inbox-thread-tagged b/test/tree.expected-output/notmuch-tree-tag-inbox-thread-tagged
deleted file mode 100644 (file)
index 828c525..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox unread)
-  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox unread)
-  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread)
-  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search        instead of going into an infinite loop (attachment inbox unread)
-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox unread)
-  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox signed unread)
-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox unread)
-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox unread)
-  2009-11-17  Jan Janak             ├─► ...                                               (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
-  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox unread)
-  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox unread)
-  2009-11-18  Carl Worth             ╰─► ...                                              (inbox unread)
-  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove    inbox (and unread) tags (inbox unread)
-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
-  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox signed test_thread_tag unread)
-  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox signed test_thread_tag unread)
-  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox signed test_thread_tag unread)
-  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox test_thread_tag unread)
-  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox test_thread_tag unread)
-  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox signed test_thread_tag unread)
-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox test_thread_tag unread)
-  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox unread)
-  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox unread)
-  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
-  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
-  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
-  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that    highlights URLs and uses word-wrap (inbox unread)
-  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread)
-  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox unread)
-  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox unread)
-  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox unread)
-  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox unread)
-  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox unread)
-  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox unread)
-  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool       subdirectories into tags (inbox unread)
-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before  statting (inbox unread)
-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread)
-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++     libs. (inbox unread)
-  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment inbox signed unread)
-  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment inbox signed unread)
-  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox unread)
-  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment inbox unread)
-  2009-11-17  Carl Worth            ╰─► ...                                               (inbox unread)
-End of search results.
index d12fadb4fcce762249210858f6f0367103336dba..b24860afa9a67b581354a4dbf0635bb0621dad74 100644 (file)
@@ -15,11 +15,11 @@ typedef enum util_status {
      */
     UTIL_EOF,
     /**
-     * Low level error occured, consult errno.
+     * Low level error occurred, consult errno.
      */
     UTIL_ERRNO,
     /**
-     * Zlib error occured, call gzerror for details.
+     * Zlib error occurred, call gzerror for details.
      */
     UTIL_GZERROR
 } util_status_t;
diff --git a/version b/version
index 9922215085ae1ebb02ba2be5498c1cce29196e32..5a9e6bda259d91234404902623fbf7367f54f350 100644 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-0.26
+0.27
index d6f23350740db8468ecbf82e75e47b79e5c3e200..c137bacdc0f4f1e3af78cb9617d5fe92f527c53f 100644 (file)
@@ -5,7 +5,7 @@ utilizing the notmuch framework, through it's ruby bindings.
 
 == install ==
 
-Simply run 'make install'. However, check that you have the depencies below.
+Simply run 'make install'. However, check that you have the dependencies below.
 
 === vim +ruby ===