Commit graph

2128 commits

Author SHA1 Message Date
Carl Worth
717279fbcf Add a missing print after catching an exception.
Without this, trying to debug this exception was *really* confusing.
2009-11-22 03:52:55 +01:00
Carl Worth
591f901241 Print information about where Xapian exception occurred.
Previously, our Xapian exception reports where identical so they
were hard to track down.
2009-11-22 03:51:35 +01:00
Holger Freyther
6c7ec294bb notmuch-config: Fix memleaks.
While talloc is great we need to free the g_error by hand.

Tested-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Holger Freyther <zecke@selfish.org>
2009-11-22 00:14:48 +01:00
Chris Wilson
b5d7632000 notmuch new: Fix to actually open the database READ_WRITE.
Chris claims he must have been distracted when he wrote this.
2009-11-22 00:13:24 +01:00
Carl Worth
b725481cb3 Fix freak case problem that broke the compile.
I think I must have bumped some emacs keybinding that changed the case
of a word here.
2009-11-21 22:29:31 +01:00
Carl Worth
637f99d8f3 Rename NOTMUCH_DATABASE_MODE_WRITABLE to NOTMUCH_DATABASE_MODE_READ_WRITE
And correspondingly, READONLY to READ_ONLY.
2009-11-21 22:10:18 +01:00
Chris Wilson
f379aa5284 Permit opening the notmuch database in read-only mode.
We only rarely need to actually open the database for writing, but we
always create a Xapian::WritableDatabase. This has the effect of
preventing searches and like whilst updating the index.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Carl Worth <cworth@cworth.org>
2009-11-21 22:04:49 +01:00
Carl Worth
aac1d60352 INSTALL/notmuch.el: More details on how to install/run notmuch.el
Hopefully this will save some people some head-scratching trying
to figure out how to use it.
2009-11-21 21:40:57 +01:00
Stefan Schmidt
0414c774d2 INSTALL: emacs install dokumentation.
Write down the steps needed to install and actuall use notmuch in emacs. Should
help emacs newbies.

Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
2009-11-21 21:34:25 +01:00
Carl Worth
5939490f64 Revert "notmuch: Add Maildir directory name as tag name for messages"
This reverts commit 9794f19017.

The feature makes a lot of sense for the initial import, but it's not
as clear whether it makes sense for ongoing "notmuch new" runs. We
might need to make this opt-in by configuration.
2009-11-21 21:21:58 +01:00
Carl Worth
b088370920 TODO: Add notes on portability, and remove completed tasks.
It's better to have things in TODO rather than mails with a todo
tag in my notmuch database.
2009-11-21 19:54:24 +01:00
Carl Worth
d746688beb TODO: Several updates. 2009-11-21 19:52:43 +01:00
Carl Worth
6732aa1b14 INSTALL: Mention that xapian-config might be named xapian-config-1.1
As reported on the mailing list.
2009-11-21 19:52:06 +01:00
Aneesh Kumar K.V
9794f19017 notmuch: Add Maildir directory name as tag name for messages
This patch adds maildir directory name as the tag name for
messages. This helps in adding tags using filtering already
provided by procmail.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2009-11-21 13:28:24 +01:00
Carl Worth
21f3252436 Makefile: Fix the fallback emacs install path.
When pkg-config can't be used to find out where to install emacs
files, we fallback to a hard-coded directory. Only, we were falling
back to the wrong thing, (one that emacs doesn't look into by
default).
2009-11-21 11:40:37 +01:00
Jed Brown
49132ebc76 Drop redundant CFLAGS, was already included in CXXFLAGS 2009-11-21 01:17:31 +01:00
Carl Worth
e94bd8506b notmuch reply: Include text parts in reply, even with disposition attachment.
If it's text, (such as a patch), then I want it quoted in my reply,
(so that I can comment on it).
2009-11-21 01:14:01 +01:00
Carl Worth
268da2cf19 notmuch show: Don't hide text parts, even with disposition attachment.
If it's text, (such as a patch), then I want to see it.
2009-11-21 01:10:25 +01:00
Carl Worth
67bad3483f notmuch show: Don't hide a digital signature.
This was a bug that was introduced in copying the indexing code over
into notmuch-show.c. When indexing, we want to ignore the signature,
(it has no interesting terms). But when presenting the message, it's
important to present the signature to the user.

