aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* notmuch show: Preserve thread-ordering and nesting without --entire-threadCarl Worth2009-12-02
| | | | | | | | | | | | | | | | | | | | | | | | When "notmuch show" was recently modified to not show an entire thread by default, it also lost all capability to properly order the messages in a thread and to print their proper depth. For example, the command: notmuch show thread:6d5e3e276461188c5778c9f219f63782 had dramatically different output than: notmuch show --entire-thread thread:6d5e3e276461188c5778c9f219f63782 even though both commands were selecting and displaying the same set of messages. The first command would diplay them "flat", (all with depth:0), and in strict date order; while the second command would display them "nested" (with depth based on threading), and in thread order. We now fix "notmuch show" without the --entire-thread option to also display nested and thread-ordered messages. If some messages in the thread are not included in the displayed results, then they are not counted when computing depth values.
* notmuch.1: Document the new --entire-thread option to "notmuch show".Carl Worth2009-12-02
| | | | | This was added to "notmuch help" earlier, but not to the man page. Add it there, and use consistent wording in both places.
* emacs: Add --entire-thread option to "notmuch show" command line.Carl Worth2009-12-02
| | | | | We (plan to) do any hiding of messages from within emacs, so don't let notmuch hide messages from us.
* vim: use notmuch show --entire-threadBart Trojanowski2009-12-02
|
* notmuch show: limit display to only matching messagesBart Trojanowski2009-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the default behaviour of notmuch show to display only messages that match the search expression. However, --entire-thread option is provided to display all messages in threads that matched the search expression. It is deemed that will be more useful for human users on the command line. Scripts can be modified to include the --entire-thread option so that they can display all messages once more. Example: $ notmuch search subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b thread:23d99d0f364f93e90e15df8b42eddb5b July 31 [4/12] Johan Herland; [RFCv2 00/12] Foreign VCS helper program for CVS repositories (inbox unread) Note that in this thread 4 out of 12 messages matched. The default show behaviour is to show only those messages that match: $ notmuch show subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b | grep 'message{' | wc -l 4 With the --entire-thread option the output will contain all dozen messages: $ notmuch show --entire-thread subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b | grep 'message{' | wc -l 12 Signed-off-by: Bart Trojanowski <bart@jukie.net>
* configure: Allow user to specify compiler to be used.Carl Worth2009-12-01
| | | | | | | | | | | | The environment variables CC and CXX can be set at configure time to specify what compiler to use. This compiler will be used for any configure-time compilation, and will also be recorded in Makefile.config to be used during the actual build. The compiler to be used can still be overridden at build time by using a make variable such as: make CC=gcc
* configure: Generate more friendly Makefile.config with separated CFLAGSCarl Worth2009-12-01
| | | | | | Each dependency now gets its own variable in the resulting Makefile.config to make it much easier to debug where the various flags came from in the case of any problems.
* configure: Clarify pkg-config warning now that Makefile does not invoke ↵Carl Worth2009-12-01
| | | | | | | | pkg-config. It's probably a bit more work to use this configure script without pkg-config, but it's at least possible, (and we could make it even easier if this becomes an important use case).
* configure: Generate some documentation into Makefile.config.Carl Worth2009-12-01
| | | | | It's just not nice to auto-generate a file without helping out the poor user who gets stuck trying to figure out what went wrong.
* configure: Resolve all pkg-config flags at configure time.Carl Worth2009-12-01
| | | | | | | | Previously, we were resolving these within the Makefile. This had the problem that if pkg-config was not present, the Makefile would still invoke it resulting in ugly errors before the configure script was even run, (which would finally present a kind error message about pkg-config not being present).
* configure: Move getlinetest.c down into config/have_getline.c.Carl Worth2009-12-01
| | | | | | This keeps configure-related clutter out of the main directory, and also gives a more direct correlation between the name of the test and the feature being tested for.
* getdelim: Silence a (bogus) compiler warning.Carl Worth2009-12-01
| | | | | | Some compilers complain that result might be used uninitialized in this function. I believe such compilers simply aren't looking hard enough, but it's easy enough to silence them.
* Makefile: Split warnings into two sets (WARN_CFLAGS and WARN_CXXFLAGS)Carl Worth2009-12-01
| | | | | Some C++ compilers complain about -Wmissing-declarations not being valid, so avoid passing it except when compiling a C file.
* Makefile: Switch from echo to printf for better portability.Carl Worth2009-12-01
| | | | | | Some systems have an echo implementation which doesn't know how to interpret a sequence of "\n". The word is that printf should be much more portable, so let's try that instead.
* configure: Assimilate new getlinetest into recent configure conventions.Carl Worth2009-12-01
| | | | | | | | | We're now using printf to print what we're checking before we check. We're also making variables such as HAVE_GETLINE available to both make and to the C pre-processor. With this, the local getline implementation is now only compiled if not available on the system.
* Add test to configure script to detect getlineJeffrey C. Ollie2009-12-01
| | | | | | | | Add a simple test to the configure script to detect getline. It's not important that the test run, just that it compiles and links without any errors. Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
* configure: Fix valgrind check to take effect, and to work.Carl Worth2009-12-01
| | | | | | | We were missing an "override" directive in the assignment of CFLAGS within Makefile.config so it was actually having no effect. Then, we were also failing to get the proper include path for valgrind.h so it wouldn't have worked even it were having effect. Fix both problems.
* Makefile: Incorporate getline implementation into the build.Carl Worth2009-12-01
| | | | | It's unconditional for a very short time. We expect to soon be building it only if necessary.
* compat/getdelim: Silence a warning about mixing of signed/unsigned.Carl Worth2009-12-01
| | | | | If the length is ever so large as to overflow, then we'll end up returning a negative value (which indicates an error anyway).
* compat: Change includes from config.h to compat.h.Carl Worth2009-12-01
| | | | | We may switch to using an autoconf-like config.h, but we're not doing that just yet.
* compat: Add implementation of getline from gnulib.Carl Worth2009-12-01
| | | | | | | | | These were copied from the gnulib git repository as of: commit 563c779682040ed4b89c9b4bbe428dcd8157c90a They come under the GNU GPL v3 (or later) exactly as notmuch is licensed.
* xutil: Implement xstrndup without relying on strndup.Carl Worth2009-12-01
| | | | | | | | Since we need to do this for portability, (some systems don't have a strndup function), we might as well do it unconditionally. There's almost no disadvantage to doing so, and this has the advantages of not requiring a configure-time check nor having two different implementations, one of which would often be less tested.
* lib/index: Fix memory leak for email addresses without names.Carl Worth2009-12-01
| | | | | | | | We carefully noted the fact that we had locally allocated the string here, but then we neglected to free it. Switch to talloc instead which makes it easier to get the behavior we want. It's simpler since we can just call talloc_free unconditionally, without having to track the state of whether we allocated the storage for name or not.
* configure: Use printf to achieve result of "echo -n".Carl Worth2009-12-01
| | | | | | | We had avoided using "echo -n" originally for portability concerns, and instead just printed the same string in both conditions, (and also printed the string late if any check took long). The word is that printf is quite portable, so we use that instead.
* Makefile: Add new "install-bash" target for bash completion supportCarl Worth2009-12-01
| | | | | | | It was problematic to have this in "make install" since it would unconditionally try to install to /etc, (even if a non-privileged user was attempting an install to a prefix in the user's home directory, for example).
* configure: Fix pkg-config warning to not refer to non-existent variables.Carl Worth2009-12-01
| | | | | We used to have NOTMUCH_CFLAGS and NOTMUCH_LDFLAGS in the Makefile, but we don't anymore, so don't refer to them.
* configure: Clean up the introductory message a bit.Carl Worth2009-12-01
| | | | | Eliminate a typo or two, and mention that the user can edit Makefile.config if necessary.
* Remove Makefile.config from the repository.Carl Worth2009-12-01
| | | | | Instead of shipping a default version, we now add a rule to automatically run configure if necessary to create Makefile.config.
* notmuch setup: Exit if EOF is encountered at any prompt.Carl Worth2009-12-01
| | | | | | | If the user is explicitly providing EOF, then terminating the program is the most likely desired thing to do. This also avoids undefined behavior from continuing with an uninitialized response after ignoring the return value of getline().
* Avoid compiler warnings due to ignored write return valuesDirk-Jan C. Binnema2009-12-01
| | | | | | | | | | | | | Glibc (at least) provides the warn_unused_result attribute on write, (if optimizing and _FORTIFY_SOURCE is defined). So we explicitly ignore the return value in our signal handler, where we couldn't do anything anyway. Compile with: make CFLAGS="-O -D_FORTIFY_SOURCE" before this commit to see the warning.
* notmuch.el: Make 'x' and 'X' in show-mode archive the current thread.Carl Worth2009-11-30
| | | | | | | | | This makes these keys different than 'q' in this mode, (where 'x' and 'q' are identical in all of the other modes currently). The idea here is to make it easier to do non-linear reading of messages, (such as when poking in to read just one or two threads from a search result that returned many threads).
* notmuch.el: Use let to avoid assigning to a free variable.Carl Worth2009-11-30
| | | | | | The dynamic scoping of emacs lisp is such that we never want to assign to any variable unless it's something we've defined with `defvar' or else something we're using locally via `let'.
* notmuch.el: Avoid warning about referencing free variable `button'.Carl Worth2009-11-30
| | | | | I'm not even sure how the previous code worked at all---it seems clear it was supposed to be using `cite-button' rather than `button'.
* notmuch.el: Avoid calling next/previous-line non-interactively.Carl Worth2009-11-30
| | | | Emacs always complains if we use these from lisp code.
* notmuch.el: Make notmuch-help use a full-screen window.Carl Worth2009-11-30
| | | | | | | Our documentation is long enough that I think it will be more useful to use an entire window for it (which is easily dismissed with 'q'). This is also kinder for a user not well-initiated with emacs, for whom the multi-window help can be confusing.
* notmuch.el: Make documentation of notmuch-search-mode dynamic.Carl Worth2009-11-30
| | | | | | | | Previously, we had some hard-coded keybindings mentioned in the introductory paragraphs of the documentation for notmuch-search-mode. Now, we take advantage of the substitute-command-keys functionality to produce the same text by default, but to dynamically generate the correct text in the face of the user customizing the keybindings.
* notmuch.el: Clean up documentation of notmuch-folder-mode-map commands.Carl Worth2009-11-30
| | | | | | Again, ensuring we have standalone first-line documentation strings, and overriding builtin commands to add our own documentation strings to them.
* notmuch.el: Clean up documentation of notmuch-show-mode-map commands.Carl Worth2009-11-30
| | | | | | | | | | As we did recently for notmuch-search-mode-map, ensure that the first line of docuemntation for each command stands alone. We also take advantage of the substitute-command-keys functionality within notmuch-help so that the introductory paragraphs can talk about key bindings by key (rather than function name) in a way that will always be current even in the face of the user rebinding keys.
* notmuch.el: Fix notmuch-help to properly display prefixed bindings.Carl Worth2009-11-30
| | | | | | | | | | | Previously, we would do only a single-level traverse of the keymap. That meant that for a keybinding such as "M-TAB" we would just see the prefix key ("ESC") and print that it was a keymap---never printing the TAB nor the documentation for the command it is bound to. Now, we do the full walk, constructing a proper description of the full keybdinding with prefix characters, (and converting "ESC" to "M-" for legibility).
* notmuch.el: Clean up documentation of notmuch-search-mode-map commands.Carl Worth2009-11-30
| | | | | | | | | | | Since notmuch-help now displays a single line of documentation from each of these commands we ensure that the first line stands alone for each command. We also override some builtin commands with new commands that don't behave any differently, but have our own notmuch-specific documentation, (such as "select next thread" rather than "move point to next line").
* notmuch.el: Fix notmuch-search-goto-last-thread.Carl Worth2009-11-30
| | | | | | This broke when we switched to filter-based processing of search results and added the "End of search results" line onto the end. Fix to skip ignore that line when moving to the last thread.
* notmuch.el: Fix notmuch-search-scroll-down to go to first thread.Carl Worth2009-11-30
| | | | | | | | When there's no more to scroll, we want to select the first thread. This used to work, and I'm not sure when it broke, (perhaps when we switched from post-process decorating of the search results to filtering). Fix the calculation to work again.
* notmuch.el: Don't document mouse actions in notmuch-help.Carl Worth2009-11-30
| | | | | | | | | | The concept behind direct manipulation with mouse clicks is that documentation shouldn't be necessary, (though my original motivation here was simply that "<mouse-1>" was exceeding my TAB width. This does cause a blank line to be added for the mouse binding. This isn't directly desired, but as long as it's there we put it at a natural place for a separator.
* notmuch.el: Reorder notmuch-search-mode keybindings map.Carl Worth2009-11-30
| | | | | | | I had originally created this keymap in order from most important to least important commands. But our new notmuch-help command is presented with the list in the reverse order. So we reverse the input so that the user sees the most important commands first.
* notmuch.el: Implement our own notmuch-help instead of describe-mode.Carl Worth2009-11-30
| | | | | | | | This gives somewhat friendlier output for the '?' binding than we had previously with `describe-mode'. First, we no longer have the various minor modes cluttering up the output. Second the display of the binding table uses the first line of documentation for the bound function rather than the function name.
* notmuch.el: Add documentation for notmuch-search-show-thread.Carl Worth2009-11-30
| | | | | It's especially unkind to leave interactive functions without documentation.
* notmuch.el: Don't use beginning-of-buffer from elisp program.Carl Worth2009-11-30
| | | | | | This silences a warning when compiling notmuch.el. The documentation of beginning-of-buffer does say (rather emphatically) that it's not to be used from lisp programs.
* Documentation for notmuch reply --format=(default|headers-only)Jed Brown2009-11-28
| | | | Signed-off-by: Jed Brown <jed@59A2.org>
* More portable and easier to read regex in notmuch-search-operate-allJed Brown2009-11-28
| | | | | | | The former one worked in 23.1.50.1 but not in 23.1.1. Signed-off-by: Jed Brown <jed@59A2.org> Tested-by: Keith Packard <keithp@keithp.com>
* Avoid bogus internal error reporting duplicate In-Reply-To IDs.Carl Worth2009-11-28
| | | | | | | | | | | | | This error was tirggered with a debugging build via: make CXXFLAGS="-DDEBUG" and reported by David Bremner. The actual error is that I'm an idiot that doesn't know how to use strcmp's return value. Of course, the strcmp interface scores a negative 7 on Rusty Russell ranking of bad interfaces: http://ozlabs.org/~rusty/index.cgi/tech/2008-04-01.html