aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-11test: set LD_LIBRARY_PATH early and keep its old contentsTomi Ollila
Previously LD_LIBRARY_PATH was exported (and environment changed) in the middle of test case execution, when a function setting it was called. Previously the old contents of LD_LIBRARY_PATH was lost (if any) when it was re-set and exported. In some systems the old contents of LD_LIBRARY_PATH was needed to e.g. locate suitable gmime library.
2016-06-11notmuch-emacs-mua: escape $PWD (and cd always)Tomi Ollila
Escaping $PWD makes this work in directories like 'foo"bar'... Cd'ing always makes the working directory to be consistent whether --body option was used or not (when using emacsclient, but cd'ing when using emacs does not cause any harm). Note that documentation of `insert-file` expects programs to call `insert-file-contents` instead. In our simple case `insert-file` works better as it does some good checks that we'd have to implement ourselves. Look lisp/files.el in emacs sources for more information.
2016-06-11notmuch-emacs-mua: use message-add-actionsTomi Ollila
Use message.el -provided function message-add-actions to set(/add) #'save-buffers-kill-terminal into the message-exit-actions list.
2016-06-11test: fix die() in test-lib-common.shTomi Ollila
In scripts that include test-lib-common.sh but not test-lib.sh the die() implementation needs to be a bit different due to fd redirection differences. test-lib-common.sh implements die() only if it was not implemented already.
2016-06-11test: add function die () and have use of it in add_email_corpus ()Tomi Ollila
Added die() function to test-lib.sh with the following first use of it: If notmuch new fails during email corpus addition the database is most probably inexistent or broken and the added corpus would be unusable while running single tests, giving misleading failures ("only" full 'make test' cleans out old corpus).
2016-06-11test-lib.sh: renamed die...()s to trap...()s and exit...()Tomi Ollila
Now the function names more accurately describes what the functions do.
2016-06-11doc/notmuch-emacs.rst: update notmuch-hello buffer help textTomi Ollila
To look the same as commit b8a136187a3b changed it in emacs MUA code.
2016-06-11lib: fix definition of LIBNOTMUCH_CHECK_VERSIONDavid Bremner
Fix bug reported in id:20160606124522.g2y2eazhhrwjsa4h@flatcap.org Although the C99 standard 6.10 is a little non-obvious on this point, the docs for e.g. gcc are unambiguous. And indeed in practice with the extra space, this code fails #include <stdio.h> #define foo (x) (x+1) int main(int argc, char **argv){ printf("%d\n",foo(1)); }
2016-06-11devel/man-to-mdwn.pl: portable locale environment variable settingTomi Ollila
Setting locale environment variables (LC_* and LANG) to e.g. en_US.utf8 works fine on Linux, and that is what locale -a returns (in Linux). However this does not work e.g. in some *BSD systems. In these systems, en_US.UTF-8 works. This also works in Linux systems (which may look like a surprising thing on the first sight(*)). But that *UTF-8 format seems to be widely used in the Linux system: Grep it through the files in /etc/, for example. Easy way to test: Run the following command lines. First should complain about setting locale failed, and second should not. $ LC_ALL=en_US.UTF-1 perl -e '' $ LC_ALL=en_US.UTF-8 perl -e '' (*) and who knows what the "standard" is...
2016-06-10lib: fix memory leak of field processor objectsDavid Bremner
The field processor objects need to be deallocated explicitly just like the range processors (or a talloc destructor defined).
2016-06-07doc: clean up boolean vs. probabilistic prefixesDaniel Kahn Gillmor
sphinx-build emits a minor warning: [...]doc/man7/notmuch-search-terms.rst:223: WARNING: Block quote ends without a blank line; unexpected unindent. And the tabular representation of boolean or probabilistic prefixes currently renders like this when i view it in man: ┌───────────────────────────┬────────────────────────────┐ │Boolean │ Probabilistic │ └───────────────────────────┴────────────────────────────┘ │ tag: id: │ from: to: │ │ │ │ │ thread: folder: │ subject: attach‐ │ │ path: │ ment: mimetype: │ └───────────────────────────┴────────────────────────────┘ This isn't just ugly: it's confusing, because it seems to imply that some of the prefixes in the left-hand column are somehow related to specific other prefixes in the right-hand column. The Definition List representation introduced by this patch should be simpler for readers to understand, and doesn't have the warning.
2016-06-07doc: document notmuch-dump header lineDavid Bremner
This was introduced with the libconfig changes, but not documented then.
2016-06-07lib: document config metadataDavid Bremner
This probably should have been part of 3458e3c89c, but I missed it.
2016-06-05Use https instead of http where possibleDaniel Kahn Gillmor
Many of the external links found in the notmuch source can be resolved using https instead of http. This changeset addresses as many as i could find, without touching the e-mail corpus or expected outputs found in tests.
2016-06-05nmbug: updated to modern URL for PEP 343Daniel Kahn Gillmor
2016-06-05update link to Chip Rosenthal article about reply-to mungingDaniel Kahn Gillmor
The original link is currently returning an internal server error :(
2016-06-05completion: update the location of the bash-completion projectDaniel Kahn Gillmor
Alioth currently redirects to github, so point there instead.
2016-06-05NEWS, python: update pointer to online documentationDaniel Kahn Gillmor
Currently, http://packages.python.org/notmuch/ goes through a series of redirections and ends up pointing to readthedocs. Since we're using readthedocs directly anyway, just point to it directly. readthedocs are also now sensibly using a separate domain (readthedocs.io) for their hosted documentation as distinct from their own domain (readthedocs.org), so use the correct tld.
2016-06-05doc: include notmuch-emacs-mua in documentation ToCDaniel Kahn Gillmor
Without this patch, i'm seeing sphinx-build emit: [...]doc/man1/notmuch-emacs-mua.rst:: WARNING: document isn't included in any toctree
2016-06-05lib: whitespace cleanupTomi Ollila
Cleaned the following whitespace in lib/* files: lib/index.cc: 1 line: trailing whitespace lib/database.cc 5 lines: 8 spaces at the beginning of line lib/notmuch-private.h: 4 lines: 8 spaces at the beginning of line lib/message.cc: 1 line: trailing whitespace lib/sha1.c: 1 line: empty lines at the end of file lib/query.cc: 2 lines: 8 spaces at the beginning of line lib/gen-version-script.sh: 1 line: trailing whitespace
2016-05-25lib: add support for named queriesDavid Bremner
This relies on the optional presense of xapian field processors, and the library config API.
2016-05-25lib: make a global constant for query parser flagsDavid Bremner
It's already kindof gross that this is hardcoded in two different places. We will also need these later in field processors calling back into the query parser.
2016-05-25CLI: add notmuch-config support for named queriesDavid Bremner
Most of the infrastructure here is general, only the validation/dispatch is hardcoded to a particular prefix. A notable change in behaviour is that notmuch-config now opens the database e.g. on every call to list, which fails with an error message if the database doesn't exit yet.
2016-05-25CLI: optionally restore config data.David Bremner
The default to restore config data seems safest, especially since currently we have no config data to mess up.
2016-05-25CLI: add optional config data to dump output.David Bremner
Note that it changes the default dump output format, but doesn't break existing notmuch-restore. It might break user scripts though.
2016-05-25lib: config list iteratorsDavid Bremner
Since xapian provides the ability to restrict the iterator to a given prefix, we expose this ability to the user. Otherwise we mimic the other iterator interfances in notmuch (e.g. tags.c).
2016-05-24lib: provide config APIDavid Bremner
This is a thin wrapper around the Xapian metadata API. The job of this layer is to keep the config key value pairs from colliding with other metadata by transparently prefixing the keys, along with the usual glue to provide a C interface. The split of _get_config into two functions is to allow returning of the return value with different memory ownership semantics.
2016-05-19ruby: add bindings for `notmuch_database_get_all_tags`Ludovic LANGE
The Ruby bindings were missing a way to get all the tags of the database. Now you should be able to access this with the public instance method `all_tags` of your database object. Example of use: notmuchdb = Notmuch::Database.new path, { :create => false, :mode => Notmuch::MODE_READ_ONLY } my_tags = notmuchdb.all_tags my_tags.each { |tag| print tag } my_tags.destroy! Amended by db: improve error reporting, add test
2016-05-19test: copyright information updatesTomi Ollila
Files in test directories had only copyright of a single individual, of which code was adapted here as a base of the test system. Since then many Notmuch Developers have contributed to the test system, which is now acknowledged with a constant string in some of the test files. The README file in test directory instructed new files contain a copyright notice, but that has never been done (and it is also not needed). To simplify things a bit (and lessen confusion) this instruction is now removed. As a side enchangement, all of the 3 entries in the whole source tree cd'ing to `dirname` of "$0" now uses syntax cd "$(dirname "$0")". This makes these particular lines work when current working directory is e.g. /c/Program Files/notmuch/test/. (Probably it would fail elsewhere, though.)
2016-05-19emacs: bind notmuch-show-resend-message to 'b' in notmuch-show modeTomi Ollila
This binding is similar to mutt's, which is bind {mode} b "bounce-message" # remail a message to another user where {mode} is 'index', 'pager' or 'attach'.
2016-05-19emacs: add function to resend message to new recipientsTomi Ollila
The new function notmuch-show-message-resend re-sends message to new recipients using #'message-resend. Recipients are read from minibuffer as a comma-separated string (with some keyboard support including tab completion). Final confirmation before sending is asked.
2016-05-19cli: tell how many messages were precisely matched when expected 1 matchTomi Ollila
In case of notmuch reply and notmuch show --part=N it is required that search terms match to one message. If match count was != 1, error message "Error: search term did not match precisely one message" was too vague to explain what happened. By appending (matched <num> messages) to the error message it makes the problem more understandable (e.g when <num> is '0' user reckons the query had a typo in it).
2016-05-19configure: combine common parts of CONFIGURE_C{,XX}FLAGSTomi Ollila
By combining the common parts of CONFIGURE_CFLAGS and CONFIGURE_CXXFLAGS to a separate make variable and using that as part of their definitions makes setting of these easier, DRYer and less error prone (especially as we cannot check potential typing errors there).
2016-05-13configure: check directly for xapian compaction APIDavid Bremner
This is consistent with the check for FieldProcessor, and probably a bit more robust.
2016-05-13lib/cli: add library API / CLI for compile time optionsDavid Bremner
This is intentionally low tech; if we have more than two options it may make sense to build up what infrastructure is provided.
2016-05-08lib: optionally support single argument date: queriesDavid Bremner
This relies on the FieldProcessor API, which is only present in xapian >= 1.3.
2016-05-08configure: detect Xapian:FieldProcessorDavid Bremner
Rather than check versions, it seems more robust to do a test compile.
2016-05-07configure: add set -uTomi Ollila
In case of any unset variable, make ./configure exit with nonzero value; an attempt to expand an unset variable is a bug in the script (usually a spelling mistake) and those should not pass through unnoticed.
2016-05-07configure: replace ${CXXLAGS} with ${CXXFLAGS_for_sh}Tomi Ollila
Variable CXXLAGS expands to nothing, CXXFLAGS something unusable here; CXXFLAGS_for_sh expands to what we expect here.
2016-05-02cli: remove leftover dir variableJani Nikula
No functional changes.
2016-05-01configure: SC2016: Expressions don't expand in single quotesJani Nikula
Fix shellcheck warnings. Use double quotes but escape $ to make it look more intentional.
2016-05-01configure: SC2034: glib_cflags and glib_ldflags appear unused.Jani Nikula
Fix shellcheck warnings.
2016-05-01configure: SC2059: Don't use variables in the printf format string.Jani Nikula
Fix shellcheck warnings. Use printf "..%s.." "$foo".
2016-05-01configure: SC2006: Use $(..) instead of legacy `..`Jani Nikula
Fix shellcheck warnings.
2016-05-01Merge emacs bug fixes from releaseDavid Bremner
2016-05-01emacs: Tell `message-mode' that outgoing messages are email.David Edmondson
When composing messages (including replies, etc.), indicate to `message-mode' definitively that the message is email (as opposed to Usenet news) rather than having it attempt to determine this for itself. This causes `message-mode' to observe such variables as `message-default-mail-headers', which previously happened haphazardly.
2016-05-01emacs: Observe the charset of MIME parts when reading them.David Edmondson
`notmuch--get-bodypart-raw' previously assumed that all non-binary MIME parts could be successfully read by assuming that they were UTF-8 encoded. This was demonstrated to be wrong, specifically when a part was marked as ISO8859-1 and included accented characters (which were incorrectly rendered as a result). Rather than assuming UTF-8, attempt to use the part's declared charset when reading it, falling back to US-ASCII if the declared charset is unknown, unsupported or invalid.
2016-04-30notmuch-mutt: use env to locate perl for increased portabilityStefano Zacchiroli
Note: this patch drops -w from the shebang line, but we still have "use warnings" in the script, which is superior anyhow. Thanks Andreas Tolfsen for the suggestion.
2016-04-26debian: add versioned depends on dpkg-devdebian/0.22-10.22David Bremner
This is needed to support build profiles (e.g. nocheck)
2016-04-26debian: add changelog stanza for 0.22David Bremner