(And would be even better if we presented whether or not the signature
is good.)
2009-11-21 01:00:41 +01:00
Carl Worth
882a58de5f notmuch.el: Don't use end-of-buffer which is inappropriate from programs
The documentation is quite clear about this case.

With this, we can now byte compile without warnings.
2009-11-21 00:58:16 +01:00
Carl Worth
aa46a34408 notmuch.el: Fix stale reference to non-existing variable.
We changed from "query" to "thread-id" a while ago, and broke this
error message at the time. Fix it now.
2009-11-21 00:53:27 +01:00
Carl Worth
d295f50ac7 notmuch.el: Add many missing defvar calls.
Without these, emacs was complaining about "assignment to free variable",
(though only when byte compiling, which is why we didn't notice earlier).
2009-11-21 00:52:23 +01:00
Eric Anholt
59c241ebd0 When a search query triggers a Xapian exception, log what the query was.
In my script containing a series of queries to be run on new mail for
setting up tags, it's nice to see which query I typed wrong.

Signed-off-by: Eric Anholt <eric@anholt.net>
2009-11-21 00:18:15 +01:00
James Rowe
a8e0d4f25f Make bash completion directory configurable.
Some systems install completion scripts in /usr/share/bash-completion, make the
location configurable from Makefile.config.
2009-11-21 00:14:06 +01:00
Carl Worth
3ae12b1e28 add_message: Re-fix handling of non-mail files.
More fallout from _get_header now returning "" for missing headers.

The bug here is that we would no longer detect that a file is not an
email message and give up on it like we should.

And this time, I actually audited all callers to
notmuch_message_get_header, so hopefully we're done fixing this
bug over and over.
2009-11-20 21:46:37 +01:00
Carl Worth
656e4c413d notmuch_database_add_message: Add missing error-value propagation.
Thanks to Mike Hommey for doing the analysis that led to noticing that
this was missing.
2009-11-20 21:02:11 +01:00
Carl Worth
52292c5485 add_message: Properly handle missing Message-ID once again.
There's been a fair amount of fallout from when we changed
message_file_get_header from returning NULL to returning "" for
missing headers. This is yet more fallout from that, (where we were
accepting an empty message-ID rather than generating one like we want
to).
2009-11-20 19:36:01 +01:00
Alexander Botero-Lowry
5d0a01dceb Checkin some command-only tcsh completions
Modified-by Carl Worth <cworth@cworth.org>: Just moved the file down
into contrib where the other completion scripts are.
2009-11-20 18:15:19 +01:00
Ingmar Vanhassel
14807ed2de bash-completion: Move to contrib
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
2009-11-20 18:05:51 +01:00
Ingmar Vanhassel
8923ea0755 zsh-completion: Initial zsh-completion for notmuch
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
2009-11-20 18:05:48 +01:00
Mikhail Gusarov
4dec742eba Add notmuch.1.gz to files to be cleaned
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2009-11-20 17:06:58 +01:00
Carl Worth
1728fe2a0a TODO: Add a couple of notes about fixing the completion script.
I'm throwing away a half-finished fix of this now, and just want to
ensure I don't forget about it.
2009-11-20 17:04:29 +01:00
Jan Janak
5150b15b87 Makefile: Make object targets depend on Makefiles
All objects need to be recompiled when any of the Makefiles changes, so
we make them all depend on all the Makefiles.

Signed-off-by: Jan Janak <jan@ryngle.com>
2009-11-20 13:44:09 +01:00
Mikhail Gusarov
dbb29a77fa Allow to redefine notmuch binary name and path in elisp mode
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2009-11-20 13:37:54 +01:00
Carl Worth
2cc3165163 notmuch.el: Don't use literal control characters in strings.
Avoding these is nicer to users, text editors, and our poor little
notmuch.el code itself that would get confused when seeing a copy of
itself in email. (Of course, we should still fix that bug, but this
workaround is good nonetheless.)
2009-11-20 13:09:58 +01:00
Carl Worth
0a575c9580 Makefile: Hard-code emacs_lispdir if emacs pkg-config file not available
Using pkg-config to find this variable is nice if it works. Go back to
the previously used value if it doesn't.
2009-11-20 13:07:42 +01:00
Carl Worth
1ddba66a3f Makefile: Remove unused variable emacs_startdir
This was added in a prelimnary version of a previous commit that would
automatically load notmuch.el for anyone running emacs. It's not used
at all in the current Makefile.
2009-11-20 12:58:42 +01:00
Carl Worth
31b54bc787 Avoid access of a Xapian iterator's object when there's nothing there.
This eliminates a crash when a message (either corrupted or a non-mail
file that wasn't properly detected as not being mail) has no In-Reply-To
header, (and so few terms that trying to skip to the prefix of the
In-Reply-To terms actually brings us to the end of the termlist).
2009-11-20 12:06:11 +01:00
Carl Worth
f6ca697e27 Revert inadvertently committed code.
This was accidentally included with commit:

	ddac17343a

(It was a dirty chunk in my directory that I accidentally amended into
the submitted patch.)
2009-11-20 11:12:42 +01:00
Jeffrey C. Ollie
c05c3f1584 notmuch build: add a RPM spec file
Add a spec file for building RPM packages.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2009-11-20 10:37:38 +01:00
Jeffrey C. Ollie
dad3dd64b7 Add a .desktop file entry.
This will add an entry in your window manager's menus that will create
up a new emacs process and start notmuch.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2009-11-20 10:36:15 +01:00
Jeffrey C. Ollie
d98718d104 Improve installation of emacs mode.
1) Add a separate targets to build and install emacs mode.

2) Don't hardcode the installation directory, instead use emacs'
   pkg-config module.

