aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-09test: Fix indentationJonas Bernoulli
Fix it to consistently match the style we have configured in ".dir-locals.el".
2020-08-09.dir-locals.el: Set variables for correct "shell" modeJonas Bernoulli
The major mode used for shell scripts is named 'sh-mode'. 'shell-mode' on the other hand implements an interactive shell in emacs-lisp.
2020-08-09Fix typosJonas Bernoulli
2020-08-09emacs: Increase consistency of library headersJonas Bernoulli
2020-08-09emacs: Various cosmetic changesJonas Bernoulli
2020-08-09emacs: Autoload notmuch-jump using an autoload cookieJonas Bernoulli
Doing that is better than using an `autoload' form because the latter may result in dependencies getting hidden and indeed it turns out we have to declare `notmuch-jump' in "notmuch-tag.el".
2020-08-09emacs: Autoload notmuch-jump-search only onceJonas Bernoulli
This function is being autoloaded using an autoload cookie, so it shouldn't additionally be autoloaded using an `autoload' form. When building libraries we don't actually load the autoloads file and dropping the `autoload' form results in an error, which reveals a so far unspecified dependency: `notmuch-tree' needs `notmuch-jump'. Before this commit compiling (or even just loading) `notmuch-tree' resulted in `notmuch-jump' being loaded because the former requires `notmuch-lib', which autoloaded `notmuch-jump-search'. The bug was that this dependency was not explicitly specified, which we fix by adding the respective `require' form.
2020-08-09emacs: Improve doc-stringsJonas Bernoulli
- The first sentence should fit on the first line in full. This is even the case when that causes the line to get a bit long. If it gets very long, then it should be made shorter. - Even even the second sentence would fit on the first line, if it just provides some details, then it shouldn't be done. - Symbols are quoted like `so'. - There is no clear rule on how to (not) quote non-atomic s-expressions, but quoting like '(this) is definitely weird. - It is a good idea to remember that \" becomes " and to take that in mind when adjusting the automatic filling by hand. - Use the imperative form. - Arguments are written in all uppercase.
2020-08-09emacs: Use makefile-gmake-mode in Makefile*sJonas Bernoulli
Use `makefile-gmake-mode' instead of `makefile-mode' because the former also highlights ifdef et al. while the latter does not. "./Makefile.global" and one "Makefile.local" failed to specify any major mode at all but doing so is necessary because Emacs does not automatically figure out that these are Makefiles (of any flavor).
2020-08-09emacs: notmuch-poll: Let the user know we are pollingJonas Bernoulli
It is done synchronously and it can take a while, so we should let the user know what is going on.
2020-08-09emacs: No longer define notmuch-hello-mode-map as a functionJonas Bernoulli
It was defined as such for a decade; ever since a56010ac8b89a2489eee5c78469f05cee85ec858 but there wasn't a reason to do that then nor is there now.
2020-08-09emacs: Fix some function declarationsJonas Bernoulli
2020-08-09emacs: Extend face to window edge againJonas Bernoulli
Since Emacs 27 each face has to be explicitly configured to "extend to the edge of the window". Without doing that the face used for the newline character only has an effect that spans "one character" (i.e. it looks like there is a single trailing space character). We don't want that so extend the face in Emacs 27, so that it looks the same as it did in older Emacs releases. We have to do this conditionally, otherwise older Emacsen would choke on it.
2020-08-09emacs: Use one or three lines for 'if' formsJonas Bernoulli
Putting the COND and THEN parts on the same line but ELSE on a separate line makes it harder to determine if there actually is an ELSE part.
2020-08-09emacs: Use 'when' instead of 'if' when there is no ELSE partJonas Bernoulli
2020-08-09emacs: Use 'unless' instead of 'when' and 'not'Jonas Bernoulli
Also use 'unless' in a few cases where previously 'if' was used with 'not' but without an ELSE part.
2020-08-09emacs: Use 'and' instead of 'when' when the return value mattersJonas Bernoulli
Also do so for some 'if' forms that lack an ELSE part. Even go as far as using 'and' and 'not' instead of 'unless'.
2020-08-09emacs: Only set one variable per setq formJonas Bernoulli
It's a bit weird to avoid having to write the "(setq ... )" more than once, just because we can. In a language that uses '=' for the same purpose we also happily use that once per assignment. While there are no benefit to using just one 'setq' there are some drawbacks. It is not always clear on first what is a key and what a value and as a result it is easy to make a mistake. Also it becomes harder to comment out just one assignment.
2020-08-09emacs: Closing parenthesis go on the same lineJonas Bernoulli
2020-08-09emacs: Fix indentationJonas Bernoulli
2020-08-09emacs: Remove excess empty linesJonas Bernoulli
Most people who write lots of lisp tend to only sparsely use empty "separator" lines within forms. In lisp they feel unnecessary and since most files stick to this convention we get a bit confused when there are extra empty lines. It feels like the s-expressions are falling into pieces. All of this is especially true between a function's doc-string and body because the doc-string is colored differently, which visually already separates it quite sufficiently from the code that follows.
2020-08-09emacs: Shorten long linesJonas Bernoulli
2020-08-08Emacs: Ensure left-to-right display for message headersTeemu Likonen
In notmuch-show buffer insert invisible U+200E LEFT-TO-RIGHT MARK character at the beginning of message header paragraph if the From header contains a right-to-left character. This ensures that the header paragraph is always rendered in left-to-right mode. See Emacs Lisp reference manual section "(elisp) Bidirectional Display" for more info.
2020-08-08T355: specify hash algorithm explicitlyĐoàn Trần Công Danh
On some systems (notably, the one shipped with LibreSSL), default fingerprint digest algorithm is SHA256. On other systems, users can change default digest algorithm by changing default_md in /etc/ssl/default_md. Let's ask openssl to provide us specific algorithm to make the test more deterministic. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2020-08-08configure: drop check for default xapian backendĐoàn Trần Công Danh
Starting from xapian 1.3.5, xapian switched default backend to glass. From 00cdfe10 (build: drop support for xapian versions less than 1.4, 2020-04-22), we only support xapian 1.4.0+. Effectively, we don't need to check for default xapian backend anymore. Further more, from 99a7aac8 (test: drop use of db_ending, 2020-07-29), our test framework has become independence from default xapian. Let's drop it. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2020-08-08configure: check for pytest with python -m pytestĐoàn Trần Công Danh
On different distro, pytest is suffixed with different patterns. On the other hand, `python3-pytest' could be invoked correctly, via `python3 -m pytest', the latter is used by our tests, now. Switch to `$python -m pytest` to fix address all incompatible naming. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2020-08-03test: regression tests for n_indexopts_{get,set}_decrypt_policyDavid Bremner
The main criteria is that they don't crash. Working with a closed database is a bonus.
2020-08-03test: regression test for traversing config list with closed dbDavid Bremner
Also mention error return in API docs
2020-08-03test: regression test for n_d_get_config_list on closed db.David Bremner
Exception is caught.
2020-08-03test: regression test for n_directory_{get,set}_mtimeDavid Bremner
The mtime is cached, so closing the db is not a problem. Writing the mtime throws an exception, which is caught.
2020-08-03lib: fix return value for n_directory_deleteDavid Bremner
Falling out of the catch meant the error return was lost
2020-08-03test: known broken test for n_directory_delete with closed db.David Bremner
There is a return value bug in notmuch_directory_delete that is hiding the exception.
2020-08-03lib: catch exceptions in n_directory_get_child_filesDavid Bremner
Also clarify API in error case.
2020-08-03test: add known broken test for n_directory_get_child_filesDavid Bremner
This is a clone of the one for get_child_directories
2020-08-03lib: catch exceptions in n_directory_get_child_directoriesDavid Bremner
Also clarify API in error case.
2020-08-03test: add known broken test for n_directory_get_child_directoriesDavid Bremner
Start a new test file (for the notmuch_directory_* API group) to hold this test.
2020-08-03test: regression test for n_m_get_filenamesDavid Bremner
Closing the database after the iterator is created is not a problem.
2020-08-03test: split header for lib-message tests.David Bremner
This allows finer control over when to close the database.
2020-08-03test: add regression test for n_messages_collect_tagsDavid Bremner
Also test n_messages_destroy.
2020-08-03lib: return NULL from n_d_get_default_indexopts on errorDavid Bremner
This is a rare and probably serious programming error, so better not to silently return a default value.
2020-08-03build: upload html docs as part of release processDavid Bremner
Use a URL https://notmuchmail.org/doc/latest to leave room for a future more ambitious scheme deploying multiple versions. This also forces the html docs to built as part of the release process. In the future this should be updated to tolerate generating a release without sphinx installed. This needs a new target analogous to build-info and build-man that does nothing if sphinx is not installed.
2020-08-01test: drop use of db_endingDavid Bremner
This will allow the dropping of the test for the default ending from configure.
2020-07-31test: drop NOTMUCH_DEFAULT_XAPIAN_BACKEND from T360-symbol-testDavid Bremner
Inspired by the suggestion of id:20200727154108.16269-3-congdanhqx@gmail.com to drop the configuration test for the default backend. This version is hopefully robust against backend changes.
2020-07-31test: destroy thread from closed databaseDavid Bremner
Check for (non)-crash.
2020-07-31test: regression test for n_thread_get_tagsDavid Bremner
Code is taken from the API docs, with the twist that the underlying database is closed. Not crashing is the main point.
2020-07-31test: add regression tests for oldest and newest datesDavid Bremner
These are strictly to watch for crashes, so don't be too fussy about the actual timestamps.
2020-07-31test: add regression tests for n_t_get_{authors, subject}David Bremner
This is returning explicitely cached data, so no database access is needed.
2020-07-31test: add regression test for n_t_get_messagesDavid Bremner
This is similar to the case of toplevel messages. Currently everything is cached, so no database access is necessary. This might change in the future, but it should not crash in either case.
2020-07-31test: add regression tests for n_thread_get_toplevel_messagesDavid Bremner
Include a test for the previously omitted non-trivial code path for notmuch_thread_get_replies.
2020-07-31test: add regression test for n_thread_get_total_{messages,files}David Bremner
This is returning cached info, so does not need to access the (closed) database.