Commit graph

4504 commits

Author SHA1 Message Date
Mark Walters
9701e9c7d5 contrib: pick: remove sync tests
Since the previous commit removed the sync parser we may as well
remove its tests too.
2013-08-27 08:01:32 -03:00
Mark Walters
a56449c24c contrib: pick: remove sync parser
Previously pick had the option of using an async parser like search or
a sync parser like show. The async parser has always been the default
and it seems fine so we can remove the sync one and the corresponding
defcustom.
2013-08-27 08:01:15 -03:00
Tomi Ollila
dd8ea3203c test: test notmuch show --include-html option
Test new --include-html option added to notmuch show command with
json output message parts containing text in latin1 and utf8 format.
2013-08-27 07:57:59 -03:00
John Lenz
f735a85c28 cli: add --include-html option to notmuch show
For my client, the largest bottleneck for displaying large threads is
exporting each html part individually since by default notmuch will not
show the json parts.  For large threads there can be quite a few parts and
each must be exported and decoded one by one.  Also, I then have to deal
with all the crazy charsets which I can do through a library but is a
pain.

Therefore, this patch adds an --include-html option that causes the
text/html parts to be included as part of the output of show.

diff man/man1/notmuch-show.1
2013-08-27 07:57:36 -03:00
Tomi Ollila
3e60e0b3e9 emacs: removed 3 duplicate functions from notmuch-show.el
notmuch-show.el and notmuch.el had 3 duplicate, identical functions:
notmuch-foreach-mime-part, notmuch-count-attachments and
notmuch-save-attachments. Now these functions in notmuch-show.el
are replaced with declare-functions pointing to "notmuch"(.el).
2013-08-27 07:53:28 -03:00
Jani Nikula
01f550803c man: clarify folder: prefix regarding duplicate files
The results for folder: prefix are a source of recurring confusion.
2013-08-24 11:44:52 +02:00
Jani Nikula
f45c9f831f NEWS: cli options for improved duplicate message handling 2013-08-24 11:44:31 +02:00
Jani Nikula
312837e46a man: document notmuch count --output=files
Document the notmuch count --output=files option.
2013-08-24 11:44:23 +02:00
Jani Nikula
09f8ef3e3d test: test notmuch count --output=files
Add tests for notmuch count --output=files option.
2013-08-24 11:44:12 +02:00
Jani Nikula
431571242c cli: add --output=files option to notmuch count
Add support for querying the total number of files associated with the
messages matching the search. This is mostly useful with an
id:<message-id> query for a single message.
2013-08-24 11:42:39 +02:00
Jani Nikula
cbc1b143db man: document notmuch search --duplicate=N
Document the notmuch search --duplicate=N option.
2013-08-24 11:42:30 +02:00
Jani Nikula
820a88eaaa test: test notmuch search --duplicate=N
Add test for notmuch search --duplicate=N option.
2013-08-24 11:42:18 +02:00
Jani Nikula
cc4fb2c172 cli: add --duplicate=N option to notmuch search
Effective with --output=files, output the Nth filename associated with
each message matching the query (N is 1-based). If N is greater than
the number of files associated with the message, don't print anything.
2013-08-24 11:41:55 +02:00
Blake Jones
d416294ae8 notmuch-config: use strchr(), not index() (Solaris support)
notmuch-config.c has the only use of the function named "index()" in the
notmuch source.  Several other places use the equivalent function
"strchr()"; this patch just fixes notmuch-config.c to use strchr()
instead.  (Solaris needs to include <strings.h> to get the prototype for
index(), and notmuch-config.c was failing to include that header, so it
wasn't compiling as-is.)
2013-08-24 11:37:51 +02:00
Mark Walters
e3c2be3e25 contrib: pick: use close-message-pane for reply etc
We can save some code duplication by using the new close-message-pane
functionality for reply, forward, and new mail.
2013-08-24 11:27:22 +02:00
Mark Walters
863d9aa674 contrib: pick: add in binding to view raw message
Note this does rely on the fact that we have over-ridden notmuch-show-get-properties
2013-08-24 11:19:14 +02:00
Mark Walters
8349173e96 contrib: pick: make help close the message pane first
Previously pressing "?" for help when the message pane was open meant
the help window was very small. Close the message pane before
displaying help.
2013-08-24 11:18:48 +02:00
Mark Walters
d3ef0f74cf contrib: pick: close window function 2013-08-24 11:18:01 +02:00
Mark Walters
d3924d5798 contrib: pick: pass tab through to the message pane
This makes tab move to next button in the message pane and binds
button activate (in message pane) to "e". This means that is easy to
toggle hidden parts or hidden citations etc in the message pane.
2013-08-24 11:17:44 +02:00
Mark Walters
415d5da7dd contrib: pick: add button press helper
We will want to be able to activate buttons not in the current
buffer (ie in the message pane) so it is helpful to have a way of
activating a button without signalling error if there is no button.
2013-08-24 11:17:16 +02:00
Mark Walters
1c591115d6 contrib: pick: add in to-message-window function 2013-08-24 11:16:58 +02:00
Mark Walters
5728d178f7 contrib: pick: Link in stash map straight from notmuch-show
These functions all now work straight from their notmuch-show
implementation so link them in.

Stash functionality was one of the key missing things in notmuch-pick.
2013-08-24 11:16:45 +02:00
Mark Walters
84e30ea789 contrib: pick: Link in attachment functions straight from notmuch-show
We can use the attachment functions straight from
notmuch-show. notmuch-show-view-all-mime-parts might be deprecated so
we either want to undeprecate it or not have this binding.
2013-08-24 11:16:03 +02:00
Mark Walters
a79396999c contrib: pick: Link in notmuch-show-pipe-message
Since we can now use show functions directly in pick we can drop pick-pipe-message.
2013-08-24 11:15:44 +02:00
Mark Walters
1716edff9d contrib: pick: override notmuch-show-get-prop
We override notmuch-show-get-prop so that many of the show functions
can be used in notmuch-pick without modification. The main use is that
it means notmuch-show-get-message-id `works' in pick. Thus we get all
the stash functions and several other `for free' in pick.
2013-08-24 11:15:23 +02:00
Blake Jones
8c6b2e7e9d timegm: add portable implementation (Solaris support)
The timegm(3) function is a non-standard extension to libc which is
available in GNU libc and on some BSDs.  Although SunOS had this
function in its libc, Solaris (unfortunately) removed it.  This patch
implements a very simple version of timegm() which is good enough for
parse-time-string.c.

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
2013-08-23 17:57:35 +02:00
Blake Jones
43843745dc strsep: check for availability (Solaris support)
Solaris does not ship a version of the strsep() function.  This change
adds a check to "configure" to see whether notmuch needs to provide its
own implementation, and if so, it uses the new version in
"compat/strsep.c" (which was copied from Mutt, and apparently before
that from glibc).

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
2013-08-23 17:55:39 +02:00
Vladimir Marek
49a0b96486 asctime: check for standards compliance (Solaris support)
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs
to be defined to get the right number of arguments in the prototypes for
asctime_r().  Solaris' default implementation conforms to POSIX.1c
Draft 6, rather than the final POSIX.1c spec.  The standards-compliant
version can be used by defining _POSIX_PTHREAD_SEMANTICS.

This change also adds the file "compat/check_asctime.c", which
configure uses to perform its check, and modifies compat/compat.h to
define _POSIX_PTHREAD_SEMANTICS if configure detected it was needed.

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
2013-08-23 17:55:23 +02:00
Blake Jones
31c7001c99 getpwuid: check for standards compliance (Solaris support)
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs
to be defined to get the right number of arguments in the prototypes for
getpwuid_r().  Solaris' default implementation conforms to POSIX.1c
Draft 6, rather than the final POSIX.1c spec.  The standards-compliant
version can be used by defining _POSIX_PTHREAD_SEMANTICS.

This change also adds the file "compat/check_getpwuid.c", which
configure uses to perform its check, and modifies compat/compat.h to
define _POSIX_PTHREAD_SEMANTICS if configure detected it was needed.

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
2013-08-23 17:53:17 +02:00
Austin Clements
e41cd1c518 test: Canonicalize RFC 2047 encoding and charset
RFC 2047 states that the encoding and charset in an encoded word are
case-insensitive, so force them to lower case in the reply test.  This
fixes an issue caused by GMime versions (somewhere between 2.6.10 and
2.6.16), which changed the capitalization of the encoding.
2013-08-20 09:14:25 +02:00
Austin Clements
dc51bf0ad4 reply: Use RFC 2822/MIME wholly for text format template
Previously, reply's default text format used an odd mix of RFC 2045
MIME encoding for the reply template's body and some made-up RFC
2822-like UTF-8 format for the headers.  The intent was to present the
headers to the user in a nice, un-encoded format, but this assumed
that whatever ultimately sent the email would RFC 2047-encode the
headers, while at the same time the body was already RFC 2045 encoded,
so it assumed that whatever sent the email would *not* re-encode the
body.

This can be fixed by either producing a fully decoded UTF-8 reply
template, or a fully encoded MIME-compliant RFC 2822 message.  This
patch does the latter because it is

a) Well-defined by RFC 2822 and MIME (while any UTF-8 format would be
   ad hoc).

