Commit graph

1767 commits

Author SHA1 Message Date
Carl Worth
cbcc3454ae configure: Generalize the GMime configure checks.
This way when GMime 2.8 comes out we can simply add it to the list
rather than adding an additional block of conditional code for it.
Also GMime 2.6 is now preferred over GMime 2.4.
2010-04-21 14:17:14 -07:00
Adrien Bustany
65b634145a configure: Add support for GMime 2.6
Notmuch compiles just fine with GMime 2.6, so accept it in the configure
script.
2010-04-21 14:17:14 -07:00
Carl Worth
8981842ff6 emacs: Fix notmuch-search-authors-width declaration.
Our defcustom call was missing the 'notmuch group, which emacs was
nice enough to warn about during compilation.
2010-04-21 14:17:14 -07:00
David Edmondson
8cee113819 emacs: Support for customizing search result display
This patch helps in customizing search result display similar to
mutt's index_format. The customization is done by defining an alist as
below:

(setq notmuch-search-result-format '(("date" . "%s ")
				     ("authors" . "%-40s ")
				     ("subject" . "%s ")))

The supported keywords are date, count, authors, subject and tags.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: David Edmondson <dme@dme.org>
2010-04-21 13:37:14 -07:00
Carl Worth
6157fe0bfd emacs/notmuch-show.el: Part headers are real buttons that save the part
Convert the part headers into buttons that save the part when
activated.
2010-04-21 13:19:19 -07:00
David Edmondson
c579c8201f emacs: Display all body parts using `notmuch part --part=<n>'
Use the `notmuch part' command to access body parts not currently
included in the JSON output and display those body parts
appropriately.
2010-04-21 13:14:46 -07:00
David Edmondson
6c0621962a emacs: Use mailcap.el to guess the type of application/octet-stream parts
Use the mailcap functionality to guess a MIME type for attachments of
type application/octet-stream and, presuming successful, feed the
attachment back into the display code with the determine type.

This is mostly useless at the moment, as the JSON output from notmuch
does not include the content of application/octet-stream parts, so
they cannot be displayed even if the guess is a good one.
2010-04-21 13:14:39 -07:00
David Edmondson
4488cf30f6 emacs: Use `mm-display-part' when possible
For parts that the mm-decode/mm-view functions can inline and we have
the content, use `mm-display-part' to insert the part in the
buffer.
2010-04-21 13:10:51 -07:00
David Edmondson
b93c5749fd emacs/notmuch-show.el: Improved part labelling
If a text/plain part is not the first part in a message, add a label
in order that a user can see that multiple parts are present.

If a part has a 'filename' attribute, include it in any label
describing the part.
2010-04-21 13:05:39 -07:00
David Edmondson
3b3da097d8 emacs: Move body markup to a separate file
Move the citation and signature markup for text/plain parts to a new
file (notmuch-wash.el) and call it using a hook mechanism rather than
directly.
2010-04-21 12:55:46 -07:00
Carl Worth
aab9fa307b emacs: Rename body-invis-spec to message-invis-spec
This is more consistent with the related names (toggle-message,
:message-visible, etc.)
2010-04-21 12:52:38 -07:00
Carl Worth
b825204f0d emacs: Remove the notmuch-show-toggle-body command (with "b" binding)
In the recent switch to a JSON-based emacs interface, RET now toggles
message visibility anywhere in the message, (rather than only on the
summary line). So we no longer need this separate "b" binding for this.

Additionally, the body toggle was implemented independently from RET,
so after hiding a message with "b" one could not make it visible with
RET. This confusing state is now no longer possible, (since the
:body-visible property is removed entirely).
2010-04-21 12:52:38 -07:00
David Edmondson
e26d767897 emacs: JSON based implementation
Re-implement notmuch-show.el using the JSON output format of the
notmuch command. Most functionality is retained - HTML display is
noticeably missing.
2010-04-21 12:12:02 -07:00
Anthony
55d06f3e0b json_quote_chararray: Always return a newly talloced array
The special case for len==0 was wrong---the normal code path is to
talloc to get a newly allocated, editable string, that might be
talloc_free'd later. It makes more sense just to let the len==0
behaviour fall through into the normal case code.

Reviewed-by: Carl Worth <cworth@cworth.org>
This results in the same value being returned, but with the proper
memory handling.
2010-04-20 08:55:31 -07:00
David Edmondson
cacefbf3d6 json: Avoid calling strlen(NULL)
MIME parts may have no filename, which previously resulted in calling
strlen(NULL).
2010-04-20 08:54:51 -07:00
Sebastian Spaeth
634b4fbe23 python: Adapt README somewhat 2010-04-19 21:36:14 +02:00
Sebastian Spaeth
391ad89ff8 python: Rename notmuch binary to notmuch.py
If we have it in the toplevel directory we can run it without having
to install the library, which is great for testing purposes.

