Commit graph

3209 commits

Author SHA1 Message Date
Austin Clements
0c950146a1 lib: Perform the same transformation to _notmuch_database_find_directory_id
Now _notmuch_database_find_directory_id takes a flags argument, which
it passes through to _notmuch_directory_create and can indicate if the
directory does not exist.  Again, callers have been updated, but
retain their original behavior.
2012-05-23 22:30:32 -03:00
Austin Clements
f69314fbd3 lib: Make directory document creation optional for _notmuch_directory_create
Previously this function would create directory documents if they
didn't exist.  As a result, it could only be used on writable
databases.  This adds an argument to make creation optional and to
make this function work on read-only databases.  We use a flag
argument to avoid a bare boolean and to permit future expansion.

Both callers have been updated, but currently retain the old behavior.
We'll take advantage of the new argument in the following patches.
2012-05-23 22:30:20 -03:00
Tomi Ollila
70ca3444c7 emacs: use 'gnus-decoded in notmuch-mm-display-part-inline ()
When mail message is read from emacs, the message structure
obtained may contain parts which have content included
(`text/plain` for example) and other parts where content is not
included (`text/html` for example).

In case content is included, the string is already available in
emacs' internal format and therefore mm-... functions should not
attempt to do further decoding for the data in temp buffer
provided for it.

Currently when reply buffer is created,
notmuch-mm-display-part-inline () is used to provided quoted reply
content. This change makes the mm-... functions called by it use
'gnus-decoded as charset whenever the content is already available.

File .../emacs-23.3/lisp/gnus/mm-uu.el mentions:
"`gnus-decoded' is a fake charset, which means no further decoding."
2012-05-23 22:29:32 -03:00
Justus Winter
8c123d0da6 python: deprecate Messages.{format,print}_messages
This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch, so this code will be removed in
notmuch 0.15.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 19:10:28 +02:00
Justus Winter
892bb1ee6d python: deprecate Database.db_p
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 19:09:25 +02:00
Justus Winter
8f667be2ac python: fix Message.get_header
8dc8495010 introduced a bug, if the
requested header is not set the underlying notmuch function returns an
empty string that also made the expression true resulting in an
exception being raised. Partly revert the commit to fix this
issue. Testing for equality with None is correct in this case since
the restype of the function Message._get_header is c_char_p so NULL
pointers are in fact converted to None in this case.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 18:23:11 +02:00
Justus Winter
8e3faa7f18 python: add a file abstracting away differences between python 2 and 3
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 18:23:11 +02:00
Justus Winter
643719dfce python: remove the "notmuch binary" section from the docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 17:47:49 +02:00
Justus Winter
8dc8495010 python: Fix the remaining broken NULL pointer tests
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 17:15:49 +02:00
Justus Winter
05c3e83bd2 python: use relative imports
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 16:58:53 +02:00
Justus Winter
5bc5471c54 python: remove unused import of the json module
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 16:55:29 +02:00
David Bremner
d15a5e38a9 debian: fix typo in changelog.
the path for NEWS was wrong
(cherry picked from commit b9520ef033)
2012-05-16 21:37:47 -03:00
Tomi Ollila
d2d476b014 NEWS: Capitalized go bindings changes title
Align 'Go bindings changes' title capitalization to rest of the file
2012-05-16 21:30:12 -03:00
Tomi Ollila
b9faffac12 NEWS: Insert markdown formatting commands in 0.13 section text
NEWS entries in section 0.13 is brought consistent with rest of the
NEWS file.
2012-05-16 21:29:50 -03:00
Tomi Ollila
be63e15423 NEWS: Changed 0.13 release date in NEWS file to 2012-05-15 2012-05-16 21:29:35 -03:00
Tomi Ollila
b400d57ce6 NEWS: Dropped old 'Reply to sender' section
'Reply to sender' section was 0.12 news which was accidentally
duplicated in 0.13 news
2012-05-16 21:29:23 -03:00
David Bremner
b9520ef033 debian: fix typo in changelog.
the path for NEWS was wrong
2012-05-16 13:49:23 -03:00
Justus Winter
b9d1045474 python: remove format_message_as_{json,text} from the sphinx docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-16 16:57:45 +02:00
Justus Winter
cd8fe01013 python: remove functions that have been marked as deprecated in 0.13
Removes Message.format_message_{internal,as_json,as_text}.