b) Ready to be piped to sendmail.  The point of the text format is to
   be minimal, so a user should be able to pop up the template in
   whatever editor they want, edit it, and push it to sendmail.

c) Consistent with frontend capabilities.  If a frontend has the
   smarts to RFC 2047 encode the headers before sending the mail, it
   probably has the smarts to RFC 2047 decode them before presenting
   the template to a user for editing.

Also, as far as I know, nothing automated consumes the reply text
format, so changing this should not cause serious problems.  (And if
anything does still consume this format, it probably gets these
encoding issues wrong anyway.)
2013-08-17 09:06:08 +02:00
Austin Clements
6cdab6e0b7 reply: Remove extraneous space from generated References
Previously, the References header code seemed to assume
notmuch_message_get_header would return NULL if the header was not
present, but it actually returns "".  As a result of this, it was
inserting an unnecessary space when concatenating an empty or missing
original references header with the new reference.

This shows up in only two tests because the text reply format later
passes the whole reply template through g_mime_filter_headers, which
has the side effect of stripping out this extra space.
2013-08-17 09:05:44 +02:00
Austin Clements
ad7bb423fb reply: Test replying to messages with RFC 2047-encoded headers 2013-08-17 09:04:07 +02:00
Austin Clements
a7696844f0 test: Make symbol-test depend on libnotmuch.so
Without this
$ make -j test
intermittently fails and
$ make clean; make test/symbol-test
always fails (not that anybody would do the latter).
2013-08-15 11:35:30 +02:00
Austin Clements
013d11c9f7 reply: Document the reason for g_mime_filter_headers
Given how long it took me to figure out why we pass the reply headers
through g_mime_filter_headers, it's worth a comment.
2013-08-13 17:44:08 +02:00
Austin Clements
3fbb518335 lib: Document which strings are returned in UTF-8
Any string that ultimately comes from notmuch_message_file_get_header
is in UTF-8.
2013-08-13 17:43:34 +02:00
Austin Clements
a7bf045fb1 lib: Correct out-of-date doc comment
notmuch_message_get_header started returning some headers straight
from the database in 567bcbc, but this comment explicitly claimed all
headers were read from the message file.
2013-08-13 17:43:07 +02:00
David Bremner
48f2b3f1bc release: synchronize dates
man pages, NEWS, and debian changelog all hardcode date.  Make them
hardcode the same date.
2013-08-03 08:29:40 -03:00
Mark Walters
15f5fc513d emacs: bugfix attachment content-type as mime-type handling
Notmuch puts attachments in as declared content-type except when the
content-type is application/octet-stream it tries to guess the type
from the filename/extension. This means that viewing a pdf (for
example) which is sent as application/octet-strem invokes the pdf
viewer rather than just offering to save the part.

