Re: [PATCH v3 2/2] Add compatibility with gmime 2.6

2012-01-20 Thread Thomas Jost
On Thu, 19 Jan 2012 23:10:44 -0500, Austin Clements amdra...@mit.edu wrote: Nearly there. A few more small comments. Thanks again :) Will post new version soon, including a new patch to update NEWS and INSTALL. Quoth Thomas Jost on Jan 20 at 1:06 am: There are lots of API changes in gmime

[PATCH v4 1/3] show: don't use hex literals in JSON output

2012-01-20 Thread Thomas Jost
JSON does not support hex literals (0x..) so numbers must be formatted as %d instead of %x. --- notmuch-show.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index d14dac9..91f566c 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@

[PATCH v4 2/3] Add compatibility with gmime 2.6

2012-01-20 Thread Thomas Jost
There are lots of API changes in gmime 2.6 crypto handling. By adding preprocessor directives, it is however possible to add gmime 2.6 compatibility while preserving compatibility with gmime 2.4 too. This is mostly based on id:8762i8hrb9@bookbinder.fernseed.info. This was tested against both

[PATCH v4 3/3] Update NEWS and INSTALL about gmime 2.6

2012-01-20 Thread Thomas Jost
--- INSTALL | 12 ++-- NEWS|9 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/INSTALL b/INSTALL index e51b397..bc98f1d 100644 --- a/INSTALL +++ b/INSTALL @@ -20,8 +20,8 @@ configure stage. Dependencies -Notmuch depends on three