3) Install a byte compiled version of the emacs mode.

4) Install the emacs mode in emacs' site-lisp directory.  Put
   "(require 'notmuch)" in your .emacs to load it automatically.

5) Ignore byte-compiled emacs files.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
Reviewed-by: Ingmar Vanhassel <ingmar@exherbo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-11-20 10:34:29 +01:00
Rolland Santimano
19d951ee16 Have git ignore tags & cscope files 2009-11-20 10:30:05 +01:00
Peter Wang
ddac17343a Put $(LDFLAGS) after the list of object files.
Some linkers on some systems are particularly picky about the order of
arguments in order to properly linkt. So this fixes failures on some
systems.
2009-11-19 18:05:22 +01:00
Aneesh Kumar K.V
3f52f59c1e notmuch: Add search mode hook
This patch add notmuch-search-hook that gets run when we
after displaying search results

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc:Keith Packard <keithp@keithp.com>
2009-11-19 14:01:49 +01:00
Ingmar Vanhassel
aa8c2224ee Makefile: Create elisp install directory explicitly
When doing a DESTDIR install, this directory likely won't exist, and
installing notmuch.el will fail.

See 0d4b5292
2009-11-19 12:24:11 +01:00
Ingmar Vanhassel
ec7a47d756 bash-completion: Complete options for notmuch search 2009-11-19 11:31:44 +01:00
Ingmar Vanhassel
82da15be3b bash-completion: Localize variables, use more consistent variable names 2009-11-19 11:31:44 +01:00
Ingmar Vanhassel
829dac9a1b bash-completion: Whitespace fix
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
2009-11-19 11:31:44 +01:00
Ingmar Vanhassel
4033d87fdd bash-completion: Bash has & should use [[ == ]]
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
2009-11-19 11:31:44 +01:00