--HG--
rename : docs/notmuch => notmuch.py
2010-04-19 21:30:43 +02:00
Sebastian Spaeth
2123bdd7fc Remove all traces of cnotmuch
import cnotmuch.notmuch is dead. Long live import notmuch!
2010-04-19 21:29:40 +02:00
Sebastian Spaeth
eb10841de7 python: adapt docs to the notmuch module renaming 2010-04-19 21:25:05 +02:00
Sebastian Spaeth
d0b00bc4b1 rename module to just 'notmuch'
So you need to do e.g. 'from notmuch import Database' rather than the
previous from cnotmuch.notmuch import Database.

Alse recreate our fake python 'notmuch' binary in the docs directory for now

--HG--
rename : notmuch/notmuch.py => notmuch/__init__.py
2010-04-19 21:21:38 +02:00
Sebastian Spaeth
3c6321cdb2 cnotmuch -> notmuch
and GPL v3+ boilerplate code to each source file.

--HG--
rename : cnotmuch/__init__.py => notmuch/__init__.py
rename : cnotmuch/database.py => notmuch/database.py
rename : cnotmuch/globals.py => notmuch/globals.py
rename : cnotmuch/message.py => notmuch/message.py
rename : cnotmuch/notmuch.py => notmuch/notmuch.py
rename : cnotmuch/tag.py => notmuch/tag.py
rename : cnotmuch/thread.py => notmuch/thread.py
2010-04-19 21:14:47 +02:00
David Edmondson
cdd64727f1 emacs/notmuch.el: Enable hl-line-mode' in notmuch-search-mode' 2010-04-19 11:20:02 -07:00
David Edmondson
f920ff59b9 emacs/notmuch-show.el: Avoid passing unintended format strings to `message'
If the text being stashed included %, `message' was unhappy and
complained.
2010-04-19 10:15:09 -07:00
Carl Worth
f7c957f4de debian: Make git ignore several intermediate files.
The "make release" target doesn't cause these to be left around, but
manually doing something like ./debian/rules/build can.
2010-04-19 10:13:29 -07:00
Carl Worth
e6d20b7b8f make release: Add Debian package building and upload
Finally, a single button to push to do all the uploading.
2010-04-16 13:20:22 -07:00
Carl Worth
3461aa8dc2 Increment version to 0.2.
Only minor features added this time--nothing that merits a 1.0.
2010-04-16 13:02:34 -07:00
Carl Worth
80240877f8 make release: Add a check that version and debian/changelog are consistent
Eventually I'd like to automate this so that one or the other of these
files is canonical and the other is generated from it. Until then, add
this check to the release process to avoid a skewed release being
shipped.
2010-04-16 13:00:35 -07:00
Carl Worth
9b065ff3b2 Makefile: Avoid complaining about .first-build-message not existing
This cleans up a few spurious warnings from the build.
2010-04-16 12:10:23 -07:00
Carl Worth
b068f1cc84 Fix final link of notmuch binary to use C compiler if possible.
On Linux, a C program that depends on a C library which in turn
depends on a C++ can be linked with the C compiler, (avoiding a direct
link from the program to the C++ runtime libraries).

Other platforms with less fancy linkers need to use the C++ compiler
for this linking.
2010-04-16 11:51:56 -07:00
Carl Worth
533b02945d debian: Remove watch file.
We're switching to a native package, where we build the upstream and
debian releases simultaneously, so there's no need for a watch file.
2010-04-16 11:35:33 -07:00
Carl Worth
c75ab298d0 debian: Switch to "3.0 (native)" source format.
To keep lintian happy.
2010-04-16 11:34:48 -07:00
Carl Worth
b8f0646931 Makefile: Fix conditionals to avoid calling git when no .git is present
Otherwise, building from a tar-file snapshot or release caused a bunch
of error messages from unnecessary git invocations.
2010-04-16 11:34:48 -07:00
Carl Worth
c41a6bb786 Makefile: Add a top-level "make snapshot" target.
Useful for verifying that our tar-file creation works. The tar-file
name can't easily be used as a target directly since it depends on the
current git revision.
2010-04-16 11:34:48 -07:00
Carl Worth
5999ff8d3c Makefile: Rework the version checks slightly.
Theese were previously pointing to "make VERSION=X.Y release", but
we've recently changed to an alternate scheme involving the updated
version in a file named "version".
2010-04-16 11:34:48 -07:00
Carl Worth
0786587f3c RELEASING: Add a step to upgrade the version in the "version" file.
It is annoying to have an extra step here, but it does at least mean
that we are back to just "make release" rather than "make VERSION=X.Y
release".
2010-04-16 11:34:48 -07:00
Carl Worth
b7dc24298d Makefile: Add an explicit version file to the repository.
We do this so that "git archive" produces a usable tar file without us
having to post-modify it, (since tools like git-buildpackage might not
give us an easy way to hook into the tar-file-creation step).

