aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-04-11emacs: hello: add a customize for saved-searchesMark Walters
Make the defcustom for notmuch-saved-searches use the new plist format. It should still work with oldstyle saved-searches but will write the newstyle form.
2014-04-11emacs: hello: use the saved-search helper functionsMark Walters
This uses the helper functions: the saved searches format has not changed yet but backwards compatibility means everything still works.
2014-04-11emacs: hello: add helper functions for saved-searchesMark Walters
Add helper functions to for saved searches to ease the transition to the new plist form while maintaining backwards compatibility. They will be used in the next patch.
2014-04-10emacs: defun notmuch-hello-versions and bind 'v' in hello mode to itTomi Ollila
If notmuch cli & notmuch emacs MUA versions differ, print also the emacs MUA version string (along with the cli version) to the minibuffer.
2014-04-10emacs: add notmuch-version.el.tmpl and create notmuch-version.el from itTomi Ollila
The notmuch cli program and emacs lisp versions may differ (especially in remote usage). It helps to resolve problems if we can determine the versions of notmuch cli and notmuch emacs mua separately. The build process now creates notmuch-version.el from template file by filling the version info to notmuch-emacs-version variable.
2014-04-10build: write version.stamp file containing $(VERSION) stringTomi Ollila
This version file will be as prerequisite to the target files that use the version info for some purpose, like printing it for the user to examine. The contents of the version.stamp file is seldom read by the build system itself as the $(VERSION) variable has the same information. Thanks to Trevor, David and Mark for their contributions.
2014-04-08nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}W. Trevor King
With two branches getting fetched (master and config), the branch referenced by FETCH_HEAD is ambiguous. For example, I have: $ cat FETCH_HEAD 41d7bfa7184cc93c9dac139d1674e9530799e3b0 \ not-for-merge branch 'config' of http://nmbug.tethera.net/git/nmbug-tags acd379ccb973c45713eee9db177efc530f921954 \ not-for-merge branch 'master' of http://nmbug.tethera.net/git/nmbug-tags (where I wrapped the line by hand). This means that FETCH_HEAD references the config branch: $ git rev-parse FETCH_HEAD 41d7bfa7184cc93c9dac139d1674e9530799e3b0 which breaks all of the FETCH_HEAD logic in nmbug (where FETCH_HEAD is assumed to point to the master branch). Instead of relying on FETCH_HEAD, use @{upstream} as the remote-tracking branch that should be merged/diffed/integrated into HEAD. @{upstream} was added in Git v1.7.0 (2010-02-12) [1], so relying on it should be fairly safe. One tricky bit is that bare repositories don't set upstream tracking branches by default: $ git clone --bare http://nmbug.tethera.net/git/nmbug-tags.git nmbug-bare $ cd nmbug-bare $ git remote show origin * remote origin Fetch URL: http://nmbug.tethera.net/git/nmbug-tags.git Push URL: http://nmbug.tethera.net/git/nmbug-tags.git HEAD branch: master Local refs configured for 'git push': config pushes to config (up to date) master pushes to master (up to date) While in a non-bare clone: $ git clone http://nmbug.tethera.net/git/nmbug-tags.git $ cd nmbug-tags $ git remote show origin * remote origin Fetch URL: http://nmbug.tethera.net/git/nmbug-tags.git Push URL: http://nmbug.tethera.net/git/nmbug-tags.git HEAD branch: master Remote branches: config tracked master tracked Local branch configured for 'git pull': master merges with remote master Local ref configured for 'git push': master pushes to master (up to date) From the clone docs [2]: --bare:: Make a 'bare' Git repository… Also the branch heads at the remote are copied directly to corresponding local branch heads, without mapping them to `refs/remotes/origin/`. When this option is used, neither remote-tracking branches nor the related configuration variables are created. To use @{upstream}, we need to the local vs. remote-tracking distinction, so this commit adds 'nmbug clone', replacing the previously suggested --bare clone with a non-bare --no-checkout --separate-git-dir clone into a temporary work directory. After which: $ git rev-parse @{upstream} acd379ccb973c45713eee9db177efc530f921954 gives us the master-branch commit. Existing nmbug users will have to run the configuration tweaks and re-fetch by hand. If you don't have any local commits, you could also blow away your NMBGIT repository and re-clone from scratch: $ nmbug clone http://nmbug.tethera.net/git/nmbug-tags.git Besides removing the ambiguity of FETCH_HEAD, this commit allows users to configure which upstream branch they want nmbug to track via 'git config', in case they want to change their upstream repository. [1]: http://git.kernel.org/cgit/git/git.git/tree/Documentation/RelNotes/1.7.0.txt [2]: http://git.kernel.org/cgit/git/git.git/tree/Documentation/git-clone.txt
2014-04-08release-checks: removed manual page version checkTomi Ollila
Manual pages are now generated and during the generation the version string is read from `version` file, so this (currently failing) test checking manual page versions can be removed. While at it, changed the case pattern *[^0-9.]* to its portable alternative *[!0-9.]*
2014-04-08doc: added 'Init File' section to notmuch-emacs info sourceTomi Ollila
While adding that fixed (also other) typos noticed by aspell(1) run, and capitalized Emacs and (most) Notmuch terms to match how emacs Info documentation seems to look in general.
2014-04-08doc: move doxgen config from devel/ to doc/David Bremner
a first step towards actually instally the API docs
2014-04-08compat: add canonicalize_file_nameDavid Bremner
the POSIX 2008 behaviour of realpath is not available everywhere so we provide a simple wrapper function. We use (and provide) the gnu extension canonicalize_file_name to make it cleaner to test for the feature we need; otherwise we have to rely on realpath segfaulting if the second argument is null.
2014-04-08debian: add build conflicts against ruby1.8David Bremner
Debian stable has ruby 1.9, so this should be OK. The issue is that the ruby bindings don't build if "ruby" points to ruby1.8
2014-04-06debian: really delete madduck from uploadersDavid Bremner
I'm not sure how it got into debian/changelog without actually happening, but actually delete martin from debian/control per request in Debian bug #719100
2014-04-05debian: ignore performance corpus when making source packageDavid Bremner
Currently "make debian-snapshot" will include the performance corpus tarball in the source package, which slows things down and wastes disk space. tar-ignore is needed twice to keep the default exclude rules (e.g. to exclude .git)
2014-04-05lib: replace the header parser with gmimeJani Nikula
The notmuch library includes a full blown message header parser. Yet the same message headers are parsed by gmime during indexing. Switch to gmime parsing completely. These are the main changes: * Gmime stops header parsing at the first invalid header, and presumes the message body starts from there. The current parser is quite liberal in accepting broken headers. The change means we will be much pickier about accepting invalid messages. * The current parser converts tabs used in header folding to spaces. Gmime preserve the tabs. Due to a broken python library used in mailman, there are plenty of mailing lists that produce headers with tabs in header folding, and we'll see plenty of tabs. (This change has been mitigated in preparatory patches.) * For pure header parsing, the current parser is likely faster than gmime, which parses the whole message rather than just the headers. Since we parse the message and its headers using gmime for indexing anyway, this avoids and extra header parsing round when adding new messages. In case of duplicate messages, we'll end up parsing the full message although just headers would be sufficient. All in all this should still speed up 'notmuch new'. * Calls to notmuch_message_get_header() may be slightly slower than previously for headers that are not indexed in the database, due to parsing of the whole message. Within the notmuch code base, notmuch reply is the only such user.
2014-04-05lib: drop support for single-message mbox filesJani Nikula
We've supported mbox files containing a single message for historical reasons, but the support has been deprecated, with a warning message while indexing, since Notmuch 0.15. Finally drop the support, and consider all mbox files non-email.
2014-03-30cli: abstract dump file open from the dump commandJani Nikula
Also expose the dump function to the rest of notmuch. No functional changes, except for slight improvement in error handling.
2014-03-30cli: abstract database dumping from the dump commandJani Nikula
No functional changes, except for slight improvement in error handling.
2014-03-30emacs: push mark before signature on replyJani Nikula
We push mark on reply so user can cut the quote. Push the mark before signature, if any, instead of end of buffer so the signature is preserved. This is consistent with message-kill-to-signature.
2014-03-30emacs: add defcustom notmuch-init-file and load it if existsTomi Ollila
So that users can easily organize their notmuch-specific configurations to separate file and they don't have to have notmuch configurations in *every* emacs installation they launch, especially if those need to '(require notmuch) to make the configurations possible.
2014-03-30emacs: instruct user to autoload notmuch instead of require'ing itTomi Ollila
When (require 'notmuch) is added to ~/.emacs notmuch is loaded to every instance of emacs although it may not be used in majority of those instances. When (autoload 'notmuch "notmuch" ...) is added to ~/.emacs notmuch is loaded (only) when user invokes the notmuch function. User may want to add other entrypoints to notmuch by adding more autoloads -- the autoload instruction given should offer them clue how to do so.
2014-03-27cli: fix notmuch help additional topicsJani Nikula
The help for hooks was missing.
2014-03-26test: conditionally test help system depending on configured supportJani Nikula
If neither sphinx nor rst2man is available, the notmuch man pages will not be available. Take this into account in the help system test.
2014-03-25cli: Flush stdout before fork()ing to run hooksAustin Clements
Without this flush, if stdout is block buffered (which will happen if it's a pipe or a file, for example) and the hook also writes to stdout, then notmuch new's output will appear *after* the hook output. This situation may be a little esoteric, but it's good practice to flush before you fork anyway.
2014-03-25cli: sanitize the received header before scanning for repliesJani Nikula
This makes the from guessing agnostic to header folding by spaces or tabs.
2014-03-25completion: complete directory parameters to directories onlyJani Nikula
i.e. don't complete to files if only directories are acceptable.
2014-03-25completion: add proper completion of folder: and path:Jani Nikula
Complete folder: to maildir folders and path: to directories in mail store.
2014-03-25emacs: Use whitelist instead of blacklist for term escapingAustin Clements
Previously, the term escaper used a blacklist of characters that needed escaping. This blacklist turned out to be somewhat incomplete; for example, it did not contain non-whitespace ASCII control characters or Unicode "fancy quotes", both of which do require the term to be escaped. Switch to a whitelist of characters that are definitely safe to leave unquoted. This fixes the broken test introduced by the previous patch.
2014-03-25test: Add broken test for Emacs boolean term escapingAustin Clements
The current term escaper gets most of these right, but fails to escape things containing Unicode "fancy quotes" or things containing non-whitespace control characters.
2014-03-25test: conditionally test compact depending on configured supportJani Nikula
I still have one machine with old enough Xapian to not have compaction support. Make the tests check for unsupported compact operation when compact is not available.
2014-03-25doc: fix out-of-tree buildDavid Bremner
The subtle part is adding .rst and .py files to vpath so they can be used as dependencies without prefixing with $(srcdir) We also change the interface to mkbuildeps.py: rather than getting the containing directory from the conf file path, we go the other way.
2014-03-25test: use $(srcdir) instead of . as include pathDavid Bremner
This is needed for out of tree builds. The functional change is the modification of extra_cflags; the other changes are cosmetic.
2014-03-25build: move canonical list of subdirectories to configure scriptDavid Bremner
The configure script needs this list for out of tree builds. Grabbing it from the Makefile via sed was fragile and broken.
2014-03-24emacs: tree: use orig-tags in searchMark Walters
This uses the recent functionality to show the tag changes in the tree buffer. Currently this is only used to show changes the tree buffer makes itself: i.e., it does not make display any changes reflecting tagging done by other notmuch-buffers.
2014-03-24emacs: search: use orig-tags in searchMark Walters
This uses the recent functionality to show the tag changes in the search buffer. Currently this is only used to show changes the search buffer makes itself: i.e., it does not make display any changes reflecting tagging done by other notmuch-buffers.
2014-03-24emacs: show: use orig-tags for tag displayMark Walters
This uses the previous patch to show the tag changes that have occured in the show buffer since it was last loaded/refreshed.
2014-03-24emacs: show: mark tags changed since buffer loadedMark Walters
This allows (and requires) the original-tags to be passed along with the current-tags to be passed to notmuch-tag-format-tags. This allows the tag formatting to show added and deleted tags.By default a removed tag is displayed with strike-through in red (if strike-through is not available, eg on a terminal, inverse video is used instead) and an added tag is displayed underlined in green. If the caller does not wish to use the new feature it can pass current-tags for both arguments and, at this point, we do exactly that in the three callers of this function. Note, we cannot tidily allow original-tags to be optional because we would need to distinguish nil meaning "we are not specifying original-tags" from nil meaning there were no original-tags (an empty list). We use this in subsequent patches to make it clear when a message was unread when you first loaded a show buffer (previously the unread tag could be removed before a user realised that it had been unread). The code adds into the existing tag formatting code. The user can specify exactly how a tag should be displayed normally, when deleted, or when added. Since the formatting code matches regexps a user can match all deleted tags with a ".*" in notmuch-tag-deleted-formats. For example setting notmuch-tag-deleted-formats to '((".*" nil)) tells notmuch not to show deleted tags at all. All the variables are customizable; however, more complicated cases like changing the face depending on the type of display will require custom lisp. Currently this overrides notmuch-tag-deleted-formats for the tests setting it to '((".*" nil)) so that they get removed from the display and, thus, all tests still pass.
2014-03-24emacs: tag: add customize for deleted/added tag formatsMark Walters
Add customize options for deleted/added tag formats. These are not used yet but will be later in the series. We switch to using `notmuch-apply-face' rather than `propertize' in the defcustom for faces so that the faces for deleted/added tags add to the default face attributes for the tag. We special case deleting the unread tag as that tag is a strong visual cue and we don't need that cue when we are just saying it used to be unread. Thus, we revert to the normal tag face with strikethough for deleted unread tags.
2014-03-24emacs: tag split customise option for format-tags into a widgetMark Walters
We will re-use the customize option for format-tags for formattting deleted tags to added tags in the next patch so split it into a widget. There should be no functional change.
2014-03-24Make keys of notmuch-tag-formats regexps and use cachingAustin Clements
This modifies `notmuch-tag-format-tag' to treat the keys of `notmuch-tag-formats' as (anchored) regexps, rather than literal strings. This is clearly more flexible, as it allows for prefix matching, defining a fallback format, etc. This may cause compatibility problems if people have customized `notmuch-tag-formats' to match tags that contain regexp specials, but this seems unlikely. Regular expression matching has quite a performance hit over string lookup, so this also introduces a simple cache from exact tags to formatted strings. The number of unique tags is likely to be quite small, so this cache should have a high hit rate. In addition to eliminating the regexp lookup in the common case, this cache stores fully formatted tags, eliminating the repeated evaluation of potentially expensive, user-specified formatting code. This makes regexp lookup at least as fast as assoc for unformatted tags (e.g., inbox) and *faster* than the current code for formatted tags (e.g., unread): inbox (usec) unread (usec) assoc: 0.4 2.8 regexp: 3.2 7.2 regexp+caching: 0.4 0.4 (Though even at 7.2 usec, tag formatting is not our top bottleneck.) This cache must be explicitly cleared to keep it coherent, so this adds the appropriate clearing calls.
2014-03-24emacs: Combine notmuch-combine-face-text-property{, -string}Austin Clements
This combines our two face combining functions into one, easy to use function with a much shorter name: `notmuch-apply-face'. This function takes the full set of arguments that `notmuch-combine-face-text-property' took, but takes them in a more convenient order and provides smarter defaults that make the function easy to use on both strings and buffers.
2014-03-23nmbug-status: make output title and blurb configurableJani Nikula
Make nmbug-status more generally usable outside of nmbug by not hardcoding notmuch related things. This lets anyone publish html search views to mailing list messages with a custom config file, independent of nmbug.
2014-03-23nmbug-status: parameterize title and blurb in the page headerJani Nikula
Prepare for more general use.
2014-03-23emacs: add path: prefix to query completionJani Nikula
Complete to the new path: prefix.
2014-03-18doc: cosmetic fix for prerst2man.pyDavid Bremner
Fix a particular egregious combination of format and string concatenation.
2014-03-18doc: configure detection of sphinx and rst2manDavid Bremner
Because sphinx-build does not provide a convenient way of listing which builders exist, and some people actually have pre 1.0 sphinx, we try loading a relevant python module. Currently the assumption is that no python in path -> no sphinx-build in path.
2014-03-18doc: build man pages into hierarchy, fix help test.David Bremner
It turns out there was a reason the old man pages were stored in a man compatible hierarchy, namely so that we could run man on them before installing. Hardcode doc build location into test suite. This isn't ideal, but let's unbreak the test suite for now.
2014-03-18doc: build man pages at build time; introduce HAVE_SPHINX, HAVE_RST2MANDavid Bremner
This helps avoid build artifacts (namely, nroff and gzipped-nroff man pages) owned by root. The variables allow choosing which generator to use for the man page. These will be hooked to configure in a following commit.
2014-03-15util: Fix two corner-cases in boolean term quoting functionAustin Clements
Previously, make_boolean_term did not quote empty boolean terms or boolean terms that started with '('. These cases are incompatible with Xapian: empty terms cannot be omitted, and boolean terms that start with '(' trigger an alternate term quoting syntax. Fix this by quoting empty terms and terms that contain '('.
2014-03-14perf-test: use command line arguments for directoriesDavid Bremner
It seems that between version 1.26 and 1.27 of gnu tar, directories to be extracted read with --files-from are no longer recursively extacted. This patch puts them on the command line instead.