Re: [PATCH v4 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-20 Thread Mark Walters
On Thu, 19 Jan 2012 23:30:23 -0500, Austin Clements amdra...@mit.edu wrote: One indentation nit and then this LGTM. + (lexical-let ((message-id message-id) + (nth nth) + (filename filename) + (content-type content-type)) +

[PATCH v5] Make buttons for attachments allow viewing as well as saving

2012-01-20 Thread Mark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other

Re: [PATCH v3 5/5] emacs: Use message-citation-line-format in reply

2012-01-20 Thread David Edmondson
On Fri, 20 Jan 2012 00:53:39 -0500, Aaron Ecay e...@sas.upenn.edu wrote: I’m personally of the opinion that notmuch should just say “the mail composition facility is provided by message mode (here is the documentation on customizing it)”. In general, +1. One possible step that might ease the

[PATCH 3/3] emacs: Optionally hide some part headers.

2012-01-20 Thread David Edmondson
Add a regexp, `notmuch-show-part-headers-hidden' and if the content-type of a part matches, don't show the part header. --- emacs/notmuch-show.el | 41 +++-- 1 files changed, 27 insertions(+), 14 deletions(-) diff --git a/emacs/notmuch-show.el

Re: [PATCH] emacs: Quote MML tags in replies

2012-01-20 Thread David Edmondson
On Thu, 19 Jan 2012 13:43:09 -0500, Aaron Ecay aarone...@gmail.com wrote: - (message-goto-body)) + (message-goto-body) + (mml-quote-region (point) (mark))) Obviously good. It would be nice to have a comment about why it's `mark' and not `point-max'. In fact, it would be good to have a

[PATCH 1/3] emacs: Tidy `notmuch-show-insert-part-header'.

2012-01-20 Thread David Edmondson
--- emacs/notmuch-show.el | 26 -- 1 files changed, 12 insertions(+), 14 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 03c1f6b..f62f8ac 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -286,20 +286,18 @@ message at DEPTH

[PATCH 2/3] emacs: Don't return the button from `notmuch-show-insert-part-header'.

2012-01-20 Thread David Edmondson
Instead, allow the caller to specify some parameters for the button. Rework `notmuch-show-insert-part-multipart/signed' and `notmuch-show-insert-part-multipart/encrypted' accordingly, moving most of the code into a common `notmuch-show-insert-part-multipart/signed-or-encrypted' to reduce

Re: [afew] announcing afew, an universal tagging solution with some fancy features

2012-01-20 Thread Patrick Totzke
Quoting Justus Winter (2011-12-21 08:53:23) Hey Pazz, Quoting Patrick Totzke (2011-12-19 19:17:12) Also, should i not get some output when calling afew with -vv ? Yes you should ;). Here's an example run on my box: Alright, I do get logging output with upstream master thanks. FYI: I found the

Re: Updated remote script

2012-01-20 Thread Tomi Ollila
On Thu, 19 Jan 2012 15:31:02 -0500, Jesse Rosenthal jrosent...@jhu.edu wrote: Hi Tomi, On Thu, 19 Jan 2012 19:50:38 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: Quick comments: /tmp/notmuch_dtach.socket is dangerous (and the _ssh). either make directory /tmp/notmuch_`id -u`

Re: [PATCH] config: Better formatting for search section comment

2012-01-20 Thread David Bremner
On Wed, 18 Jan 2012 15:56:45 -0500, Austin Clements amdra...@mit.edu wrote: Since auto_exclude_tags is long and its description is multi-line, start the description on the next line and indent it consistently. --- pushed d ___ notmuch mailing list

Re: [PATCH v3] emacs: add invisible dot instead of space at the end of notmuch-hello search box

2012-01-20 Thread Tomi Ollila
On Fri, 20 Jan 2012 00:52:14 +0100, Pieter Praet pie...@praet.org wrote: From: Dmitry Kurochkin dmitry.kuroch...@gmail.com This makes `show-trailing-whitespace' happy, i.e. it does not mark the whole search box line as trailing spaces. Since the dot is invisible, this change makes no

Re: [afew] announcing afew, an universal tagging solution with some fancy features

2012-01-20 Thread Justus Winter
Quoting Patrick Totzke (2012-01-20 11:40:41) Quoting Justus Winter (2011-12-21 08:53:23) Hey Pazz, Quoting Patrick Totzke (2011-12-19 19:17:12) Also, should i not get some output when calling afew with -vv ? Yes you should ;). Here's an example run on my box: Alright, I do get logging output

Re: [PATCH v4 1/3] show: don't use hex literals in JSON output

2012-01-20 Thread David Bremner
On Fri, 20 Jan 2012 10:39:23 +0100, Thomas Jost schno...@schnouki.net wrote: JSON does not support hex literals (0x..) so numbers must be formatted as %d instead of %x. --- notmuch-show.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Probably I'm just being lazy here, but can

Re: [PATCH] emacs: Quote MML tags in replies

2012-01-20 Thread David Bremner
On Thu, 19 Jan 2012 13:43:09 -0500, Aaron Ecay aarone...@gmail.com wrote: Emacs message-mode uses certain text strings to indicate how to attach files to outgoing mail. If these are present in the text of an email, and a user is tricked into replying to the message, the user’s files could be

Re: [PATCH v4 1/3] show: don't use hex literals in JSON output

2012-01-20 Thread Thomas Jost
On Fri, 20 Jan 2012 07:55:03 -0400, David Bremner da...@tethera.net wrote: On Fri, 20 Jan 2012 10:39:23 +0100, Thomas Jost schno...@schnouki.net wrote: JSON does not support hex literals (0x..) so numbers must be formatted as %d instead of %x. --- notmuch-show.c |2 +- 1 files

Re: [PATCH v4 1/3] show: don't use hex literals in JSON output

2012-01-20 Thread David Bremner
On Fri, 20 Jan 2012 13:33:58 +0100, Thomas Jost schno...@schnouki.net wrote: The most common gmime error codes are 1 (expired signature), 2 (no public key), 4 (expired key) and 8 (revoked key). The other possible value is 16 (unsupported algorithm) but obviously it is much more rare. If this

Re: [PATCH] Add pseudo-compatibility with gmime 2.6

2012-01-20 Thread Tomi Ollila
On Fri, 20 Jan 2012 00:52:47 +0100, Thomas Jost schno...@schnouki.net wrote: Here is how I did: (ldd notmuch | grep -q gmime-2.6) test_subtest_known_broken ldd notmuch will show /path/to/libgmime-2.4.so.* or libgmime-2.6.so.* so we can easily check this in the test suite. It's a

Re: [PATCH 2/3] show: Use consistent header ordering in the text format

2012-01-20 Thread Tomi Ollila
On Wed, 18 Jan 2012 15:28:26 -0500, Austin Clements amdra...@mit.edu wrote: Previously, top-level message headers were printed as Subject, From, To, Date, while embedded message headers were printed From, To, Subject, Date. This makes both cases use the former order and updates the tests

Re: [PATCH v3 1/2] show: Handle read and write errors

2012-01-20 Thread Tomi Ollila
On Thu, 19 Jan 2012 17:29:18 -0500, Austin Clements amdra...@mit.edu wrote: For showing a message in raw format, rather than silently succeeding when a read or a write fails (or, probably, looping if a read fails), try to print an error message and exit with a non-zero status. This silences

Re: [PATCH v3 2/2] Silence buildbot warnings about unused results

2012-01-20 Thread Tomi Ollila
On Thu, 19 Jan 2012 17:29:19 -0500, Austin Clements amdra...@mit.edu wrote: This ignores the results of the two writes in sigint handlers even harder than before. While my libc lacks the declarations that trigger these warnings, this can be tested by adding the following to notmuch.h:

Re: [PATCH] emacs: Make the part content available to `mm-inlinable-p'.

2012-01-20 Thread Tomi Ollila
On Thu, 19 Jan 2012 09:34:07 +, David Edmondson d...@dme.org wrote: The `mm-inlinable-p' function works better if it has access to the data of the relevant part, so load that content before calling it. Don't load the content for parts that the user has indicated no desire to inline.

Re: [PATCH v4 2/3] Add compatibility with gmime 2.6

2012-01-20 Thread Austin Clements
LGTM! Quoth Thomas Jost on Jan 20 at 10:39 am: There are lots of API changes in gmime 2.6 crypto handling. By adding preprocessor directives, it is however possible to add gmime 2.6 compatibility while preserving compatibility with gmime 2.4 too. This is mostly based on

Re: [PATCH v4 3/3] Update NEWS and INSTALL about gmime 2.6

2012-01-20 Thread Austin Clements
Quoth Thomas Jost on Jan 20 at 10:39 am: --- INSTALL | 12 ++-- NEWS|9 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/INSTALL b/INSTALL index e51b397..bc98f1d 100644 --- a/INSTALL +++ b/INSTALL @@ -20,8 +20,8 @@ configure stage.

tach.el: an attachment interface for message mode.

2012-01-20 Thread Jesse Rosenthal
Dear All, I sent this to the list a couple of years back, but now that things are moving again, and there are new eyes on the list, I thought I'd send it again. I believe I'm the only person to use this (and might well continue to be so) but I've been using it for a couple of years without any

Re: [PATCH] Automatically exclude tags in notmuch-show

2012-01-20 Thread Austin Clements
Quoth Mark Walters on Jan 20 at 12:10 am: Ok Having said this is trivial I have found a problem. What should notmuch do if you do something like notmuch show id:some-id and that message is marked with a deleted tag? To be consistent with the other cases (where a deleted message is in a

Re: tach.el: an attachment interface for message mode.

2012-01-20 Thread Aaron Ecay
Ha! As I was recently looking at the MML stuff, I spent some time googling around looking for this – I knew I had seen a “mutt-like” attachment interface for emacs mail writing, but I couldn’t seem to come across it. I will definitely get it set up and play with it. I don’t have cause to attach

Re: [PATCH v3 5/5] emacs: Use message-citation-line-format in reply

2012-01-20 Thread Adam Wolfe Gordon
Erk, forgot to reply-all. Aaron might get this twice. On Thu, Jan 19, 2012 at 22:53, Aaron Ecay e...@sas.upenn.edu wrote: (let ((message-citation-line-format (remove ?\n message-citation-line-format))) ...) (Or, if you think someone might have a newline other than at the end of the

Re: Improving notmuch query documentation [was: Re: Partial words on notmuch search?]

2012-01-20 Thread Mark Anderson
On Tue, 17 Jan 2012 16:29:23 -0600, Austin Clements amdra...@mit.edu wrote: Quoth Andrei Popescu on Jan 18 at 12:14 am: On Lu, 16 ian 12, 21:34:31, Austin Clements wrote: Quoth Andrei Popescu on Jan 16 at 10:21 pm: Where can I read more about this? (except the source :) Most of

Re: [PATCH] emacs: Make the part content available to `mm-inlinable-p'.

2012-01-20 Thread Jameson Graef Rollins
On Thu, 19 Jan 2012 09:34:07 +, David Edmondson d...@dme.org wrote: The `mm-inlinable-p' function works better if it has access to the data of the relevant part, so load that content before calling it. Don't load the content for parts that the user has indicated no desire to inline. So

Re: [PATCH v2] emacs: Make the part content available to the mm-inline* checks.

2012-01-20 Thread Jameson Graef Rollins
On Wed, 18 Jan 2012 14:35:01 -0500, Austin Clements amdra...@mit.edu wrote: Shouldn't we only be doing this for parts with inline (or not attachment) content-disposition? That's cheap to check. Or do we actually want things like image attachments to get inlined, despite their disposition?

Re: [PATCH 2/3] emacs: Don't return the button from `notmuch-show-insert-part-header'.

2012-01-20 Thread Jameson Graef Rollins
On Fri, 20 Jan 2012 09:43:31 +, David Edmondson d...@dme.org wrote: The buttons inserted for encrypted parts are slightly different now - previously the logic was that if a part was encrypted it would have the signature status inserted only if the encryption status was specified. Now the

Re: [afew] announcing afew, an universal tagging solution with some fancy features

2012-01-20 Thread Kazuo Teramoto
On Fri, Jan 20, 2012 at 12:26:05PM +0100, Justus Winter wrote: Quoting Patrick Totzke (2012-01-20 11:40:41) I suspect you don't split the config value and thus afew ended up with a false tag new;. its just cosmetics but nevertheless.. Hm, actually it does exactly that: def

[PATCH] lib: Save filenames for files detected as not an email file in the database.

2012-01-20 Thread Austin Clements
Later runs of notmuch new won't scan these files again and won't print warnings. Various programs (Dovecot, in my case) store indexes and caches and such in the maildir. Without this, notmuch persistently complains about such files. --- Every time I run notmuch new I get a slew of these

Re: [PATCH v3 5/5] emacs: Use message-citation-line-format in reply

2012-01-20 Thread Tomi Ollila
On Fri, 20 Jan 2012 10:22:09 -0700, Adam Wolfe Gordon awg+notm...@xvx.ca wrote: Erk, forgot to reply-all. Aaron might get this twice. Pick this: notmuch@notmuchmail.org (and add to to/cc) next time you forgot to press 'R' (that's what I do :) On Thu, Jan 19, 2012 at 22:53, Aaron Ecay

Re: tach.el: an attachment interface for message mode.

2012-01-20 Thread Xavier Maillard
On Fri, 20 Jan 2012 12:04:49 -0500, Jesse Rosenthal jrosent...@jhu.edu wrote: [ ... ] Thus: tach.el. Tach is a minor mode that adds mutt-like attachment handling to message mode. It's not notmuch specific, but I wrote it to use with notmuch, and I thought it might be of use to some on the

Re: [PATCH v4 2/3] Add compatibility with gmime 2.6

2012-01-20 Thread Tomi Ollila
On Fri, 20 Jan 2012 10:39:24 +0100, Thomas Jost schno...@schnouki.net wrote: There are lots of API changes in gmime 2.6 crypto handling. By adding preprocessor directives, it is however possible to add gmime 2.6 compatibility while preserving compatibility with gmime 2.4 too. This is mostly

Re: tach.el: an attachment interface for message mode.

2012-01-20 Thread Jesse Rosenthal
Hi Xavier, On Fri, 20 Jan 2012 23:43:01 +0100, Xavier Maillard xav...@maillard.im wrote: I like it. Thanks for giving it a try. Simple but at first it is not easy to understand what to do with that window. Also, there is no way to toggle the window visibility. But for a first shot, it is a

Re: [afew] announcing afew, an universal tagging solution with some fancy features

2012-01-20 Thread Justus Winter
Quoting Kazuo Teramoto (2012-01-20 22:55:08) On Fri, Jan 20, 2012 at 12:26:05PM +0100, Justus Winter wrote: Quoting Patrick Totzke (2012-01-20 11:40:41) I suspect you don't split the config value and thus afew ended up with a false tag new;. its just cosmetics but nevertheless.. Hm, actually

[PATCH] emacs: fix tests wrt notmuch-hello invisible dot

2012-01-20 Thread Dmitry Kurochkin
On Thu, 19 Jan 2012 22:31:14 +0100, Pieter Praet wrote: > Not meant to be applied! > > Should be merged into > id:"1326815734-20421-1-git-send-email-dmitry.kurochkin at gmail.com" > Oops. I managed to miss the failing tests. I would send a new patch version. Regards, Dmitry > --- >

[PATCH] emacs: Quote MML tags in replies

2012-01-20 Thread Pieter Praet
On Thu, 19 Jan 2012 17:52:23 -0500, Aaron Ecay wrote: > On Thu, 19 Jan 2012 17:46:31 -0500, Austin Clements > wrote: > > > ### OT: > > > For some reason, `mml-quote-region' explicitly re-quotes > > > already quoted MML tags: > > > > > > "<#!*/?\\(multipart\\|part\\|external\\|mml\\)" > > >

[PATCH] emacs: Quote MML tags in replies

2012-01-20 Thread Pieter Praet
On Thu, 19 Jan 2012 17:56:16 -0500, Aaron Ecay wrote: > On Thu, 19 Jan 2012 17:48:42 -0500, Austin Clements > wrote: > > Did you consider using point-max instead of mark? IIRC, that mark was > > very recently introduced which, perhaps irrationally, makes it seem > > less future-proof to me. >

[PATCH v2 2/2] Add pseudo-compatibility with gmime 2.6

2012-01-20 Thread Thomas Jost
TIFICATE_TRUST_FULLY || trust == > > GMIME_CERTIFICATE_TRUST_ULTIMATE)) > > + printf (", \"userid\": %s", json_quote_str (ctx_quote, > > name)); > > + } > > + } else if (certificate) { > > + const char *key_id = g_mime_certificate_get_key_id (certificate); > > + if (key_id) > > + printf (", \"keyid\": %s", json_quote_str (ctx_quote, key_id)); > > + } > > + > > + GMimeSignatureError errors = g_mime_signature_get_errors (signature); > > + if (errors != GMIME_SIGNATURE_ERROR_NONE) { > > + printf (", \"errors\": %d", errors); > > + } > > + > > + printf ("}"); > > + } > > + > > +printf ("]"); > > + > > +talloc_free (ctx_quote); > > +} > > +#else > > static void > > format_part_sigstatus_json (const GMimeSignatureValidity* validity) > > { > > @@ -652,6 +739,7 @@ format_part_sigstatus_json (const > > GMimeSignatureValidity* validity) > > > > talloc_free (ctx_quote); > > } > > +#endif > > > > static void > > format_part_content_json (GMimeObject *part) > > @@ -990,13 +1078,20 @@ notmuch_show_command (void *ctx, unused (int argc), > > unused (char *argv[])) > > } else if ((STRNCMP_LITERAL (argv[i], "--verify") == 0) || > >(STRNCMP_LITERAL (argv[i], "--decrypt") == 0)) { > > if (params.cryptoctx == NULL) { > > +#ifdef GMIME_26 > > + /* TODO: GMimePasswordRequestFunc */ > > + if (NULL == (params.cryptoctx = g_mime_gpg_context_new(NULL, > > "gpg"))) > > +#else > > GMimeSession* session = g_object_new(g_mime_session_get_type(), > > NULL); > > if (NULL == (params.cryptoctx = g_mime_gpg_context_new(session, > > "gpg"))) > > +#endif > > fprintf (stderr, "Failed to construct gpg context.\n"); > > else > > > > g_mime_gpg_context_set_always_trust((GMimeGpgContext*)params.cryptoctx, > > FALSE); > > +#ifndef GMIME_26 > > g_object_unref (session); > > session = NULL; > > +#endif > > } > > if (STRNCMP_LITERAL (argv[i], "--decrypt") == 0) > > params.decrypt = 1; > > diff --git a/show-message.c b/show-message.c > > index 8768889..65269fd 100644 > > --- a/show-message.c > > +++ b/show-message.c > > @@ -48,7 +48,11 @@ show_message_part (mime_node_t *node, > > format->part_encstatus (node->decrypt_success); > > > > if (node->verify_attempted && format->part_sigstatus) > > +#ifdef GMIME_26 > > + format->part_sigstatus (node->sig_list); > > +#else > > format->part_sigstatus (node->sig_validity); > > +#endif > > > > format->part_content (part); > > -- Thomas/Schnouki -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 489 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/35372ddb/attachment.pgp>