To support this we also have to change our preference to prefer the
git-described-based version (if available) and only if not available
do we fallback to using what's in the "version" file. Finally, we also
ovverride this preference when releasing, (where what's in the
"version" file wins).

Note that using our Makefile's rule to create a tar file still will
insert the git-based version into the tar file. This is useful for
creating snapshots which will correctly report the git version from
which they were created.
2010-04-16 11:34:48 -07:00
Carl Worth
4b52b918d3 debian/changelog: Create an entry for the 0.2 release.
A (very slightly filtered) version of what already appears in NEWS.
2010-04-16 11:34:38 -07:00
Carl Worth
ac3dcac7e6 RELEASING: Add a (manual!) step to create a debian/changelog entry
I'd like to have this be fully automated in the future, but for now,
it's an extra step.
2010-04-16 10:23:50 -07:00
Carl Worth
7029c52ca7 debian: Don't auto-generate debian/changelog.
David Bremner informs me that shoving everything from the notmuch "git
log" into the debian/changelog is a bit excessive. Instead, we'll
start manually updating this file, (which feels a bit redundant with
NEWS, but perhaps makes us a better Debian-comunity member).
2010-04-16 10:00:11 -07:00
Carl Worth
2608bfe95f debian: Add a gbp.conf to start using git-buildpackage
On Bdale Garbee's recommendation I'm switching from gitpkg, (which
constructed a source tree but still required me to go run debuild), to
git-buildpackage. I hadn't originally used git-buildpackage because it
didn't seem to work without a configuration file, (where gitpkg was
fine).

Bdale was kind enough to point me to his fw/altos source at
git.gag.com where I found an example gpb.conf file as well as a target
in debian/rules to automatically update debian/changelog with the new
version number.
2010-04-16 09:32:46 -07:00
Carl Worth
4906f6b9ae make release: Don't print the release message on stdout.
It's just too long for copy/paste, so just let the user know the name
of the file containing the message instead.
2010-04-16 08:33:31 -07:00
Carl Worth
ff13111cf3 Makefile: Fix "make release" to print the current release announcement.
This was accidentally hard-coded to always print the 0.1 NEWS blurb.
2010-04-16 08:31:46 -07:00
Carl Worth
48cd091249 NEWS: Add release notes for the 0.2 release. 2010-04-16 08:28:05 -07:00
Carl Worth
9792d3553e Revert "notmuch.el: 'F' in search mode takes us to a list of folders."
This reverts commit fbec989fe3.

I only pushed this accidentally. See message
id:871ver6u9r.fsf@yoom.home.cworth.org for the various reasons I
didn't like this patch, (mostly I think the association of 'F' is
wrong).
2010-04-16 07:53:10 -07:00
Sebastian Spaeth
43cbbfc278 notmuch.c: Shorten version string
We previously output "notmuch version 0.1" as response to notmuch --version.
Shorten this to "notmuch 0.1" as we know that we will receive a version
number when we explicitely ask for it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-04-16 07:35:17 -07:00
Carl Worth
b4459b8a4d emacs: Fix search filtering of a global search ("*")
With the recent addition of "*" being a special case for a search
matching all messages, we have to take care when doing a filter
operation. In this case it's not legal to simply append and get:

	* and <some-new-search-terms>

Instead we carefully construct a new search string of only:

	<some-new-search-terms>

This could all be avoided if we had a parser that could understand
"*" with the meaning we want.
2010-04-15 21:25:45 -07:00
Carl Worth
75cfd0d906 TODO: Add two tasks that both have to do with auditing the library API
It was noted today in IRC that libnotmuch is not yet careful about
wrapping all Xapian calls with try/catch blocks to print nicer error
messages. It seems it would be natural to audit that at the same time
as doing the symbol-hiding work.
2010-04-15 20:52:27 -07:00
Carl Worth
a29f49b943 RELEASING: Change wording of libnotmuch version instruction
We actually want this version to be incremented by the commits that
extend the interface. So the release process really is not to just
verify two things (NEWS and libnotmuch version), then run "make
VERSION=x.y release", and send the mail. Quite nice.
2010-04-15 20:50:46 -07:00
Carl Worth
00263dd1a9 make release: Enforce a clean source tree before release.
Where by clean, we check that no files are known to git to be
modified.
2010-04-15 20:14:54 -07:00
Carl Worth
8700de6fb7 RELEASING: Remove a meaningless step from the release process.
The entire "make sure the code you want is in place" thing is part of
a larger release process that we don't document here at all. Instead,
we just focus here on the mechanics of pushing things out once the
larger process has determined the code is ready.

And the fewer steps there are, the better, (for making the
release-process as painless as possible and for avoiding any
mistakes).
2010-04-15 19:55:11 -07:00