Commit graph

1068 commits

Author SHA1 Message Date
Ingmar Vanhassel
acaff279e2 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>
2010-03-31 18:07:58 -07:00
Saleem Abdulrasool
07378d0d14 Fix target dependencies for multiple jobs
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
2010-03-31 17:41:28 -07:00
Ben Gamari
266ab595a2 Build and link against notmuch shared library, install notmuch.h
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
2010-03-31 17:38:27 -07:00
Carl Worth
b957a1b029 emacs: Fix the notmuch-search-authors-width variable.
This variable existed previously, but wasn't actually used for anything.
2010-03-31 13:32:00 -07:00
Carl Worth
e002fe8a7a 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.
2010-03-31 13:31:10 -07:00
Carl Worth
357b48d34b 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.
2010-03-31 13:31:10 -07:00
Carl Worth
4ec5e2a612 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.
2010-03-31 13:31:10 -07:00
Carl Worth
9ff063ded7 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.
2010-03-31 13:31:10 -07:00
Carl Worth
bf09c7d11e test: Fix phrase-search tests.
With some extra qutotation marks, we are now doing actual phrase
searches so these tests pass.
2010-03-31 13:31:09 -07:00
Carl Worth
70b7e659f6 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.
2010-03-31 13:31:09 -07:00
Sebastian Spaeth
d30049d2b9 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>
2010-03-11 04:30:46 -08:00
Carl Worth
bb61755afe 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.
2010-03-10 11:07:58 -08:00
Carl Worth
70ef8de798 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.
2010-03-10 11:07:51 -08:00
Carl Worth
86232e62ab 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.
2010-03-10 10:59:57 -08:00
Carl Worth
f47bec55bd 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.
2010-03-10 10:58:46 -08:00
Carl Worth
ce6cfd6408 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.
2010-03-10 10:50:20 -08:00
Carl Worth
b6df83bef0 Makefile: Conditionalize the "make install" message.
This is the same approach as with the 'all' target previously.
2010-03-10 10:48:47 -08:00
Carl Worth
985263cf51 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.
2010-03-10 10:44:44 -08:00
Carl Worth
adf5c5ec35 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.
2010-03-10 10:07:34 -08:00
Carl Worth
2b8131f079 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.
2010-03-09 17:03:11 -08:00
Carl Worth
6b92ca5a05 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.
2010-03-09 17:01:55 -08:00
Carl Worth
e3046c688b 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.
2010-03-09 16:03:58 -08:00
David Bremner
bbda0a0156 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.
2010-03-09 12:13:33 -08:00
Carl Worth
a875e17211 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.
2010-03-09 12:13:32 -08:00
Carl Worth
21a92c6cce INSTALL: Add a pointer to ./configure --help
We have some good documentation in ./configure --help, so we should
direct users to it.
2010-03-09 12:13:32 -08:00
Carl Worth
c446f22dee lib: Silence a compiler warning.
The original code was harmless, but apparently some compilers aren't
able to think deep enough to catch that.
2010-03-09 12:07:26 -08:00
Carl Worth
07876ac135 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.
2010-03-09 11:36:08 -08:00
Fernando Carrijo
7f2629520c 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>
2010-03-09 10:32:58 -08:00
Fernando Carrijo
bc69bf09cb 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.
2010-03-09 10:29:38 -08:00
Carl Worth
2303d9366e 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.
2010-03-09 10:12:58 -08:00
Carl Worth
c375f7a407 TODO: Add proposal for a saved-search interface.
Adding this to our TODO list so that it doesn't get forgotten.
2010-03-09 10:09:40 -08:00
Carl Worth
a7f03d9f7c 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.
2010-03-09 10:06:37 -08:00
Carl Worth
986789e6f6 emacs: Fix documentation of notmuch-search-remove-tag.
The behavior was changed in commit 4aff2ca55b
to affect all messages in the thread (and not only those matching
the current search) but the documentation was not updated (until
now).
2010-03-09 09:54:53 -08:00
Carl Worth
64646841f7 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.
2010-03-09 09:24:45 -08:00
Carl Worth
4e5d2f22db 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'.
2010-03-09 09:22:29 -08:00
Carl Worth
c5085642b8 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.
2010-03-09 08:11:45 -08:00
Carl Worth
c963098e28 emacs: Unbreak notmuch-show-rewind (the function to which Backspace is bound)
Commit 095a02211e 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).
2010-03-09 08:11:37 -08:00
Carl Worth
095a02211e 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.
2010-02-26 11:30:12 -08:00
Carl Worth
f99b46c607 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.
2010-02-26 10:40:23 -08:00
Carl Worth
43c9c11389 control: Update package description to follow upstream README.
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 package description.
2010-02-25 11:16:41 -08:00
Carl Worth
3ab18d1c22 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.
2010-02-25 11:03:56 -08:00
Carl Worth
3474263823 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.
2010-02-24 17:02:31 -08:00
Jameson Rollins
4b9d2e3a4d 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.
2010-02-24 16:40:52 -08:00
Carl Worth
a7afcee50c 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.
2010-02-23 12:51:23 -08:00
Carl Worth
5171831813 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).
2010-02-23 12:50:46 -08:00
Carl Worth
cfa95eec27 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).
2010-02-23 12:50:46 -08:00
Scott Robinson
6ce2bf68f5 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.
2010-02-23 12:01:12 -08:00
Carl Worth
3ca7a4fbcc 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).
2010-02-23 11:27:43 -08:00
Carl Worth
6365f156c8 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.
2010-02-23 11:21:41 -08:00
James Westby
a696119756 Add ENVIRONMENT VARIABLES section to the man page
Briefly describe the NOTMUCH_CONFIG variable there.
2010-02-23 11:14:09 -08:00