Carl Worth [Tue, 6 Apr 2010 18:12:10 +0000 (11:12 -0700)]
Move "config" test programs to "compat".
It makes sense to me to have the little tests for functionality right
next to the comptability implementations of that same functionality.
But also, this means I can now tab-complete ./configure from the three
initial characters (rather than the seven required previously).
Carl Worth [Tue, 6 Apr 2010 18:02:09 +0000 (11:02 -0700)]
Makefile: Move the completion-specific commands to completion/Makefile.local
For much better modularity.
Carl Worth [Tue, 6 Apr 2010 17:48:21 +0000 (10:48 -0700)]
Rename the "contrib" directory to "completion".
The original "contrib" name is lousy. Everything in notmuch has been
contributed, and we are integrating as much of it as possible, (rather
than making users grub through contrib looking for useful pieces to
install).
Meanwhile, the only things we have in contrib are command-line
completion scripts, so "completion" makes more sense as a name, (and
helps make "./configure" slightly less ambiguous).
Carl Worth [Tue, 6 Apr 2010 17:43:36 +0000 (10:43 -0700)]
.gitignore: Ignore the releases directory.
The "make release" target creates this directory, but it's nothing
I'll ever want to add to the git repository.
Carl Worth [Tue, 6 Apr 2010 17:40:45 +0000 (10:40 -0700)]
Makefile: Eliminate the separate install-bash and install-zsh targets.
Again, simplifying the interface to the Makefile. Installing these
files doesn't require bash nor zsh to actually be installed, so there's
little harm in just installing them unconditionally.
Carl Worth [Tue, 6 Apr 2010 17:35:20 +0000 (10:35 -0700)]
Makefile: Eliminate the "make install-emacs" target.
Instead, simply byte-compile the emacs source files as part of "make"
and install them as part of "make install". The byte compilation is
made conditional on the configure script finding the emacs binary.
That way, "make; make install" will still work for someone that doesn't
have emacs installed, (which was the only reason we had made a separate
"make install-emacs" target in the first place).
Carl Worth [Tue, 6 Apr 2010 17:00:30 +0000 (10:00 -0700)]
Makefiles: Eliminate the useless quiet_* functions.
With the original quiet function, there's an actual purpose (hiding
excessively long compiler command lines so that warnings and errors
from the compiler can be seen).
But with things like quiet_symlink there's nothing quieter. In fact
"SYMLINK" is longer than "ln -sf". So all this is doing is hiding the
actual command from the user for no real benefit.
The only actual reason we implemented the quiet_* functions was to be
able to neatly right-align the command name and left-align the arguments.
Let's give up on that, and just left-align everything, simplifying the
Makefiles considerably. Now, the only instances of a captialized command
name in the output is if there's some actually shortening of the command
itself.
Carl Worth [Mon, 5 Apr 2010 22:43:51 +0000 (15:43 -0700)]
Makefile: Finish implementing the "make release" target.
And hopefully it actually works.
Carl Worth [Mon, 5 Apr 2010 22:26:08 +0000 (15:26 -0700)]
Makefile: Start implementing a "make release" target.
So far just doing checks that the version is sane and that no release
of the same version already exists.
Carl Worth [Mon, 5 Apr 2010 22:01:27 +0000 (15:01 -0700)]
NEWS: Add some (brief) news items for the initial 0.1 release.
Generally, the NEWS items will describe changes since the previous
release. But there's not much we can do for that since we've never had
a release before.
Carl Worth [Mon, 5 Apr 2010 22:00:37 +0000 (15:00 -0700)]
RELEASING: Add this file describing the steps to make a release.
These steps might be changing a bit as we work on making the initial
0.1 release.
Carl Worth [Mon, 5 Apr 2010 21:22:00 +0000 (14:22 -0700)]
Makefile: Add a dist target.
To create a versioned tar file for release.
Carl Worth [Mon, 5 Apr 2010 19:59:06 +0000 (12:59 -0700)]
Makfiles: Make the top-level targets PHONY
Just to avoid any clash with files of the same names.
David Bremner [Mon, 5 Apr 2010 16:46:16 +0000 (13:46 -0300)]
notmuch-query.el: new file to support access to the notmuch database.
Initially this file provides one main function
notmuch-query-get-threads, which takes a set of search terms, and
returns a parsed set of matching threads as a lisp data structure.
A set of notmuch-query-map-* functions are provided to help map
functions over the data structure.
The function notmuch-query-get-message-ids uses this machinery to get
the set of message-ids matching a query.
Edited-by: Carl Worth <cworth@cworth.org>: Change comment syntax,
(";;" rather than ";" to make emacs-lisp mode happy), and eliminate
some excess whitespace, as suggested by David Edmonson.
David Edmondson [Mon, 5 Apr 2010 09:33:19 +0000 (10:33 +0100)]
notmuch: Correctly terminate text/* parts in JSON output
Text parts returned by `g_mime_stream_mem_get_byte_array()' are not
NULL terminated strings - add `json_quote_chararray()' to handle them
correctly.
David Edmondson [Thu, 1 Apr 2010 17:36:21 +0000 (18:36 +0100)]
git: Ignore `notmuch-shared'
David Edmondson [Thu, 1 Apr 2010 17:36:21 +0000 (18:36 +0100)]
emacs: Move notmuch-show functionality to notmuch-show.el
To ease the transition to a JSON based implementation of
`notmuch-show', move the current implementation into a separate file.
Create `notmuch-lib.el' to hold common variables.
Carl Worth [Sat, 3 Apr 2010 19:42:03 +0000 (12:42 -0700)]
TODO: Add notes on removing "notmuch part" and "notmuch search-tags".
Both of these ideas were recently discussed on the mailing list.
Carl Worth [Sat, 3 Apr 2010 19:22:14 +0000 (12:22 -0700)]
emacs: Fix "free variable" warning for notmuch-folder-show-empty.
Emacs really wants us to defvar each variable before assigning to it,
(which gives us a place to document the variable as well).
David Edmondson [Tue, 23 Mar 2010 07:04:34 +0000 (07:04 +0000)]
emacs/notmuch.el: Improve tag highlighting in search mode
Assume that tags never include an opening bracket, and hence improve
the regular expression used to highlight them. This avoids false
matches where the 'from' address of a thread participant includes an
opening bracket.
David Edmondson [Sun, 21 Mar 2010 09:54:08 +0000 (09:54 +0000)]
Makefile.local: Automatically use makefile mode
We add a magic line to the beginning of each Makefile.local file to
help the editor know that it should use makefile mode for editing the
file, (even though the filename isn't exactly "Makefile").
Edited-by: Carl Worth <cworth@cworth.org>: Expand treatment from
emacs/Makefile.local to each instance of Makefile.local.
David Edmondson [Thu, 1 Apr 2010 10:38:30 +0000 (11:38 +0100)]
Makefile: Add the emacs directory to load-path when compiling
Reviewed-by: Carl Worth <cworth@cworth.org>: Presumably, this is to
enable proper building in the very near-term future where the emacs
implementation consists of multiple files where some will `require'
functions from others.
Carl Worth [Fri, 2 Apr 2010 22:40:13 +0000 (15:40 -0700)]
Merge remote branch 'dme/dme-for-cworth'
Conflicts:
notmuch.c (Simply the change in documentation indentation level).
Carl Worth [Fri, 2 Apr 2010 21:06:32 +0000 (14:06 -0700)]
Makefile: Only print the "make install" hint after the first build.
It was getting quite annoying to see this big block of text on every
little build, (but I didn't want to get rid of it for any new users).
This seems to strike the right balance.
Carl Worth [Fri, 2 Apr 2010 19:26:31 +0000 (12:26 -0700)]
notmuch help: Eliminate a gratuitous level of indentation.
I don't really know why we ended up having everything indented by two
tabs, (perhaps trying to make it match the man page)? But wihout any
containing context to justify that it just looks odd.
Carl Worth [Fri, 2 Apr 2010 19:12:18 +0000 (12:12 -0700)]
notmuch help: Simplify output by omitting arguments for each command.
The output was far too busy otherwise. It's more useful to just
show the argument list in the case of "notmuch help <command>"
for a specific command.
(Credit due to running "git help" and seeing a much more readable
list than what was coming out of "notmuch help".)
Carl Worth [Fri, 2 Apr 2010 18:55:09 +0000 (11:55 -0700)]
notmuch: Add a version (0.1 initially) with a new --version option.
We're planning to do actual releases soon, so we need a version
number to put into the tar file.
Carl Worth [Fri, 2 Apr 2010 18:53:22 +0000 (11:53 -0700)]
notmuch: Add support for a --help option.
Previously, only "notmuch help" worked while a call to "notmuch --help"
would just print a message telling the user to call "notmuch help".
Instead of the redirection, just support --help directly now.
David Edmondson [Wed, 24 Mar 2010 07:21:20 +0000 (07:21 +0000)]
notmuch: Add a 'part' subcommand
A new 'part' subcommand allows the user to extract a single part from
a MIME message. Usage:
notmuch part --part=<n> <search terms>
The search terms must match only a single message
(e.g. id:foo@bar.com). The part number specified refers to the part
identifiers output by `notmuch show'. The content of the part is
written the stdout with no formatting or identification marks. It is
not JSON formatted.
David Edmondson [Tue, 23 Mar 2010 09:40:48 +0000 (09:40 +0000)]
notmuch-show: Add unix and relative dates to the JSON output
Include a 'date_unix' and 'date_relative' field in the JSON output for
each message. 'date_relative' can be used by a UI implementation,
whereas 'date_unix' is useful when scripting.
Carl Worth [Thu, 1 Apr 2010 22:03:40 +0000 (15:03 -0700)]
Compile a static notmuch binary (but only install the shared version)
The idea here is to allow a new user of notmuch to be able to run
notmuch immediately after compiling, (without having to install
the shared library first). This also ensures that the test suite
tests the locally compiled library, and not whatever installled
version of the library the dynamic linker happens to find.
nstraz@redhat.com [Thu, 1 Apr 2010 13:47:21 +0000 (09:47 -0400)]
Setup the GMimeStream only when needed
I ran into this while looking at the vim plugin. Vim's system() call
redirects output to a file and it was missing many of the part{ lines.
If stream_stdout is setup too early, it will overwrite the part start
when notmuch is redirected to a file.
Reviewed-by Carl Worth <cworth@cworth.org>: GMime is calling fseek
before every write to reset the FILE* to the position it believes is
correct based on the writes it has seen. Our code was getting
incorrect results because our GMime writes were interleaved with
non-GMime writes via printf.
The bug appears when writing to a file because it's seekable, but not
when writing to a pipe which is not.
Michal Sojka [Thu, 1 Apr 2010 11:47:45 +0000 (13:47 +0200)]
Makefile: Create include directory when installing headers
When I wanted to create a debian package from the current master, make
install failed because of non-existent include directory. This patch
fixes this minor issue.
Carl Worth [Thu, 1 Apr 2010 07:41:25 +0000 (00:41 -0700)]
lib: Switch to a 3-part version number for the library interface.
With a carefully documented description of how to increment the
various version components.
Carl Worth [Thu, 1 Apr 2010 07:07:08 +0000 (00:07 -0700)]
Makefiles: Align the columns of output.
Much better.
Carl Worth [Thu, 1 Apr 2010 06:54:21 +0000 (23:54 -0700)]
Makefiles: Make the install rules quiet like the compilation rules.
The output from make is looking better all the time, (though the
columns still aren't lined up).
Carl Worth [Thu, 1 Apr 2010 06:32:35 +0000 (23:32 -0700)]
Makefile: Fix to print CFLAGS with "make V=0"
The default "make" would be quite quiet, but still conveniently print
the CFLAGS. The explicit "make V=0" was intended to be identical, (only
not printing the message about V=1 but was broken in that it left the
CFLAGS off). Fix this.
Carl Worth [Thu, 1 Apr 2010 05:59:30 +0000 (22:59 -0700)]
Makefiles: Eliminate shell for loops in rule definitions.
These just made the output look so ugly, and weren't actually making
the rule definitions any simpler. Good riddance.
Carl Worth [Thu, 1 Apr 2010 05:47:12 +0000 (22:47 -0700)]
Move installation of library from top-level to lib/Makefile.local
We had a fairly ugly violation of modularity with the top-level
Makefile.local isntalling everything, (even when the build commands
for the library were down in lib/Makefile.local).
Carl Worth [Thu, 1 Apr 2010 05:41:02 +0000 (22:41 -0700)]
Makefile.config: Avoid pre-expanding the ${prefix} variable.
One of the supproted mechanisms we offer for configuration is
manually editing the Makefile.config file after it is generated
by the configure script. In this case it would be nice to be able
to change prefix only once, so allow that.
Carl Worth [Thu, 1 Apr 2010 05:29:16 +0000 (22:29 -0700)]
Move some variable assignments from Makefile.local to Makefile.config
There's not any special configure logic for determining these variable
values, but if we did add some in the future, then these will now be
in the right place for that.
Additionally, this now makes Makefile.local the single place for the
user to look for manually tweaking a variable assignment, (say, for a
compiler that can't accept a particular warning argument).
With this change, there should rarely be any need for a user to poke
into any Makefile.local file.
Carl Worth [Thu, 1 Apr 2010 05:12:01 +0000 (22:12 -0700)]
Move bulk of rules from Makefile to Makefile.local.
Before it was impossible to know whether any particular setting or
rule definition was in Makefile or Makefile.local. So we strip the
Makefile down to little more than the list of sub-directories and
the logic to include all of the sub-directories' Makefile.local
fragments.
Then, all of the real work can happen inside of Makefile.local.
Carl Worth [Thu, 1 Apr 2010 01:17:51 +0000 (18:17 -0700)]
configure: Fix installation of library to work with alternate --prefix
If an explicit --libdir is passed, then that is used directly. Otherwise
libdir is chosen as the value of $PREFIX/lib, (whether or not prefix was
passed explicitly or set by default).
Carl Worth [Thu, 1 Apr 2010 01:17:29 +0000 (18:17 -0700)]
configure: Fix typo in help message.
Documentation is installed to PREFIX/man not PREFIX/share.
Ingmar Vanhassel [Fri, 12 Mar 2010 13:47:36 +0000 (14:47 +0100)]
Add a --libdir option to ./configure
This allows packagers to specify to which directory libraries should be
installed.
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Saleem Abdulrasool [Fri, 12 Mar 2010 13:47:35 +0000 (14:47 +0100)]
Fix target dependencies for multiple jobs
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Ben Gamari [Fri, 12 Mar 2010 13:47:34 +0000 (14:47 +0100)]
Build and link against notmuch shared library, install notmuch.h
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Carl Worth [Thu, 11 Mar 2010 23:04:17 +0000 (15:04 -0800)]
emacs: Fix the notmuch-search-authors-width variable.
This variable existed previously, but wasn't actually used for anything.
Carl Worth [Wed, 31 Mar 2010 20:28:45 +0000 (13:28 -0700)]
Clarify documentation of notmuch_database_add_message.
For the case of adding a file that already exist, (with the same
filename). In this case, nothing will happen to the database, but
that wasn't clear before.
Carl Worth [Wed, 31 Mar 2010 20:27:16 +0000 (13:27 -0700)]
TODO: Note that '=' should sometimes count from the end of the buffer.
When trying to restore the current position, if the "current" thread
no longer appears in the buffer, then '=' moves to the current line
instead. When near the end of the buffer, the "current" line should
be counted as the number of lines from the end.
Carl Worth [Thu, 11 Mar 2010 20:49:56 +0000 (12:49 -0800)]
TODO: Add a todo item for adding a message as a blob, rather than a filename.
This was suggested by Srinivasa and is intended to make it easier to
integrate notmuch into an mbox-loving mail client.
Carl Worth [Thu, 11 Mar 2010 18:35:05 +0000 (10:35 -0800)]
TODO: Add some new items about improving the test suite.
I just tried (and failed) to write a test for the recent magic
inference of phrase searches. That's a feature that makes me *really*
uncomfortable to not have an automated test. But I believe the
proposed modularization of the test suite should reduce some quoting
nightmares, so will hopefully make this easier.
Carl Worth [Thu, 11 Mar 2010 17:55:06 +0000 (09:55 -0800)]
test: Fix phrase-search tests.
With some extra qutotation marks, we are now doing actual phrase
searches so these tests pass.
Carl Worth [Thu, 11 Mar 2010 17:52:08 +0000 (09:52 -0800)]
test: Add some negative results for the phrase searches.
These results have all the same terms as the target phrase, but
not in the expected order. They are designed to ensure that we
actually test phrase searches.
And as it turns out, we're not currently quoting the search terms
properly, so the phrase-search tests now fail with this commit.
Sebastian Spaeth [Thu, 11 Mar 2010 12:11:43 +0000 (13:11 +0100)]
notmuch-show: add tags to json output
The previous json patches forgot to add the notmuch tags to the json
output. This is inconsistent to the text output so here they are. We
just output a 'tags' field that sends notmuch tags as a json array.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Carl Worth [Wed, 10 Mar 2010 19:07:58 +0000 (11:07 -0800)]
emacs: Fix search refresh when on the last line of a search buffer.
We currently allow the cursor to be positioned on the "End of search
results" line after the last thread in a search buffer. When
refreshing on this line, there's no thread ID to be used as the
target.
Previously, a refresh from this case would result in a nil thread
target, but we were also using nil to indicate that the target thread
had been found. This caused the position to be lost during refresh,
(the cursor would move from the last line in the buffer to the first).
We fix this by using a magic string of "found" rather than nil to
clearly indicate whether the target thread has actually been found.
Carl Worth [Wed, 10 Mar 2010 19:05:33 +0000 (11:05 -0800)]
emacs: Adjust search refresh to use a target line not a target position.
It doesn't make sense to move the cursor to some random point in the
middle of a line. We always want the refresh to leave the cursor at
the beginning of some line instead.
Carl Worth [Wed, 10 Mar 2010 18:59:57 +0000 (10:59 -0800)]
Makefile: Fix Makefiles to depend on all child Makefile fragments.
We were previously maintaining two lists of the child Makefile
fragments---one for the includes and another for the dependencies. So,
of course, they drifted and the dependency list wasn't up to date.
We fix this by adding a single subdirs variable, and then using GNU
Makefile substitution to generate both the include and the dependency
lists.
Some side effect of this change caused the '=' assignment of the dir
variable to not work anymore. I'm not sure why that is, but using ':='
makes sense here and fixes the problem.
Carl Worth [Wed, 10 Mar 2010 18:58:46 +0000 (10:58 -0800)]
Makefile: Use 'emacs --quick' for a less noisy build of "make install-emacs".
I don't really notice if it goes any quicker, but it's sure nice to have
less spew now.
Carl Worth [Wed, 10 Mar 2010 18:50:20 +0000 (10:50 -0800)]
Makefile: Add a message after "make install-emacs"
More help to guide the new user here. Tell the user how to actually
invoke the emacs client now that it's installed.
Carl Worth [Wed, 10 Mar 2010 18:48:47 +0000 (10:48 -0800)]
Makefile: Conditionalize the "make install" message.
This is the same approach as with the 'all' target previously.
Carl Worth [Wed, 10 Mar 2010 18:44:44 +0000 (10:44 -0800)]
Makefile: Simplify the conditional message of the all target.
We wamt a simple "make" to call the 'all' target and then print a
message when done, but we don't want "make install" which depends on
that same 'all' target to print the message.
We previously did this with a separate 'all-without-message' target,
which was inelegant because it caused all users of the target to
carefully depend on 'all-without-message' rather than 'all'.
Instead, we now use a single 'all' target but with a Makefile
conditional that examines the MAKECMDGOALS variable to determine
whether to print the message.
Carl Worth [Wed, 10 Mar 2010 18:07:34 +0000 (10:07 -0800)]
Makefile: Add message to make install listing the other install targets.
Otherwise, it's hard for the user to know that things like install-emacs,
install-bash, and install-zsh even exist.
Carl Worth [Wed, 10 Mar 2010 01:03:11 +0000 (17:03 -0800)]
Makefile: Add a meesage after "make" telling the user to run "make install"
As one command completes, it's kind of the tool to indicate which
command the user should execute next.
Carl Worth [Wed, 10 Mar 2010 01:01:55 +0000 (17:01 -0800)]
Makefile: Rename all_deps to global_deps
The "all" inside this variable name was easy to confuse with the
separate "all" target. This variable specifies dependencies that apply
to every target, so use "global" instead.
Carl Worth [Wed, 10 Mar 2010 00:03:58 +0000 (16:03 -0800)]
Add is:<tag> as a synonym for tag:<tag> in search terms.
I like the readability of this, it provides compatibility with people
trained in this syntax by sup, and it even saves one character.
David Bremner [Wed, 10 Feb 2010 03:45:28 +0000 (23:45 -0400)]
emacs: Move emacs UI (currently just one file) to subdirectory.
Add emacs/Makefile.local and emacs/Makefile. Move emacs targets into
emacs/Makefile.local, but leave the byte compilation rule in the top
level Makefile.
Carl Worth [Tue, 9 Mar 2010 20:12:32 +0000 (12:12 -0800)]
INSTALL: Include Fedora command for installing dependencies of notmuch.
We already had this command in the error message from the configure script,
so we should include it here as well.
Carl Worth [Tue, 9 Mar 2010 20:11:47 +0000 (12:11 -0800)]
INSTALL: Add a pointer to ./configure --help
We have some good documentation in ./configure --help, so we should
direct users to it.
Carl Worth [Tue, 9 Mar 2010 20:05:43 +0000 (12:05 -0800)]
lib: Silence a compiler warning.
The original code was harmless, but apparently some compilers aren't
able to think deep enough to catch that.
Carl Worth [Tue, 9 Mar 2010 19:36:08 +0000 (11:36 -0800)]
emacs: Fix refresh of search results to leave cursor on current thread.
This has been broken since the addition of support for streaming
search results to the emacs interface. With the old apparoach it was
easy to simply wait for all search results to land in the buffer and
then search for the desired line. With streaming results, we have to
save the target off to the side and allow the process filter and
sentinel functions to correctly respond when the target thread
appears.
Fernando Carrijo [Sat, 5 Dec 2009 19:32:34 +0000 (17:32 -0200)]
Fix a few documentation typos in notmuch.h
Fix a few documentation typos in notmuch.h
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Fernando Carrijo [Sat, 5 Dec 2009 14:22:05 +0000 (12:22 -0200)]
Update documentation of notmuch_query_create
Commit
cd467caf renamed notmuch_query_search to notmuch_query_search_messages.
Commit
1ba3d46f created notmuch_query_search_threads. We better keep the docs
of notmuch_query_create consistent with those changes.
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Edited-by: Carl Worth to explicitly list the full name of each
function being referenced.
Carl Worth [Tue, 9 Mar 2010 18:12:58 +0000 (10:12 -0800)]
notmuch show: Don't show empty headers.
This is a fairly old regression. There has always been code to avoid
printing empty headers (such as Cc or Bcc with no values), but it has
been broken since notmuch_message_get_header was changed to return
an empty string rather than a NULL pointer for these fields.
Carl Worth [Tue, 9 Mar 2010 18:09:40 +0000 (10:09 -0800)]
TODO: Add proposal for a saved-search interface.
Adding this to our TODO list so that it doesn't get forgotten.
Carl Worth [Tue, 9 Mar 2010 18:06:37 +0000 (10:06 -0800)]
TODO: Remove many items that have been completed recently.
There's been a lot of good work done, and we've been doing a generally
poor job of noticing when some of the tasks we've completed were
already on our TODO list.
So here's a careful scan, removing all items I could find that have
already been done.
Carl Worth [Tue, 9 Mar 2010 17:54:53 +0000 (09:54 -0800)]
emacs: Fix documentation of notmuch-search-remove-tag.
The behavior was changed in commit
4aff2ca55bfe285ced36e9fe02c907d8b4120672
to affect all messages in the thread (and not only those matching
the current search) but the documentation was not updated (until
now).
Carl Worth [Tue, 9 Mar 2010 17:24:45 +0000 (09:24 -0800)]
lib: Document what move_to_next does at the end of the list.
Explicitly mention that there's an invalid position after the last
item in the list.
Carl Worth [Tue, 9 Mar 2010 17:22:29 +0000 (09:22 -0800)]
lib: Rename iterator functions to prepare for reverse iteration.
We rename 'has_more' to 'valid' so that it can function whether
iterating in a forward or reverse direction. We also rename
'advance' to 'move_to_next' to setup parallel naming with
the proposed functions 'move_to_first', 'move_to_last', and
'move_to_previous'.
Carl Worth [Tue, 9 Mar 2010 16:11:45 +0000 (08:11 -0800)]
emacs: Fix backspace to not scroll more than the previous message
The bug was occuring due to counting invisible lines, but then
scrolling past them since they are invisible.
Carl Worth [Tue, 9 Mar 2010 01:24:34 +0000 (17:24 -0800)]
emacs: Unbreak notmuch-show-rewind (the function to which Backspace is bound)
Commit
095a02211e696434e5b41a85ab516b3a639f9a9b broke the backspace
key by trying to execute nil as a function, (which obviously won't
work), when it was intended as a return value. Fix this now, (and pine
for a test suite that exercises the emacs user-interface of notmuch).
Carl Worth [Fri, 26 Feb 2010 19:30:12 +0000 (11:30 -0800)]
emacs: Make 'n' and 'p' navigate only open messages.
And add new 'N' and 'P' keybindings for navigating through messages
that are open or closed.
Carl Worth [Fri, 26 Feb 2010 18:40:23 +0000 (10:40 -0800)]
emacs: Don't open unread messages by default.
When searching for an individual message, (by message id, say), it's
really annoying to have the entire thread open just because the thread
was archived without ever having been read.
This means that the "unread" tag is a lot less special, and it really
just exists as a mild cue for the user.
Carl Worth [Thu, 25 Feb 2010 19:03:56 +0000 (11:03 -0800)]
README: Mention that notmuch only supports maildir or mh format.
Justin B Rye pointed out (in Debian bug #566282) that a user with mail
in mbox format can spend a lot of time investigating notmuch before
realizing that mbox is not supported. Head that off with a more
detailed mention in the README blurb.
Carl Worth [Thu, 25 Feb 2010 01:02:31 +0000 (17:02 -0800)]
emacs: Avoid removing the unread tag due to internal navigation
Sometimes the internals of the implementation navigate among messages,
(as opposed to the user explicitly requesting the next message to be
shown). In these cases we don't want to remove the unread tag from the
message navigated to.
This fixes a bug where invocation of notmuch-show-next-unread-message
would clear the unread tag from all messages in a thread.
Jameson Rollins [Tue, 19 Jan 2010 22:54:16 +0000 (17:54 -0500)]
Simplify "unread" tag handling in emacs UI.
This patch is intended to greatly simplify the handling of the
"unread" tag in the emacs UI. This patch adds a new function
'notmuch-show-mark-read', that removes the "unread" tag in
notmuch-show-mode. This function is then executed as a
notmuch-show-hook, and by notmuch-show-next-message. All of the
functions that explicitly marked messages as unread are removed or
renamed.
The idea here is that the user should never have to worry about
manipulating the "unread" tag. The tag should persist until the user
actually views a message, at which point it should be automatically
removed. This patch simplifies the notmuch.el quite a bit, removing a
lot of somewhat redundant functions, and reducing clutter in the name
and key-mapping space.
Carl Worth [Tue, 23 Feb 2010 20:51:23 +0000 (12:51 -0800)]
TODO: We should fix the --format=json option to not imply --entire-thread.
What we print and how we print it are orthogonal options, so --format
shouldn't change what messages are printed.
Carl Worth [Tue, 23 Feb 2010 20:41:59 +0000 (12:41 -0800)]
notmuch search: Use "thread" rather than "id" when formatting with JSON
The text output uses thread:<foo>, (which is a syntax directly supported
by "notmuch show"), so make the json output be "thread", "<foo>" rather
than "id", "<foo>". This should help avoid confusion of thread IDs with
message IDs, (which do use the "id" prefix in searches).
Carl Worth [Tue, 23 Feb 2010 20:49:33 +0000 (12:49 -0800)]
json: Add copy of MIT license text from cJSON
When we incorporate external code, we should include its license,
(particularly when one of the terms of the license is to include it in
copies).
Scott Robinson [Thu, 31 Dec 2009 15:17:40 +0000 (11:17 -0400)]
Add an "--format=(json|text)" command-line option to both notmuch-search and notmuch-show.
In the case of notmuch-show, "--format=json" also implies
"--entire-thread" as the thread structure is implicit in the emitted
document tree.
As a coincidence to the implementation, multipart message ID numbers are
now incremented with each part printed. This changes the previous
semantics, which were unclear and not necessary related to the actual
ordering of the message parts.
Carl Worth [Tue, 23 Feb 2010 19:27:43 +0000 (11:27 -0800)]
TODO: Rename the proposed --for option to --output
We've been using --output in IRC and on the mailing list for a while,
(someone had the good sense to point out that --for would defeat
command-line completion since it's a prefix of the proposed --format).
Carl Worth [Tue, 23 Feb 2010 19:21:41 +0000 (11:21 -0800)]
notmuch.1: Use bold and indentation for the NOTMUCH_CONFIG variable.
This seems to be the standard method of formatting an environment
variable section within a man page.
James Westby [Sat, 19 Dec 2009 13:12:15 +0000 (13:12 +0000)]
Add ENVIRONMENT VARIABLES section to the man page
Briefly describe the NOTMUCH_CONFIG variable there.
Carl Worth [Sat, 20 Feb 2010 20:27:37 +0000 (12:27 -0800)]
notmuch.el: Emphasize the 'i' of 'ID' in the documentation for 'c i'.
We're using 'i' in the keybinding, so it helps to have a capital
'I' in the help string to empahsize the point.
Carl Worth [Sat, 20 Feb 2010 20:23:13 +0000 (12:23 -0800)]
Change the stash keybinding from 'z' to 'c'. And use 'i' for message ID.
In spite of being implemented with the word "stash" in the function
names, the documentation (and hence help strings) for each function
already use the word "Copy" to describe the action. So 'c' is a much
more natural key-binding, (particularly since 'z' didn't map to any
real word anyway).
We also use 'i' for the message ID copying of the submap. This is
intended to align mnemonically with the "id:" prefix already used
for message IDs.
David Bremner [Fri, 12 Feb 2010 03:01:08 +0000 (23:01 -0400)]
notmuch.el: add a submap (on "z" for "ztash") to stash things.
Provide key bindings for stuffing various RFC822 header fields and other metadata
into the emacs kill-ring as text. The bindings are as follows:
z F notmuch-show-stash-filename
z T notmuch-show-stash-tags
z c notmuch-show-stash-cc
z d notmuch-show-stash-date
z f notmuch-show-stash-from
z m notmuch-show-stash-message-id
z s notmuch-show-stash-subject
z t notmuch-show-stash-to
David Bremner [Fri, 12 Feb 2010 03:01:07 +0000 (23:01 -0400)]
notmuch.el: convert sparse keymap to a list in notmuch-substitute-one-command-key-with-prefix
The previous version would crash when a key was bound to a sparse
keymap, since apparently these are not straightforward lists. The
usage of map-keymap is a bit obscure: it only has side-effects, no
return value.
David Bremner [Fri, 12 Feb 2010 02:44:10 +0000 (22:44 -0400)]
Add functions notmuch-show-get-(bcc, cc, date, from, subject, to).
Return the corresponding header field for the current message as a
string. These are thin wrappers around notmuch-show-get-header, which
means they each cause a full parse of the RFC822 header. The main idea
is to fix an api.
David Bremner [Fri, 12 Feb 2010 02:34:31 +0000 (22:34 -0400)]
notmuch-show-get-header: new function; return alist of parsed header fields.
This function parses the displayed message to recover header
fields. It uses mailheader.el to do the actual header parsing, after
preprocessing to remove indentation. It relies on the variables
notmuch-show-message-begin-regexp, notmuch-show-header-begin-regexp,
and notmuch-show-message-end-regexp.
Carl Worth [Sat, 20 Feb 2010 20:11:31 +0000 (12:11 -0800)]
notmuch.el: Delete some trailing whitespace.
I'm not sure when this managed to creep in, but we don't want it.