aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-10-31emacs: Improve the behaviour of the 'q' binding.David Edmondson
When a user hits 'q' in a notmuch buffer, kill the buffer only if there are no other windows currently showing it.
2014-10-31test: use LDFLAGS in test/Makefile.localJani Nikula
Apparently the test binaries are built with minimal LDFLAGS, only adding dependency specific LDFLAGS as needed. However because some of the test binaries incorporate notmuch object files, it is necessary to use the same link flags as notmuch. For example user provided CFLAGS/CXXFLAGS/LDFLAGS with -fsanitize=undefined fails to build the test binaries if the flags differ.
2014-10-28test: add simple tests for post-insert hookDavid Bremner
Most of the existing tests for pre/post-new hook don't seem to apply.
2014-10-28cli/insert: add post-insert hookJani Nikula
The post-new hook might no longer be needed or run very often if notmuch insert is being used. Therefore a post-insert hook is needed (arguably pre-insert not so much, so don't add one). Also add the --no-hooks option to skip hooks.
2014-10-28gitignore: ignore sh.config and doc/config.doxJani Nikula
2014-10-28cli: cast timeval fields to long for formatJani Nikula
This hides platform differences between struct timeval field types.
2014-10-25emacs: notmuch-jump.el should provide.David Edmondson
To ease loading, notmuch-jump.el should provide 'notmuch-jump.
2014-10-25lib: Remove unnecessary thread linking steps when using ghost messagesAustin Clements
Previously, it was necessary to link new messages to children to work around some (though not all) problems with the old metadata-based approach to stored thread IDs. With ghost messages, this is no longer necessary, so don't bother with child linking when ghost messages are in use.
2014-10-25test: Test upgrade to ghost messages featureAustin Clements
2014-10-25lib: Enable ghost messages featureAustin Clements
This fixes the broken thread order test.
2014-10-25lib: Implement upgrade to ghost messages featureAustin Clements
Somehow this is the first upgrade pass that actually does *any* error checking, so this also adds the bit of necessary infrastructure to handle that.
2014-10-25lib: Implement ghost-based thread linkingAustin Clements
This updates the thread linking code to use ghost messages instead of user metadata to link messages into threads. In contrast with the old approach, this is actually correct. Previously, thread merging updated only the thread IDs of message documents, not thread IDs stored in user metadata. As originally diagnosed by Mark Walters [1] and as demonstrated by the broken T260-thread-order test, this can cause notmuch to fail to link messages even though they're in the same thread. In principle the old approach could have been fixed by updating the user metadata thread IDs as well, but these are not indexed and hence this would have required a full scan of all stored thread IDs. Ghost messages solve this problem naturally by reusing the exact same thread ID and message ID representation and indexing as regular messages. Furthermore, thanks to this greater symmetry, ghost messages are also algorithmically simpler. We continue to support the old user metadata format, so this patch can't delete any code, but when we do remove support for the old format, several functions can simply be deleted. [1] id:8738h7kv2q.fsf@qmul.ac.uk
2014-10-25lib: Internal support for querying and creating ghost messagesAustin Clements
This updates the message abstraction to support ghost messages: it adds a message flag that distinguishes regular messages from ghost messages, and an internal function for initializing a newly created (blank) message as a ghost message.
2014-10-25lib: Introduce macros for bit operationsAustin Clements
These macros help clarify basic bit-twiddling code and are written to be robust against C undefined behavior of shift operators.
2014-10-25lib: Update database schema doc for ghost messagesAustin Clements
This describes the structure of ghost mail documents. Ghost messages are not yet implemented.
2014-10-25lib: Add a ghost messages database featureAustin Clements
This will be implemented over the next several patches. The feature is not yet "enabled" (this does not add it to NOTMUCH_FEATURES_CURRENT).
2014-10-25Merge tag '0.18.2'David Bremner
notmuch 0.18.2 release
2014-10-25debian: add changelog stanza for 0.18.2-10.18.2David Bremner
2014-10-25version: bump to 0.18.2David Bremner
No non-documentation changes
2014-10-25NEWS: give real entry for 0.18.2David Bremner
Expand out what the actual test suite changes are, so people have a better idea if the release is relevant to them.
2014-10-25Merge tag '0.18.2_rc1'David Bremner
notmuch 0.18.2~rc1 release Conflicts: NEWS debian/changelog
2014-10-25debian: build depend on dh-pythondebian/0.18.2_rc1-10.18.2_rc1David Bremner
The build log asked me nicely, so I did.
2014-10-25debian: add changelog stanza for 0.18.2~rc-1David Bremner
2014-10-25NEWS: add minimal news item for 0.18.2David Bremner
The less said, the less typos to make.
2014-10-25version: bump to 0.18.2~rc1David Bremner
2014-10-25test: kill '"filename": "signature.asc"' from json outputDavid Bremner
This starts to appear with emacs24.4, so we can't easily have it in our expected output.
2014-10-25test/emacs: force *Messages* buffer to be writableDavid Bremner
In emacs 24.4 the messages buffer starts being read-only, which kills these tests. This seems to be the point of the variable inihibit-read-only, which has existed at least since emacs 21.
2014-10-25test: simplify T360-symbol-hiding, use nm instead of objdumpDavid Bremner
After yet another variation in objdump output caused this test to fail (on a Debian port, no less), I decided whatever putative benefit we get from looking at the object files instead of the library isn't worth the maintenence headache. This version uses nm -P. nm -P should be portable, and fixed format. It purposely doesn't use the -D argument, since that is non-POSIX and nm on GNU/Linux seems do the right thing without it. It still won't work out of the box on e.g. Mac OS/X. I think the right thing to do there is to move some more configuration information into sh.config. (cherry picked from commit c34d6bad0f9da300eac2181e2073aee130432932)
2014-10-25test: Port atomicity test to PythonAustin Clements
Previously, this was implemented using a horrible GDB script (because there is no such thing as a non-horrible GDB script). This GDB script often broke with newer versions of GDB for mysterious reasons. Port the test script to GDB's Python API, which makes the code much cleaner and, hopefully, more stable. (cherry picked from commit cbbda62258360f035894cff9dfd66c60b0cc707f) Conflicts: test/T380-atomicity.sh
2014-10-24README.rst: typo/wording fixesDavid Bremner
It occurs that hardcoding the URL will not make sense in forks. Mind you, the whole README won't make much sense in forks.
2014-10-24doc: add README.rst especially for githubDavid Bremner
Apparently README.rst overrides README, so this will show up instead of our generic README on github. If the user is already on github, then clicking a link for more information is not a hardship.
2014-10-21VIM: Make starting in 'insert' mode for compose optionalIan Main
This adds a variable to make starting in insert mode optional when composing and replying to emails. I found it unusual to be started in insert mode so I thought I'd make it optional as others may find this as well. Ian
2014-10-21VIM: Use notmuch CLI for configIan Main
This patch switches from reading .notmuch-config directly to using the CLI the same way that emacs does it. It actually uses less code and is probably less error prone. Ian
2014-10-18test: check for gdb in insert testsDavid Bremner
Commits a6cee01 and c48b12f otherwise break the build for people without gdb.
2014-10-18test/insert: check that indexing errors are accepted with --keepDavid Bremner
This is overkill for the current code path, but should provide some robustness for future changes in error handling.
2014-10-18cli/insert: require succesful message indexing for success statusJani Nikula
Add --keep option to keep any remaining stuff in index or file. We could distinguish between failures to index and failures to apply tags or maildir sync, but for simplicity just have one.
2014-10-18cli/insert: add fail path to add_file_to_databaseJani Nikula
Handle failures gracefully in add_file_to_database, renamed simply add_file while at it. Add keep option to not remove the message from database if tagging or tag syncing to maildir flags fails. Expand the function documentation to cover the changes.
2014-10-18test/insert: add known broken tests for indexing failuresDavid Bremner
These tests are written with the assumption that we want all indexing failures to be considered as failures by notmuch insert.
2014-10-11lib: Handle empty date valueAustin Clements
In the interest of robustness, avoid undefined behavior of sortable_unserialise if the date value is missing. This shouldn't happen now, but ghost messages will have blank date values.
2014-10-11lib: Refactor _notmuch_database_link_messageAustin Clements
This moves the code to retrieve and clear the metadata thread ID out of _notmuch_database_link_message into its own function. This will simplify future changes.
2014-10-11lib: Move message ID compression to _notmuch_message_create_for_message_idAustin Clements
Previously, this was performed by notmuch_database_add_message. This happens to be the only caller currently (which is why this was safe), but we're about to introduce more callers, and it makes more sense to put responsibility for ID compression in the lower-level function rather than requiring each caller to handle it.
2014-10-08NEWS: mention the change in default build flagsDavid Bremner
It blows things up by a factor of six or so, so it's worth giving people a heads up. It won't effect e.g. Debian, that already builds with -g and then strips.
2014-10-08NEWS: Document "nmbug: Translate to Python"W. Trevor King
For more details, see the commit message for 7f2cb3be (nmbug: Translate to Python, 2014-10-03). I realized while writing this that the 7f2cb3be commit message has: * 'nmbug log' now execs 'git log', as there's no need to keep the Python process around once we've launched Git there. But we dropped that exec in favor of the subprocess approach between v3 and v4, I just forgot to update the commit message [1]. [1]: id:e630b6763e9d0771718afee41ea15b29bb4a1de8.1409935538.git.wking@tremily.us http://article.gmane.org/gmane.mail.notmuch.general/19007
2014-10-05hex-escape: remove unused variable default_buf_sizeJani Nikula
Found by clang: CC -O2 util/hex-escape.o util/hex-escape.c:28:21: warning: unused variable 'default_buf_size' [-Wunused-const-variable] static const size_t default_buf_size = 1024; ^ 1 warning generated.
2014-10-05test: Port atomicity test to PythonAustin Clements
Previously, this was implemented using a horrible GDB script (because there is no such thing as a non-horrible GDB script). This GDB script often broke with newer versions of GDB for mysterious reasons. Port the test script to GDB's Python API, which makes the code much cleaner and, hopefully, more stable.
2014-10-05configure: add debug flags by default.David Bremner
This makes development (in particular the test suite) easier. Those concerned about the extra diskspace can override the default or use strip.
2014-10-05test: check for debug symbols in notmuchDavid Bremner
In the future, tests may rely on debug symbols being present in notmuch, so we plan to switch the default flags. The main purpose of this test is to help explain the perhaps mysterious failures of other tests which rely on symbols being present.
2014-10-05nmbug: Translate to PythonW. Trevor King
This allows us to capture stdout and stderr separately, and do other explicit subprocess manipulation without resorting to external packages. It should be compatible with Python 2.7 and later (including the 3.x series). Most of the user-facing interface is the same, but there are a few changes, where reproducing the original interface was too difficult or I saw a change to make the underlying Git UI accessible: * 'nmbug help' has been split between the general 'nmbug --help' and the command-specific 'nmbug COMMAND --help'. * Commands are no longer split into "most common", "other useful", and "less common" sets. If we need something like this, I'd prefer workflow examples highlighting common commands in the module docstring (available with 'nmbug --help'). * 'nmbug commit' now only uses a single argument for the optional commit-message text. I wanted to expose more of the underlying 'git commit' UI, since I personally like to write my commit messages in an editor with the notes added by 'git commit -v' to jog my memory. Unfortunately, we're using 'git commit-tree' instead of 'git commit', and commit-tree is too low-level for editor-launching. I'd be interested in rewriting commit() to use 'git commit', but that seemed like it was outside the scope of this rewrite. So I'm not supporting all of Git's commit syntax in this patch, but I can at least match 'git commit -m MESSAGE' in requiring command-line commit messages to be a single argument. * The default repository for 'nmbug push' and 'nmbug fetch' is now the current branch's upstream (branch.<name>.remote) instead of 'origin'. When we have to, we extract this remote by hand, but where possible we just call the Git command without a repository argument, and leave it to Git to figure out the default. * 'nmbug push' accepts multiple refspecs if you want to explicitly specify what to push. Otherwise, the refspec(s) pushed depend on push.default. The Perl version hardcoded 'master' as the pushed refspec. * 'nmbug pull' defaults to the current branch's upstream (branch.<name>.remote and branch.<name>.merge) instead of hardcoding 'origin' and 'master'. It also supports multiple refspecs if for some crazy reason you need an octopus merge (but mostly to avoid breaking consistency with 'git pull'). * 'nmbug log' now execs 'git log', as there's no need to keep the Python process around once we've launched Git there. * 'nmbug status' now catches stderr, and doesn't print errors like: No upstream configured for branch 'master' The Perl implementation had just learned to avoid crashing on that case, but wasn't yet catching the dying subprocess's stderr. * 'nmbug archive' now accepts positional arguments for the tree-ish and additional 'git archive' options. For example, you can run: $ nmbug archive HEAD -- --format tar.gz I wish I could have preserved the argument order from 'git archive' (with the tree-ish at the end), but I'm not sure how to make argparse accept arbitrary possitional arguments (some of which take arguments). Flipping the order to put the tree-ish first seemed easiest. * 'nmbug merge' and 'pull' no longer checkout HEAD before running their command, because blindly clobbering the index seems overly risky. * In order to avoid creating a dirty index, 'nmbug commit' now uses the default index (instead of nmbug.index) for composing the commit. That way the index matches the committed tree. To avoid leaving a broken index after a failed commit, I've wrapped the whole thing in a try/except block that resets the index to match the pre-commit treeish on errors. That means that 'nmbug commit' will ignore anything you've cached in the index via direct Git calls, and you'll either end up with an index matching your notmuch tags and the new HEAD (after a successful commit) or an index matching the original HEAD (after a failed commit).
2014-10-04doc: build notmuch-emacs info/html docs, link from indexDavid Bremner
Although this manual is far from complete, it may be helpful for someone. In particular building it as part of the standard build process makes it easier to find problems when editing the notmuch-emacs-manual.
2014-10-04doc: Emacs manual improvements and expansionsAustin Clements
Fix several typos, improve general wording and flow, and add some information on notmuch-jump.