Recent changes to the attachment handling (commit 1546387d) changed
(broke) this. This patch stores the calculated mime-type with the part
and changes the attachment part handlers can use it instead.
2013-07-31 17:46:09 -03:00
David Bremner
29762dd15e debian: rename notmuch-ruby to ruby-notmuch
This seems more in line with

http://wiki.debian.org/Teams/Ruby/Packaging#Guidelines_for_Ruby_packaging
2013-07-28 14:28:25 -03:00
David Bremner
0eb4213766 debian: build notmuch-vim again
Based on id:1370220299-14722-1-git-send-email-felipe.contreras@gmail.com

Hacked rather extensively by db. The most important changes:

       - bring back notmuch.yaml for the (debian specific?) vim-addons
         tool.
       - depend on vim-ruby, so we get a version of vim with ruby installed.
2013-07-28 13:48:02 -03:00
David Bremner
ec98f13a70 debian: update symbols for libnotmuch
Adding a new symbol should require an SONAME bump.
2013-07-28 11:28:04 -03:00
David Bremner
b739761629 debian: add alot to recommends
Since this is in a disjunction, this should not force new packages to
be installed, but rather let people with auto-install-recommends (the
default) on install notmuch without emacs.
2013-07-28 11:28:04 -03:00
David Bremner
59517e1816 debian: note that we now provide a notmuch-dbg package
This is already in upstream for a bit, but we lacked a changelog entry
closing the bug.
2013-07-28 11:28:03 -03:00
David Bremner
aef1c9cfa0 debian: close bug requesting packaging of notmuch-deliver
notmuch insert is pretty much equivalent, so no need to support both.
2013-07-28 11:28:03 -03:00
David Bremner
85bf67b24d debian: start new changelog entry
Since Debian uses the changelog as metadata, we need an empty stanza
to build the new version.
2013-07-28 11:28:03 -03:00
David Bremner
80b25792b2 version: set new version and release date
These are manually set in version and NEWS, and propagate to the other files via
"make update-versions"
2013-07-28 11:28:03 -03:00
Austin Clements
a933d45580 Put 0.16 NEWS in a reasonable order
The 0.16 NEWS grew chronologically during development, and as a result
wound up in a particularly odd order.  This rearranges it to put the
most user-visible news first.  Roughly: new features, modified
behavior, bug fixes, then deprecation, with related items grouped.

This does not modify the text of any of the news.
2013-07-28 09:51:42 -03:00
Mark Walters
e395f4507d emacs: hello: make --batch error gracefully
Recently notmuch-hello was converted to use batch count. However, it
seems that several people run different versions of notmuch-emacs and
notmuch-cli so this batch makes emacs fail with an error message if
--batch is not available in the CLI.

Amended by: db
2013-07-27 18:22:37 -03:00
Austin Clements
bd4704aa5c emacs: News for S-expressions everywhere
Update the news about search using S-expression support to also say
that show is also now faster.
2013-07-22 08:18:42 -03:00