[PATCH v2 2/2] Add pseudo-compatibility with gmime 2.6

2012-01-20 Thread Thomas Jost
this might be useful when GMIME > 2.6 is available... > > Hopefully before GMIME 2.8 comes out, we'll be able to remove all of > the GMIME 2.4 compatibility. But GMIME_ATLEAST_26 would be fine, too. Heh, maybe things will change again in 2.8 and "ATLEAST_26" will become "

[PATCH] emacs: fix tests wrt notmuch-hello invisible dot

2012-01-20 Thread Pieter Praet
On Fri, 20 Jan 2012 02:37:30 +0400, Dmitry Kurochkin wrote: > On Thu, 19 Jan 2012 22:31:14 +0100, Pieter Praet wrote: > > Not meant to be applied! > > > > Should be merged into > > id:"1326815734-20421-1-git-send-email-dmitry.kurochkin at gmail.com" > > > > Oops. I managed to miss the

[PATCH] Add pseudo-compatibility with gmime 2.6

2012-01-20 Thread Thomas Jost
er > > > for an encrypted part with no signatures. For 2.6, I think this error > > > checking may have to move into the branches of the if encrypted/signed > > > since for encrypted parts you have to check if > > > g_mime_multipart_encrypted_decrypt returned NULL. > > > > That sound right. The weird part is that it did not cause anything to > > fail in the test suite... > > It would be worth adding a test with an encrypted but unsigned part. > I don't know enough GPG myself to do that. It looks like there's already one: "emacs delivery of encrypted message with attachment" + following decryptions. Regards, -- Thomas/Schnouki -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 489 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/1544b0d5/attachment.pgp>