This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch. The code has been marked as deprecated
in 0.13 and is now removed.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-16 16:55:15 +02:00
Justus Winter
eab15cc707 python: remove notmuch.py
Removes notmuch.py. If someone wants to step up and work on this it
can always be restored using the version control system.

notmuch.py was meant to be a python implementation of the notmuch
utility. It was never finished and hasn't been updated to changes in
the API and bindings and its features and interface haven't been kept
in sync with the notmuch utility.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-16 16:55:15 +02:00
David Bremner
83542aec8b debian: changelog stanza for 0.13
My usual lazy self, refer to upstream NEWS.
2012-05-15 18:26:48 -03:00
David Bremner
3fb08bc125 version: bump to 0.13 2012-05-15 18:18:45 -03:00
Jameson Graef Rollins
069aa1892f add NEWS item about new emacs tagging interface.
This is fairly important to mention, since it represents a user
interface change.
2012-05-15 18:12:29 -03:00
Stefano Zacchiroli
0dbe49e952 debian: recommend notmuch-mutt as an alternative user interface
Recommend all notmuch UI (including notmuch-mutt) as alternatives, to
avoid unneeded vim/emacs installation.

Thanks Matteo F. Vescovi for the patch.

Closes: #673011
2012-05-15 13:51:01 -03:00
Austin Clements
7a88e60868 news: Update for changes to notmuch_database_get_directory 2012-05-15 08:59:22 -03:00
Austin Clements
bc4000a952 ruby: Update for changes to notmuch_database_get_directory 2012-05-15 08:59:05 -03:00
Austin Clements
ed4f73a080 python: Update for changes to notmuch_database_get_directory
notmuch_database_get_directory now returns
NOTMUCH_STATUS_READ_ONLY_DATABASE on its own (rather than crashing) so
the workaround in Database.get_directory is no longer necessary.
2012-05-15 08:58:47 -03:00
Austin Clements
cdaf253c99 go: Update for changes to notmuch_database_get_directory 2012-05-15 08:58:36 -03:00
Austin Clements
7199d22f43 lib/cli: Make notmuch_database_get_directory return a status code
Previously, notmuch_database_get_directory had no way to indicate how
it had failed.  This changes its prototype to return a status code and
set an out-argument to the retrieved directory, like similar functions
in the library API.  This does *not* change its currently broken
behavior of creating directory objects when they don't exist, but it
does document it and paves the way for fixing this.  Also, it can now
check for a read-only database and return
NOTMUCH_STATUS_READ_ONLY_DATABASE instead of crashing.