[PATCH v3] emacs: add invisible dot instead of space at the end of notmuch-hello search box

2012-01-20 Thread Pieter Praet
From: Dmitry Kurochkin This makes `show-trailing-whitespace' happy, i.e. it does not mark the whole search box line as trailing spaces. Since the dot is invisible, this change makes no visible difference for `notmuch-hello'. Edited-by: Pieter Praet to fix the

[PATCH] Automatically exclude tags in notmuch-show

2012-01-20 Thread Pieter Praet
On Thu, 19 Jan 2012 17:59:10 -0500, Austin Clements wrote: > LGTM, but should definitely come with a test. > [...] > Also, this won't commute with Pieter's patch > (id:"1327000744-25463-2-git-send-email-pieter at praet.org"), so one or > the other will have to get updated. > No problem, I'll

[PATCH v3 0/2] gmime 2.6 compatibilty, 3rd iteration

2012-01-20 Thread Thomas Jost
Hi list, Here's another update of the patches to add gmime 2.6 compatibilty while still preserving compatibility with gmime 2.4. Any comments or review will be much appreciated. The changes compared to the previous version ([1] and [2]) are pretty minor: - space and indentation fixes -

[PATCH v3 1/2] show: don't use hex literals in JSON output

2012-01-20 Thread Thomas Jost
JSON does not support hex literals (0x..) so numbers must be formatted as %d instead of %x. --- notmuch-show.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index d14dac9..91f566c 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@

[PATCH v3 2/2] Add compatibility with gmime 2.6

2012-01-20 Thread Thomas Jost
There are lots of API changes in gmime 2.6 crypto handling. By adding preprocessor directives, it is however possible to add gmime 2.6 compatibility while preserving compatibility with gmime 2.4 too. This is mostly based on id:"8762i8hrb9.fsf at bookbinder.fernseed.info". This was tested against

[PATCH] Automatically exclude tags in notmuch-show

2012-01-20 Thread Mark Walters
Ok Having said this is trivial I have found a problem. What should notmuch do if you do something like notmuch show id: and that message is marked with a deleted tag? To be consistent with the other cases (where a deleted message is in a matched thread) we might want to return the message with

[PATCH] test: always report missing prereqs, independent of `--verbose' option

2012-01-20 Thread Pieter Praet
On Wed, 18 Jan 2012 15:53:59 +0200, Tomi Ollila wrote: > On Wed, 18 Jan 2012 13:19:41 +0100, Pieter Praet wrote: > > When tests are skipped due to missing prereqs, those prereqs are only > > displayed when running with the `--verbose' option. This is essential > > information when

[PATCH] test: always report missing prereqs, independent of `--verbose' option

2012-01-20 Thread Pieter Praet
On Fri, 20 Jan 2012 01:24:02 +0100, Pieter Praet wrote: > [...] > Most likely because "$test_subtest_missing_external_prereqs_" is only > reset at the beginning of every test series, so if an Emacs-dependent > subtest is skipped, all subsequent skipped subtests will report that > dependency as

[PATCH v3 5/5] emacs: Use message-citation-line-format in reply

2012-01-20 Thread Aaron Ecay
On Thu, 19 Jan 2012 21:46:46 -0700, Adam Wolfe Gordon wrote: > On Thu, Jan 19, 2012 at 11:45, Aaron Ecay wrote: > > Shouldn?t this just use message-insert-formatted-citation-line? > > Yes, good idea. I just tried this and it almost works. The only > issue is that the

[PATCH] emacs: fix tests wrt notmuch-hello invisible dot

2012-01-20 Thread Dmitry Kurochkin
On Fri, 20 Jan 2012 00:50:49 +0100, Pieter Praet wrote: > On Fri, 20 Jan 2012 02:37:30 +0400, Dmitry Kurochkin gmail.com> wrote: > > On Thu, 19 Jan 2012 22:31:14 +0100, Pieter Praet > > wrote: > > > Not meant to be applied! > > > > > > Should be merged into > > >

[PATCH v3 2/2] Add compatibility with gmime 2.6

2012-01-20 Thread Thomas Jost
+#ifdef GMIME_ATLEAST_26 > > + /* TODO: GMimePasswordRequestFunc */ > > + if (NULL == (params.cryptoctx = g_mime_gpg_context_new(NULL, > > "gpg"))) > > +#else > > GMimeSession* session = g_object_new(g_mime_session_get_type(), > > NULL); > > if (NULL == (params.cryptoctx = g_mime_gpg_context_new(session, > > "gpg"))) > > +#endif > > fprintf (stderr, "Failed to construct gpg context.\n"); > > else > > > > g_mime_gpg_context_set_always_trust((GMimeGpgContext*)params.cryptoctx, > > FALSE); > > +#ifndef GMIME_ATLEAST_26 > > g_object_unref (session); > > session = NULL; > > +#endif > > } > > if (STRNCMP_LITERAL (argv[i], "--decrypt") == 0) > > params.decrypt = 1; > > diff --git a/show-message.c b/show-message.c > > index 8768889..83ecf81 100644 > > --- a/show-message.c > > +++ b/show-message.c > > @@ -48,7 +48,11 @@ show_message_part (mime_node_t *node, > > format->part_encstatus (node->decrypt_success); > > > > if (node->verify_attempted && format->part_sigstatus) > > +#ifdef GMIME_ATLEAST_26 > > + format->part_sigstatus (node->sig_list); > > +#else > > format->part_sigstatus (node->sig_validity); > > +#endif > > > > format->part_content (part); > > > > diff --git a/test/crypto b/test/crypto > > index 0af4aa8..3779abc 100755 > > --- a/test/crypto > > +++ b/test/crypto > > @@ -104,6 +104,8 @@ test_expect_equal \ > > "$expected" > > > > test_begin_subtest "signature verification with signer key unavailable" > > +# this is broken with current versions of gmime-2.6 > > +(ldd $(which notmuch) | grep -q gmime-2.6) && test_subtest_known_broken > > Just to be nitpicky, you should either escape the . in the regexp or > pass -F to grep. Otherwise I think this hack is fine (though it might > have to get a little fancier once GMime fixes this bug). Added -F :) I guess we could also use pkg-config to test if gmime 2.6 is present. It would also be simpler to test the version number once gmime fixes this bug: pkg-config --atleast-version=2.6.x gmime-2.6 || test_subtest_known_broken But this would mean assuming that notmuch is built against a system-wide gmime. Or it would require setting PKG_CONFIG_PATH before tests... Complicated. So IMHO once gmime fixes this bug we should just remove the test_subtest_known_broken and maybe add something like this in notmuch-client.h: #ifdef GMIME_MAJOR_VERSION #define GMIME_ATLEAST_26 #if !GMIME_CHECK_VERSION(2, 6, x) #warning "Building against an old and buggy version of gmime. Please update to 2.6.x." #endif #endif > > > # move the gnupghome temporarily out of the way > > mv "${GNUPGHOME}"{,.bak} > > output=$(notmuch show --format=json --verify subject:"test signed message > > 001" \ -- Thomas/Schnouki -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 489 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/ae25838f/attachment.pgp>

[PATCH v4 1/3] show: don't use hex literals in JSON output

2012-01-20 Thread Thomas Jost
JSON does not support hex literals (0x..) so numbers must be formatted as %d instead of %x. --- notmuch-show.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index d14dac9..91f566c 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@

[PATCH v4 2/3] Add compatibility with gmime 2.6

2012-01-20 Thread Thomas Jost
There are lots of API changes in gmime 2.6 crypto handling. By adding preprocessor directives, it is however possible to add gmime 2.6 compatibility while preserving compatibility with gmime 2.4 too. This is mostly based on id:"8762i8hrb9.fsf at bookbinder.fernseed.info". This was tested against

[PATCH v4 3/3] Update NEWS and INSTALL about gmime 2.6

2012-01-20 Thread Thomas Jost
--- INSTALL | 12 ++-- NEWS|9 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/INSTALL b/INSTALL index e51b397..bc98f1d 100644 --- a/INSTALL +++ b/INSTALL @@ -20,8 +20,8 @@ configure stage. Dependencies -Notmuch depends on three

[PATCH v4 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-20 Thread Mark Walters
On Thu, 19 Jan 2012 23:30:23 -0500, Austin Clements wrote: > One indentation nit and then this LGTM. > > > + (lexical-let ((message-id message-id) > > + (nth nth) > > + (filename filename) > > + (content-type content-type)) > > + (flet

[PATCH v5] Make buttons for attachments allow viewing as well as saving

2012-01-20 Thread Mark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other

[PATCH v3 5/5] emacs: Use message-citation-line-format in reply

2012-01-20 Thread David Edmondson
. Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/fa81dd67/attachment.pgp>

[PATCH 3/3] emacs: Optionally hide some part headers.

2012-01-20 Thread David Edmondson
Add a regexp, `notmuch-show-part-headers-hidden' and if the content-type of a part matches, don't show the part header. --- emacs/notmuch-show.el | 41 +++-- 1 files changed, 27 insertions(+), 14 deletions(-) diff --git a/emacs/notmuch-show.el