In the interest of atomicity, this also updates calls from the CLI so
that notmuch still compiles.
2012-05-15 08:56:33 -03:00
Justus Winter
8a810c485f NEWS: add an entry for the go 1 compatibility
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-12 16:51:37 -03:00
Justus Winter
1952889353 go: format the souce code using gofmt
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:36:43 -03:00
Justus Winter
3113731713 go: update the build system
The new "go" utility does not require any Makefiles to compile go
packages and programs. Remove the old Makefiles and replace the top
level Makefile with one defining some convenience targets for
compiling the notmuch bindings and the notmuch-addrlookup utility.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:36:30 -03:00
Justus Winter
9bf6eec1a5 go: update the addrlookup utility to go 1
Use the new built in error type that replaces os.Error, adapt the code
to the fact that strings.Split has just two arguments now.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:35:50 -03:00
Justus Winter
3760a79b3f go: set LDFLAGS to -lnotmuch in the packages source file
Set the LDFLAGS to -lnotmuch so the resulting go package will be
linked with libnotmuch.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:35:38 -03:00
Justus Winter
97565b77cd go: reorganize the go bindings
go 1 introduced the "go" program that simplifies building of libraries
and programs. This patch reorganizes the go code so it can be compiled
using the new utility, it does not change any files.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:32:44 -03:00
Justus Winter
f83a5c6241 go: define the constant STATUS_UNBALANCED_ATOMIC
Add the constant STATUS_UNBALANCED_ATOMIC to the list of notmuch
status codes.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:28:33 -03:00
Justus Winter
0af7295faf go: fix the notmuch status constants
Formerly all the constants were set to zero since in golang constants
are set to the previous value if no new value is specified. Use the
iota operator that is incremented after each use to fix this issue.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:28:21 -03:00
Justus Winter
9f5478637c go: update notmuch-addrlookup to the new API
notmuch.OpenDatabase now returns a status indicating success or
failure. Use this information to inform the user of any failures.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:28:06 -03:00
David Bremner
ece52759a5 debian: fix suite
Since I already pushed a tag 0.13_rc-1, let's just increment the
debian version to keep everything tidy.
2012-05-08 21:40:41 -03:00
David Bremner
a4b10675bf bump version to 0.13~rc1 2012-05-08 14:49:08 -03:00
Ali Polatel
a8e010962f ruby: Add wrapper for notmuch_query_set_omit_excluded() 2012-05-08 10:34:50 -03:00
Ali Polatel
82b73ffd73 ruby: Add workarounds to use in-tree build not the installed one
- Make mkmf use the notmuch.h under ../../lib
- Use libnotmuch.a instead of linking to the installed libnotmuch.so
2012-05-08 10:34:33 -03:00
Ali Polatel
92680f12eb ruby: Add wrapper for notmuch_query_add_tag_exclude 2012-05-08 10:32:56 -03:00
Ali Polatel
d0000daab3 ruby: Add wrapper for notmuch_query_count_messages 2012-05-08 10:32:45 -03:00
Dmitry Kurochkin
4997ec9571 emacs: fix custom queries section customization widget in notmuch-hello
The customization widget referred to a non-existing function
`notmuch-hello-insert-query-list'.  The patch changes it to the
correct one - `notmuch-hello-insert-searches'.  The relevant test is
fixed now.
2012-05-06 19:44:55 -03:00
Dmitry Kurochkin
512df7ec47 test: add Emacs notmuch-hello tests for custom tags and queries section.
The tests use default values from customization widgets to make sure
that these customization widgets work (at least on basic level).

The custom queries section test is currently broken.
2012-05-06 19:44:42 -03:00
Adam Wolfe Gordon
97efed0f08 test: Force reply to use html2text for consistency
The output of the HTML reply test in the emacs suite can vary
depending on which HTML renderers are installed on the machine running
the tests. The renderer that is always available is emacs's builtin
html2text function. In order to get consistency, force the test to use
html2text even if other renderers are available.
2012-05-06 19:41:52 -03:00
Michal Sojka
e02c179c8f emacs: Do not pass stderr of notmuch reply to JSON parser
Sometimes, notmuch reply outputs something to stderr, for example:
"Failed to verify signed part: Cannot verify multipart/signed part:
unsupported signature protocol". When this happens, replying in emacs
fails, because emacs cannot parse the error message as JSON.

This patch causes emacs to ignore stderr when reading reply from
notmuch.
2012-05-06 08:49:38 -03:00
Thomas Jost
832fd1a7a6 emacs: Let the user choose where to compose new mails
Introduce a new defcustom notmuch-mua-compose-in that allows users to
specify where new mails are composed, either in the current window or
in a new window or frame.

Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
2012-05-06 08:49:05 -03:00
Adam Wolfe Gordon
f6c170fabc emacs: Correctly quote non-text/plain parts in reply
Quote non-text parts nicely by displaying them with mm-display-part
before calling message-cite-original to quote them. HTML-only emails
can now be quoted correctly. We re-use some code from notmuch-show
(notmuch-show-mm-display-part-inline), which has been moved to
notmuch-lib.el.

Mark the test for this feature as not broken.
2012-05-06 08:48:11 -03:00