[PATCH] emacs: Quote MML tags in replies

2012-01-20 Thread David Edmondson
xplaining why `mml-quote-region' is required. -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/d71be9b8/attachment.pgp>

[PATCH 1/3] emacs: Tidy `notmuch-show-insert-part-header'.

2012-01-20 Thread David Edmondson
--- emacs/notmuch-show.el | 26 -- 1 files changed, 12 insertions(+), 14 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 03c1f6b..f62f8ac 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -286,20 +286,18 @@ message at DEPTH

[PATCH 2/3] emacs: Don't return the button from `notmuch-show-insert-part-header'.

2012-01-20 Thread David Edmondson
Instead, allow the caller to specify some parameters for the button. Rework `notmuch-show-insert-part-multipart/signed' and `notmuch-show-insert-part-multipart/encrypted' accordingly, moving most of the code into a common `notmuch-show-insert-part-multipart/signed-or-encrypted' to reduce

[afew] announcing afew, an universal tagging solution with some fancy features

2012-01-20 Thread Patrick Totzke
Quoting Justus Winter (2011-12-21 08:53:23) >Hey Pazz, > >Quoting Patrick Totzke (2011-12-19 19:17:12) >>Also, should i not get some output when calling afew with -vv ? > >Yes you should ;). Here's an example run on my box: Alright, I do get logging output with upstream master thanks. FYI: I

Updated remote script

2012-01-20 Thread Tomi Ollila
On Thu, 19 Jan 2012 15:31:02 -0500, Jesse Rosenthal wrote: > Hi Tomi, > > On Thu, 19 Jan 2012 19:50:38 +0200, Tomi Ollila wrote: > > Quick comments: "/tmp/notmuch_dtach.socket" is dangerous (and the _ssh). > > > > either > > make directory /tmp/notmuch_`id -u` > > and chmod it

[PATCH] config: Better formatting for search section comment

2012-01-20 Thread David Bremner
On Wed, 18 Jan 2012 15:56:45 -0500, Austin Clements wrote: > Since "auto_exclude_tags" is long and its description is multi-line, > start the description on the next line and indent it consistently. > --- pushed d

[PATCH v3] emacs: add invisible dot instead of space at the end of notmuch-hello search box

2012-01-20 Thread Tomi Ollila
On Fri, 20 Jan 2012 00:52:14 +0100, Pieter Praet wrote: > From: Dmitry Kurochkin > > This makes `show-trailing-whitespace' happy, i.e. it does not mark the > whole search box line as trailing spaces. > > Since the dot is invisible, this change makes no visible difference > for `notmuch-hello'.

[afew] announcing afew, an universal tagging solution with some fancy features

2012-01-20 Thread Justus Winter
Quoting Patrick Totzke (2012-01-20 11:40:41) >Quoting Justus Winter (2011-12-21 08:53:23) >>Hey Pazz, >> >>Quoting Patrick Totzke (2011-12-19 19:17:12) >>>Also, should i not get some output when calling afew with -vv ? >> >>Yes you should ;). Here's an example run on my box: >Alright, I do get

[PATCH v4 1/3] show: don't use hex literals in JSON output

2012-01-20 Thread David Bremner
On Fri, 20 Jan 2012 10:39:23 +0100, Thomas Jost wrote: > JSON does not support hex literals (0x..) so numbers must be formatted as %d > instead of %x. > --- > notmuch-show.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Probably I'm just being lazy here, but can you explain why

[PATCH] emacs: Quote MML tags in replies

2012-01-20 Thread David Bremner
On Thu, 19 Jan 2012 13:43:09 -0500, Aaron Ecay wrote: > Emacs message-mode uses certain text strings to indicate how to attach > files to outgoing mail. If these are present in the text of an email, > and a user is tricked into replying to the message, the user?s files > could be exposed. > ---

[PATCH v4 1/3] show: don't use hex literals in JSON output

2012-01-20 Thread Thomas Jost
t;20120117034714.GG16740 at mit.edu", so he deserves the credits :)) Regards, -- Thomas/Schnouki -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 489 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/80917bba/attachment.pgp>

[PATCH v4 1/3] show: don't use hex literals in JSON output

2012-01-20 Thread David Bremner
On Fri, 20 Jan 2012 13:33:58 +0100, Thomas Jost wrote: > The most common gmime error codes are 1 (expired signature), 2 (no > public key), 4 (expired key) and 8 (revoked key). The other possible > value is 16 (unsupported algorithm) but obviously it is much more rare. > If this happens, the

[PATCH] Add pseudo-compatibility with gmime 2.6

2012-01-20 Thread Tomi Ollila
On Fri, 20 Jan 2012 00:52:47 +0100, Thomas Jost wrote: > > Here is how I did: > > (ldd notmuch | grep -q gmime-2.6) && test_subtest_known_broken > > ldd notmuch will show "/path/to/libgmime-2.4.so.*" or > "libgmime-2.6.so.*" so we can easily check this in the test suite. > It's a little

[PATCH 2/3] show: Use consistent header ordering in the text format

2012-01-20 Thread Tomi Ollila
On Wed, 18 Jan 2012 15:28:26 -0500, Austin Clements wrote: > Previously, top-level message headers were printed as Subject, From, > To, Date, while embedded message headers were printed From, To, > Subject, Date. This makes both cases use the former order and updates > the tests accordingly. >

[PATCH v3 1/2] show: Handle read and write errors

2012-01-20 Thread Tomi Ollila
On Thu, 19 Jan 2012 17:29:18 -0500, Austin Clements wrote: > For showing a message in raw format, rather than silently succeeding > when a read or a write fails (or, probably, looping if a read fails), > try to print an error message and exit with a non-zero status. > > This silences one of the

[PATCH v3 2/2] Silence buildbot warnings about unused results

2012-01-20 Thread Tomi Ollila
On Thu, 19 Jan 2012 17:29:19 -0500, Austin Clements wrote: > This ignores the results of the two writes in sigint handlers even > harder than before. > > While my libc lacks the declarations that trigger these warnings, this > can be tested by adding the following to notmuch.h: > >

[PATCH v4 2/3] Add compatibility with gmime 2.6

2012-01-20 Thread Austin Clements
LGTM! Quoth Thomas Jost on Jan 20 at 10:39 am: > There are lots of API changes in gmime 2.6 crypto handling. By adding > preprocessor directives, it is however possible to add gmime 2.6 compatibility > while preserving compatibility with gmime 2.4 too. > > This is mostly based on

[PATCH v4 3/3] Update NEWS and INSTALL about gmime 2.6

2012-01-20 Thread Austin Clements
Quoth Thomas Jost on Jan 20 at 10:39 am: > --- > INSTALL | 12 ++-- > NEWS|9 + > 2 files changed, 15 insertions(+), 6 deletions(-) > > diff --git a/INSTALL b/INSTALL > index e51b397..bc98f1d 100644 > --- a/INSTALL > +++ b/INSTALL > @@ -20,8 +20,8 @@ configure stage. >

[PATCH v5] Make buttons for attachments allow viewing as well as saving

2012-01-20 Thread Austin Clements
LGTM Quoth Mark Walters on Jan 20 at 9:44 am: > Define a keymap for attachment buttons to allow multiple actions. > Define 3 possible actions: > save attachment: exactly as currently, > view attachment: uses mailcap entry, > view attachment with user chosen program > > Keymap on a

tach.el: an attachment interface for message mode.

2012-01-20 Thread Jesse Rosenthal
row. Best, Jesse -- next part -- A non-text attachment was scrubbed... Name: tach.el Type: application/emacs-lisp Size: 9481 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/62056761/attachment-0001.bin>

[PATCH] Automatically exclude tags in notmuch-show

2012-01-20 Thread Austin Clements
Quoth Mark Walters on Jan 20 at 12:10 am: > > Ok Having said this is trivial I have found a problem. What should > notmuch do if you do something like > > notmuch show id: > and that message is marked with a deleted tag? To be consistent with the > other cases (where a deleted message is in a

tach.el: an attachment interface for message mode.

2012-01-20 Thread Aaron Ecay
Ha! As I was recently looking at the MML stuff, I spent some time googling around looking for this ? I knew I had seen a ?mutt-like? attachment interface for emacs mail writing, but I couldn?t seem to come across it. I will definitely get it set up and play with it. I don?t have cause to attach

[PATCH v3 5/5] emacs: Use message-citation-line-format in reply

2012-01-20 Thread Adam Wolfe Gordon
Erk, forgot to reply-all. Aaron might get this twice. On Thu, Jan 19, 2012 at 22:53, Aaron Ecay wrote: > (let ((message-citation-line-format > (remove ?\n message-citation-line-format))) > ...) > > (Or, if you think someone might have a newline other than at the end of > the string, you

Improving notmuch query documentation [was: Re: Partial words on notmuch search?]

2012-01-20 Thread Mark Anderson
On Tue, 17 Jan 2012 16:29:23 -0600, Austin Clements wrote: > Quoth Andrei Popescu on Jan 18 at 12:14 am: > > On Lu, 16 ian 12, 21:34:31, Austin Clements wrote: > > > Quoth Andrei Popescu on Jan 16 at 10:21 pm: > > > > Where can I read more about this? (except the source :) > > > > > > Most of

[PATCH] v2 emacs: colorize buttonized 'id:' links depending on the target message's state

2012-01-20 Thread Mark Anderson
On Wed, 18 Jan 2012 04:08:54 -0600, Pieter Praet wrote: > On Mon, 16 Jan 2012 16:43:06 -0500, Aaron Ecay wrote: > > On Mon, 16 Jan 2012 17:57:33 +0100, Pieter Praet > > wrote: > > [...] Maybe you could change the regex that > > matches id:?s to require a little more structure ? an at-sign,

[PATCH] emacs: Make the part content available to `mm-inlinable-p'.

2012-01-20 Thread Jameson Graef Rollins
that I haven't... jamie. -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/6d8fea84/attachment.pgp>

[PATCH v2] emacs: Make the part content available to the mm-inline* checks.

2012-01-20 Thread Jameson Graef Rollins
nature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/0b975c05/attachment.pgp>

[PATCH 2/3] emacs: Don't return the button from `notmuch-show-insert-part-header'.

2012-01-20 Thread Jameson Graef Rollins
hment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/13bbc2fc/attachment.pgp>

[afew] announcing afew, an universal tagging solution with some fancy features

2012-01-20 Thread Kazuo Teramoto
and it don't match any message. What about putting a strip(';') before the split()? -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120120/27a65c9e/attachment.pgp>

[PATCH] lib: Save filenames for files detected as "not an email file" in the database.

2012-01-20 Thread Austin Clements
Later runs of "notmuch new" won't scan these files again and won't print warnings. Various programs (Dovecot, in my case) store indexes and caches and such in the maildir. Without this, notmuch persistently complains about such files. --- Every time I run notmuch new I get a slew of these

tach.el: an attachment interface for message mode.

2012-01-20 Thread Xavier Maillard
On Fri, 20 Jan 2012 12:04:49 -0500, Jesse Rosenthal wrote: [ ... ] > Thus: tach.el. Tach is a minor mode that adds mutt-like attachment > handling to message mode. It's not notmuch specific, but I wrote it to > use with notmuch, and I thought it might be of use to some on the > list. I like

tach.el: an attachment interface for message mode.

2012-01-20 Thread Jesse Rosenthal
Hi Xavier, On Fri, 20 Jan 2012 23:43:01 +0100, Xavier Maillard wrote: > I like it. Thanks for giving it a try. > Simple but at first it is not easy to understand what to do with that > window. Also, there is no way to toggle the window visibility. But for a > first shot, it is a good shot :D