Inheriting tags from parent

2012-08-03 Thread Michal Nazarewicz
Hello everyone, I've just started using notmuch and am wondering if there is a way to make message “inherit” some of the tags from messages they are written in replay to (or in general are part of the same thread). I'm mostly thinking about a “mute” tag which I'd add to messages that are

Re: Inheriting tags from parent

2012-08-06 Thread Michal Nazarewicz
Quoth Michal Nazarewicz on Aug 03 at 4:29 pm: I've just started using notmuch and am wondering if there is a way to make message “inherit” some of the tags from messages they are written in replay to (or in general are part of the same thread). I'm mostly thinking about a “mute” tag which

Re: [PATCH] notmuch-show: add notmuch-show-auto-mark-read option

2012-08-06 Thread Michal Nazarewicz
go to the next thread but one of them removes unread tag. This way, this setup does not mean I have to type more -- I just need to conciously choose whether I want to tag current message read or not. Quoth Michal Nazarewicz on Aug 06 at 4:20 pm: From: Michal Nazarewicz min...@mina86.com

‘class Xapian::Database’ has no member named ‘close’

2012-08-07 Thread Michal Nazarewicz
Hi guys, when I'm trying to build notmuch on Ubuntu Lucid, I'm getting the following error: lib/database.cc: In function ‘void notmuch_database_close(notmuch_database_t*)’: lib/database.cc:767: error: ‘class Xapian::Database’ has no member named ‘close’ I'm solving that by: diff --git

Re: [PATCH] notmuch-show: add notmuch-show-auto-mark-read option

2012-08-07 Thread Michal Nazarewicz
On Mon, 06 Aug 2012, Michal Nazarewicz m...@google.com wrote: @@ -1374,9 +1382,11 @@ current thread. Are the headers of the current message visible? (notmuch-show-get-prop :headers-visible)) -(defun notmuch-show-mark-read () - Mark the current message as read. - (notmuch-show-tag

Re: [PATCH] notmuch-show: add notmuch-show-auto-mark-read option

2012-08-07 Thread Michal Nazarewicz
From: Michal Nazarewicz min...@mina86.com @@ -1383,8 +1390,9 @@ current thread. (notmuch-show-get-prop :headers-visible)) (defun notmuch-show-mark-read () - Mark the current message as read. - (notmuch-show-tag-message -unread)) + Apply `notmuch-show-mark-read-tags' to the message

[PATCH] emacs: notmuch-search: fix faces

2012-08-23 Thread Michal Nazarewicz
From: Michal Nazarewicz min...@mina86.com For some reason the faces do not get applied when 'face property is used, but they work correctly with 'font-lock-face property. This commit changes notmuch-search to use the latter. --- emacs/notmuch.el | 23 +-- 1 files changed

Re: [PATCH] emacs: notmuch-search: fix faces

2012-08-27 Thread Michal Nazarewicz
On Thu, Aug 23 2012, Michal Nazarewicz m...@google.com wrote: For some reason the faces do not get applied when 'face property is used, but they work correctly with 'font-lock-face property. This commit changes notmuch-search to use the latter. Jameson Graef Rollins jroll

Re: [PATCH] emacs: notmuch-search: fix faces

2012-08-27 Thread Michal Nazarewicz
Quoth Michal Nazarewicz on Aug 28 at 1:11 am: I'm not an expert either, but with this patch applied I see colours, without this patch, I don't see colours, ie. everything is rendered using the default face. I'm also not entirely sure if that's the correct way of doing things since 'face

Re: [PATCH 4/6] emacs: add support for custom tag changes on message/thread archive

2012-09-03 Thread Michal Nazarewicz
Jani Nikula j...@nikula.org writes: Add support for customization of the tag changes that are applied when a message or a thread is archived. Instead of hard-coded removal of the inbox tag, the user can now specify a list of tag changes to perform. diff --git a/emacs/notmuch-show.el

Re: [PATCH 0/6] emacs: customization for tag changes on archive

2012-09-03 Thread Michal Nazarewicz
Jani Nikula j...@nikula.org writes: Hi all, Michal Nazarewicz added customization for tag changes on marking messages as read (commit 1f30f7d2). This series does the same for archiving, with some cleanups and minor refactoring. As the tag changes may now be more complicated than simple -inbox

Re: [PATCH V2 1/2] devel: add release-checks.sh

2012-09-03 Thread Michal Nazarewicz
Tomi Ollila tomi.oll...@iki.fi writes: diff --git a/devel/release-checks.sh b/devel/release-checks.sh new file mode 100755 index 000..7dadefa --- /dev/null +++ b/devel/release-checks.sh @@ -0,0 +1,211 @@ +#!/usr/bin/env bash On a side note, the whole script could be relatively easily

Re: [PATCH v2 3/5] test: fix hook-counter to accept the new no-display param

2012-09-03 Thread Michal Nazarewicz
Jani Nikula j...@nikula.org writes: notmuch-hello-refresh-hook is now called with no-display param. Accept (and ignore) it in hook-counter. This should go together with the previous patch since without this change, previous patch breaks code. --- test/test-lib.el |2 +- 1 file changed,

Re: [PATCH] emacs: notmuch-search: fix faces

2012-09-03 Thread Michal Nazarewicz
Tomi Ollila tomi.oll...@iki.fi writes: Interesting problem; You could try stripping all customizations (emacs -q ...) and see whether coloring works -- and if it does then bisect (or something) the culprit. FYI, I've identified the problem. I'll follow up when I find the solution, or separate

Re: [PATCH 4/6] emacs: add support for custom tag changes on message/thread archive

2012-09-03 Thread Michal Nazarewicz
On Mon, 03 Sep 2012, Michal Nazarewicz min...@mina86.com wrote: Strictly speaking (when) should not be needed here (an in the following changes). Or is it? Jani Nikula j...@nikula.org writes: I noticed it was needed in some places, so decided to slam it in all places for similarity. No harm

Re: [PATCH V2 1/2] devel: add release-checks.sh

2012-09-03 Thread Michal Nazarewicz
, Sep 03 2012, Michal Nazarewicz min...@mina86.com wrote: if ! [ -f $f ]; then append_emsg File '$f' is missing elif ! [ -r $f ]; then append_emsg File '$f' is unreadable elif ! [ -s $f ]; then append_emsg File '$f' is empty fi Tomi Ollila tomi.oll...@iki.fi writes: IMHO

Re: [PATCH V2 1/2] devel: add release-checks.sh

2012-09-03 Thread Michal Nazarewicz
David Bremner da...@tethera.net writes: Michal Nazarewicz min...@mina86.com writes: On a side note, the whole script could be relatively easily rewritten not to use bash at all and work with plain POSIX shell. How does one simulate pipefail? pipefail is used only for “find ... | sort

Re: Release checks v3

2012-09-04 Thread Michal Nazarewicz
On Tue, Sep 04 2012, Tomi Ollila wrote: This if V3 of release-check.sh patches, displacing id:1346491928-2356-1-git-send-email-tomi.oll...@iki.fi Changes: Bash kept, mainly for pipefail -- and that possible future pipeline additions have more protection. Added set -o posix lessens

[PATCH] notmuch-show: include Bcc header in json output

2012-09-05 Thread Michal Nazarewicz
From: Michal Nazarewicz min...@mina86.com --- notmuch-show.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) Actually, I don't understand why json does not include all the headers... diff --git a/notmuch-show.c b/notmuch-show.c index 3556293..0b7abf1 100644 --- a/notmuch

Re: [PATCH] emacs: notmuch-search: fix faces

2012-09-05 Thread Michal Nazarewicz
On Thu, Aug 23 2012, Michal Nazarewicz wrote: For some reason the faces do not get applied when 'face property is used, but they work correctly with 'font-lock-face property. This commit changes notmuch-search to use the latter. OK, forget about this. The problem “fixed itself” when I

[PATCHv3] notmuch-show: include Bcc header in json output

2012-09-10 Thread Michal Nazarewicz
From: Michal Nazarewicz min...@mina86.com With this change, emacs users can use notmuch-message-headers variable to configure notmuch-show display Bcc header. --- notmuch-show.c |7 +++ test/json|8 test/test-lib.sh |5 + 3 files changed, 16 insertions

Re: [PATCHv3] notmuch-show: include Bcc header in json output

2012-09-10 Thread Michal Nazarewicz
On Mon, Sep 10 2012, Tomi Ollila wrote: Thanks, that explains (also why my attempts to show Message-ID has failed ;) Yeah. Message ID is the other header I'm missing. It should be possible to add it the same way though. -- Best regards, _ _ .o. |

Re: [PATCHv3] notmuch-show: include Bcc header in json output

2012-09-10 Thread Michal Nazarewicz
On Mon, Sep 10 2012, Tomi Ollila wrote: Actually, I'm happy with keybinding c i (and c I) to get Message-Id, Ah, great! That solves it, thanks. :) -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer

Re: [PATCH v3 2/9] parse-time-string: add a date/time parser to notmuch

2012-09-13 Thread Michal Nazarewicz
On Wed, Sep 12 2012, Jani Nikula j...@nikula.org wrote: Add a date/time parser to notmuch, to be used for adding date range query support for notmuch lib later on. Add the parser to a directory of its own to make it independent of the rest of the notmuch code base. Signed-off-by: Jani Nikula

Re: [PATCH v3 6/9] lib: add date range query support

2012-09-13 Thread Michal Nazarewicz
On Wed, Sep 12 2012, Jani Nikula wrote: Add a custom value range processor to enable date and time searches of the form date:since..until, where since and until are expressions understood by the previously added date/time parser, to restrict the results to messages within a particular time

Re: Better Gmail handling by not using Notmuch tags

2012-09-14 Thread Michal Nazarewicz
On Fri, Sep 14 2012, Mark Anderson wrote: You might want to take this chance to make your tag cloud coherent between Notmuch and what exists in the folders, which works out to something like this for every tag/folder pair in your gmail IMAP directory (assuming it's synced to a Maildir

Re: [PATCH v3 2/9] parse-time-string: add a date/time parser to notmuch

2012-09-17 Thread Michal Nazarewicz
On Thu, 13 Sep 2012, Michal Nazarewicz min...@mina86.com wrote: Have you consider doing the same in bison? I consider the code totally unreadable and unmaintainable. On Thu, Sep 13 2012, Jani Nikula wrote: I do not think you could easily do everything that this parser does in bison

Re: [PATCH v3 6/9] lib: add date range query support

2012-09-17 Thread Michal Nazarewicz
Michal Nazarewicz min...@mina86.com writes: IMO this is totally unintuitive and not how the range should work. date:foo..bar should return messages whose date = foo and bar. So for instance date:november..yesterday should return messages whose date is 2012/11/01 00:00:00 and 2012/09/12 00

Re: [PATCH v3 6/9] lib: add date range query support

2012-09-17 Thread Michal Nazarewicz
On Thu, Sep 13 2012, Jani Nikula wrote: I find since rounding towards past and until rounding towards future a very simple rule. But YMMV. To implement rounding, each date needs to have a period of time to align to. I call that a duration. But if you have such a duration than I propose a

Re: solution to gnus-alias problems?

2012-10-01 Thread Michal Nazarewicz
On Mon, Oct 01 2012, David Bremner brem...@debian.org wrote: Geoff writes: Hi David, I've found the source of the problem I was having. It seems to be due to some interference with the notmuch-mua-reply function and gnus-alias. In particular, there was a problem with the part of

Re: [PATCH] emacs: simplify point placement in notmuch-hello refresh

2012-10-01 Thread Michal Nazarewicz
On Sun, Sep 30 2012, Austin Clements wrote: But I wonder if there's an abstraction that would let us fully rebuild UIs or parts of UIs, but keep enough context to make this fluid. I'm imagining something like representing a buffer as a tree of UI nodes, where the buffer itself is simply the

Re: [PATCH 1/2] Automatic tagging based on maildir

2012-10-26 Thread Michal Nazarewicz
On Fri, Oct 26 2012, Taesoo Kim tae...@mit.edu wrote: @@ -240,6 +242,32 @@ _entry_in_ignore_list (const char *entry, add_files_state_t *state) return FALSE; } +static void +_add_maildir_as_tag(notmuch_database_t *notmuch, + notmuch_message_t *msg, const char *path)

[PATCH] Add NEWS information about Bcc header in JSON output

2012-10-29 Thread Michal Nazarewicz
From: Michal Nazarewicz min...@mina86.com This commit adds a note to the NEWS file about Bcc header now being available in the JSON output (and thus in Emacs) which has been implemented by commit ffb629cc5d2c2d1505eb5aefcf04fb4d0af6c0c8. --- NEWS |7 +++ 1 files changed, 7 insertions

[PATCH] Add NEWS information about Bcc header in JSON output

2012-11-01 Thread Michal Nazarewicz
This commit adds a note to the NEWS file about Bcc header now being available in the JSON output (and thus in Emacs) which has been implemented by commit ffb629cc5d2c2d1505eb5aefcf04fb4d0af6c0c8. --- NEWS | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) On Wed, Oct 31 2012,

Re: [PATCH] Add NEWS information about Bcc header in JSON output

2012-11-07 Thread Michal Nazarewicz
On Wed, Nov 07 2012, Tomi Ollila wrote: Also, I don't know whether markdown allows the text in backticks (``) be split into 2 lines -- at the end it's me who is going to do final corrections there ;) (luckily that probably changes when more text is added to the sentences. OK, so can I forget

Re: [PATCH 2/3] cli: all search mode to include msg-ids with JSON output

2012-11-22 Thread Michal Nazarewicz
On Thu, Nov 22 2012, Jameson Graef Rollins wrote: I guess there would still be a race condition, especially for really long search results, but I wonder if the calls could actually be made in parallel at the same time. If we are nitpicking, strictly speaking, running things in parallel does

Re: gmail label support patch available for oflineimap

2012-11-27 Thread Michal Nazarewicz
On Tue, Nov 27 2012, Rainer M Krug wrote: So from your point of view - what would be the best / most consistent approach with gmail? Sync All Mail folder (and Inbox) with offlineimap and sync the label information via notmuch? Would definitely seem to make sense, as it deals with labels on the

Re: gmail label support patch available for oflineimap

2012-11-27 Thread Michal Nazarewicz
On Tue, Nov 27 2012, Rainer M Krug wrote: I saw on the offlineimap mailing list, that somebody is using this approach (x-header) to sync the gmail labels and to use them in his email client - so I thought, why not read them as tags into notmuch and sync tgs back, so one would have a sync

Re: gmail label support patch available for oflineimap

2012-11-28 Thread Michal Nazarewicz
On Wed, Nov 28 2012, Felipe Contreras wrote: Not everybody uses offlineimap. Go nag developers of whatever you are using to implement fetching labels from Gmail. Or write another tool that does that. Either way, communicating with Gmail is not notmuch's job. -- Best regards,

Re: gmail label support patch available for oflineimap

2012-11-28 Thread Michal Nazarewicz
On Wed, Nov 28 2012, Tomi Ollila wrote: I could not find it in the docs (looked wiki mainly) but one of the principles notmuch currently operates that the *contents* of the email files it reads are not ever modified. i.e. the email files are read-only from notmuch (cli) point of view. This

Re: gmail label support patch available for oflineimap

2012-11-28 Thread Michal Nazarewicz
On Wed, Nov 28 2012, David Bremner wrote: Right. But without that, the whole thing could be scripted pretty easily I think, just parse the x-labels header and use notmuch-deliver or something like that. You're saying to get offlineimap to add the x-labels header and than have another simple

Re: gmail label support in offlineimap - update

2012-11-28 Thread Michal Nazarewicz
On Wed, Nov 28 2012, Jeremy Nickurak wrote: The other direction sounds like it would be trickier though, since there's no obvious way to say what notmuch tags have changed since time X?. Is this something that notmuch could provide? One could parse the X-Labels header and compare it with

Re: gmail label support patch available for oflineimap

2012-11-29 Thread Michal Nazarewicz
On Wed, Nov 28, 2012 at 1:53 PM, Michal Nazarewicz min...@mina86.com wrote: Go nag developers of whatever you are using to implement fetching labels from Gmail. Or write another tool that does that. On Thu, Nov 29 2012, Felipe Contreras felipe.contre...@gmail.com wrote: Why do that when I

Re: gmail label support patch available for oflineimap

2012-11-29 Thread Michal Nazarewicz
On Thu, Nov 29 2012, Felipe Contreras wrote: I think it would be trivial to add Gmail-style folders to notmuch. Maybe a configuration that maps directories with tags. This in fact wouldn't even be Gmail specific, and would help the people coming from procmail, and other ways of organizing

Re: gmail label support in offlineimap - update

2012-11-29 Thread Michal Nazarewicz
On Thu, Nov 29 2012, Rainer M Krug wrote: I think a tag changed hook could solve both problems - when there would be an additional messge changed hook: How would you make the “message changed” hook work? What if I do “$EDITOR some-mail”? What is supposed to trigger the hook? -- Best regards,

Re: [PATCH 1/2] cli: fix notmuch top level argument parsing

2012-12-03 Thread Michal Nazarewicz
On Mon, Dec 03 2012, Jani Nikula wrote: Use strcmp instead of STRNCMP_LITERAL, which matches the prefix instead of the whole argument. Perhaps add and use this instead: #define STRCMP_LITERAL(var, literal) \ strncmp ((var), (literal), sizeof (literal)) Than again, it's argument parsing so

Re: [PATCH 1/2] cli: fix notmuch top level argument parsing

2012-12-04 Thread Michal Nazarewicz
On Mon, Dec 03 2012, Jani Nikula wrote: And I'm not even sure strncmp is faster than strcmp, as it has to keep track of count. Good point. -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science,

Re: [PATCH 3/3] test: use perl instead of sed -r for portability

2012-12-04 Thread Michal Nazarewicz
On Tue, Dec 04 2012, Jani Nikula wrote: Our OS X users report -r is not a supported option for sed. Use perl instead. --- test/test-lib.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index f169785..31ed107 100644 ---

Re: [PATCH 1/3] test: fix count test

2012-12-04 Thread Michal Nazarewicz
On Tue, Dec 04 2012, Jani Nikula wrote: The quoting for ${SEARCH} is broken when it's supposed to be '*', and Why is it broken? It does not appear to be broken to me and in fact the test passes. it seems tricky to get it right. Just drop the variable and use '*' directly. Before this, none

Re: [PATCH 1/3] test: fix count test

2012-12-05 Thread Michal Nazarewicz
Hmm, I thought I've already replied to this email, but it still sticks as unread. In case I did, sorry for duplicate. On Wed, Dec 05 2012, Jani Nikula wrote: Please try this patch, which should pass if everything were all right: diff --git a/test/count b/test/count index 300b171..ecae40e

[PATCH] Minor style changes.

2012-12-07 Thread Michal Nazarewicz
From: Michal Nazarewicz min...@mina86.com --- gmail-notmuch.py | 29 + 1 files changed, 9 insertions(+), 20 deletions(-) On Fri, Dec 07 2012, Jason A. Donenfeld wrote: I wrote a script that imports emails and tags from gmail. It's resumable and appears

[PATCH v3 6/9] lib: add date range query support

2012-09-17 Thread Michal Nazarewicz
> Michal Nazarewicz writes: >> IMO this is totally unintuitive and not how the range should work. >> date:foo..bar should return messages whose date >= foo and < bar. So >> for instance date:november..yesterday should return messages whose date >> is > 2012/1

[PATCH v3 6/9] lib: add date range query support

2012-09-17 Thread Michal Nazarewicz
On Thu, Sep 13 2012, Jani Nikula wrote: > I find "since" rounding towards past and "until" rounding towards future > a very simple rule. But YMMV. To implement rounding, each date needs to have a period of time to align to. I call that a duration. But if you have such a duration than I propose

solution to gnus-alias problems?

2012-10-01 Thread Michal Nazarewicz
On Mon, Oct 01 2012, David Bremner wrote: > Geoff writes: > >Hi David, > >I've found the source of the problem I was having. It seems to be due >to some interference with the notmuch-mua-reply function and >gnus-alias. In particular, there was a problem with the part of >

[PATCH] emacs: simplify point placement in notmuch-hello refresh

2012-10-01 Thread Michal Nazarewicz
On Sun, Sep 30 2012, Austin Clements wrote: > But I wonder if there's an abstraction that would let us fully rebuild > UIs or parts of UIs, but keep enough context to make this fluid. I'm > imagining something like representing a buffer as a tree of UI nodes, > where the buffer itself is simply

[PATCH 1/2] Automatic tagging based on maildir

2012-10-26 Thread Michal Nazarewicz
On Fri, Oct 26 2012, Taesoo Kim wrote: > @@ -240,6 +242,32 @@ _entry_in_ignore_list (const char *entry, > add_files_state_t *state) > return FALSE; > } > > +static void > +_add_maildir_as_tag(notmuch_database_t *notmuch, > + notmuch_message_t *msg, const char *path) > +{

[PATCH] Add NEWS information about Bcc header in JSON output

2012-10-29 Thread Michal Nazarewicz
From: Michal Nazarewicz <min...@mina86.com> This commit adds a note to the NEWS file about Bcc header now being available in the JSON output (and thus in Emacs) which has been implemented by commit ffb629cc5d2c2d1505eb5aefcf04fb4d0af6c0c8. --- NEWS |7 +++ 1 files changed, 7 inse

[PATCH] Add NEWS information about Bcc header in JSON output

2012-11-01 Thread Michal Nazarewicz
This commit adds a note to the NEWS file about Bcc header now being available in the JSON output (and thus in Emacs) which has been implemented by commit ffb629cc5d2c2d1505eb5aefcf04fb4d0af6c0c8. --- NEWS | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) On Wed, Oct 31 2012,

[PATCH] Add NEWS information about Bcc header in JSON output

2012-11-07 Thread Michal Nazarewicz
On Wed, Nov 07 2012, Tomi Ollila wrote: > Also, I don't know whether markdown allows the text in backticks (``) > be split into 2 lines -- at the end it's me who is going to do final > corrections there ;) (luckily that probably changes when more text > is added to the sentences. OK, so can I

[PATCH 1/1] NEWS (for 0.15): Added note about Bcc & Reply-To headers in json output

2012-11-15 Thread Michal Nazarewicz
On Thu, Nov 15 2012, Tomi Ollila wrote: > notmuch show --format json now includes Bcc and Reply-To headers of > the message. Mention that in NEWS. > (Heavily modified version of text originally from Michal Nazarewicz.) Acked-by: Michal Nazarewicz > --- > NEWS | 6 ++ >

[PATCH 2/3] cli: all search mode to include msg-ids with JSON output

2012-11-22 Thread Michal Nazarewicz
On Thu, Nov 22 2012, Jameson Graef Rollins wrote: > I guess there would still be a race condition, especially for really > long search results, but I wonder if the calls could actually be made > in parallel at the same time. If we are nitpicking, strictly speaking, running things in parallel does

gmail label support patch available for oflineimap

2012-11-27 Thread Michal Nazarewicz
On Tue, Nov 27 2012, Rainer M Krug wrote: > So from your point of view - what would be the best / most consistent > approach with gmail? Sync All Mail folder (and Inbox) with offlineimap > and sync the label information via notmuch? Would definitely seem to > make sense, as it deals with labels on

gmail label support patch available for oflineimap

2012-11-27 Thread Michal Nazarewicz
On Tue, Nov 27 2012, Rainer M Krug wrote: > Yes - offlineimap is not needed actually, but I personally I see > notmuch as an indexing / tagging program for a mailabox in maildir > format, which means local. So all changes are done locally, and not > bad on an imap server (or synching tags with an

gmail label support patch available for oflineimap

2012-11-27 Thread Michal Nazarewicz
On Tue, Nov 27 2012, Rainer M Krug wrote: > I saw on the offlineimap mailing list, that somebody is using this approach > (x-header) to sync the gmail labels and to use them in his email client - > so I thought, why not read them as tags into notmuch and sync tgs back, so > one would have a sync

gmail label support patch available for oflineimap

2012-11-28 Thread Michal Nazarewicz
On Wed, Nov 28 2012, Felipe Contreras wrote: > Not everybody uses offlineimap. Go nag developers of whatever you are using to implement fetching labels from Gmail. Or write another tool that does that. Either way, communicating with Gmail is not notmuch's job. -- Best regards,

gmail label support patch available for oflineimap

2012-11-28 Thread Michal Nazarewicz
On Wed, Nov 28 2012, Tomi Ollila wrote: > I could not find it in the docs (looked wiki mainly) but one of the > principles notmuch currently operates that the *contents* of the email > files it reads are not ever modified. i.e. the email files are read-only > from notmuch (cli) point of view.

gmail label support patch available for oflineimap

2012-11-28 Thread Michal Nazarewicz
On Wed, Nov 28 2012, David Bremner wrote: > Right. But without that, the whole thing could be scripted pretty easily > I think, just parse the x-labels header and use notmuch-deliver or > something like that. You're saying to get offlineimap to add the x-labels header and than have another simple

gmail label support in offlineimap - update

2012-11-28 Thread Michal Nazarewicz
On Wed, Nov 28 2012, Jeremy Nickurak wrote: > The other direction sounds like it would be trickier though, since > there's no obvious way to say "what notmuch tags have changed since > time X?". Is this something that notmuch could provide? One could parse the X-Labels header and compare it with

gmail label support patch available for oflineimap

2012-11-29 Thread Michal Nazarewicz
> On Wed, Nov 28, 2012 at 1:53 PM, Michal Nazarewicz > wrote: >> Go nag developers of whatever you are using to implement fetching labels >> from Gmail. Or write another tool that does that. On Thu, Nov 29 2012, Felipe Contreras wrote: > Why do that when I can do it in

gmail label support patch available for oflineimap

2012-11-29 Thread Michal Nazarewicz
On Thu, Nov 29 2012, Felipe Contreras wrote: > I think it would be trivial to add Gmail-style folders to notmuch. > Maybe a configuration that maps directories with tags. This in fact > wouldn't even be Gmail specific, and would help the people coming from > procmail, and other ways of organizing

[PATCH 1/2] cli: fix notmuch top level argument parsing

2012-12-03 Thread Michal Nazarewicz
On Mon, Dec 03 2012, Jani Nikula wrote: > Use strcmp instead of STRNCMP_LITERAL, which matches the prefix > instead of the whole argument. Perhaps add and use this instead: #define STRCMP_LITERAL(var, literal) \ strncmp ((var), (literal), sizeof (literal)) Than again, it's argument parsing

[PATCH 1/2] cli: fix notmuch top level argument parsing

2012-12-04 Thread Michal Nazarewicz
On Mon, Dec 03 2012, Jani Nikula wrote: > And I'm not even sure strncmp is faster than strcmp, as it has to keep > track of count. Good point. -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science,

[PATCH 3/3] test: use perl instead of sed -r for portability

2012-12-05 Thread Michal Nazarewicz
On Tue, Dec 04 2012, Jani Nikula wrote: > Our OS X users report -r is not a supported option for sed. Use perl > instead. > --- > test/test-lib.sh |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/test/test-lib.sh b/test/test-lib.sh > index f169785..31ed107 100644 > ---

[PATCH 1/3] test: fix count test

2012-12-05 Thread Michal Nazarewicz
On Tue, Dec 04 2012, Jani Nikula wrote: > The quoting for ${SEARCH} is broken when it's supposed to be '*', and Why is it broken? It does not appear to be broken to me and in fact the test passes. > it seems tricky to get it right. Just drop the variable and use '*' > directly. Before this,

[PATCH 1/3] test: fix count test

2012-12-05 Thread Michal Nazarewicz
Hmm, I thought I've already replied to this email, but it still sticks as unread. In case I did, sorry for duplicate. On Wed, Dec 05 2012, Jani Nikula wrote: > Please try this patch, which should pass if everything were all right: > > diff --git a/test/count b/test/count > index 300b171..ecae40e

[PATCH 1/3] test: fix count test

2012-12-06 Thread Michal Nazarewicz
On Wed, Dec 05 2012, Jani Nikula wrote: > diff --git a/test/count b/test/count > index 300b171..ecae40e 100755 > --- a/test/count > +++ b/test/count > @@ -6,6 +6,11 @@ add_email_corpus > > SEARCH="\"*\"" > > +test_begin_subtest "check the query" > +test_expect_equal \ > +"`notmuch count

[PATCH] Minor style changes.

2012-12-07 Thread Michal Nazarewicz
From: Michal Nazarewicz <min...@mina86.com> --- gmail-notmuch.py | 29 + 1 files changed, 9 insertions(+), 20 deletions(-) On Fri, Dec 07 2012, Jason A. Donenfeld wrote: > I wrote a script that imports emails and tags from gmail. It's > resumable

Inheriting tags from parent

2012-08-03 Thread Michal Nazarewicz
Hello everyone, I've just started using notmuch and am wondering if there is a way to make message ?inherit? some of the tags from messages they are written in replay to (or in general are part of the same thread). I'm mostly thinking about a ?mute? tag which I'd add to messages that are

Inheriting tags from parent

2012-08-05 Thread Michal Nazarewicz
> Quoth Michal Nazarewicz on Aug 03 at 4:29 pm: >> I've just started using notmuch and am wondering if there is a way to >> make message ?inherit? some of the tags from messages they are written >> in replay to (or in general are part of the same thread). >> >>

[PATCH] notmuch-show: add notmuch-show-auto-mark-read option

2012-08-06 Thread Michal Nazarewicz
which go to the next thread but one of them removes unread tag. This way, this setup does not mean I have to type more -- I just need to conciously choose whether I want to tag current message read or not. > Quoth Michal Nazarewicz on Aug 06 at 4:20 pm: >> From: Michal Nazarewicz >> >&

‘class Xapian::Database’ has no member named ‘close’

2012-08-07 Thread Michal Nazarewicz
Hi guys, when I'm trying to build notmuch on Ubuntu Lucid, I'm getting the following error: lib/database.cc: In function ?void notmuch_database_close(notmuch_database_t*)?: lib/database.cc:767: error: ?class Xapian::Database? has no member named ?close? I'm solving that by: diff --git

[PATCH] notmuch-show: add notmuch-show-auto-mark-read option

2012-08-07 Thread Michal Nazarewicz
> On Mon, 06 Aug 2012, Michal Nazarewicz wrote: >> @@ -1374,9 +1382,11 @@ current thread." >>"Are the headers of the current message visible?" >>(notmuch-show-get-prop :headers-visible)) >> >> -(defun notmuch-show-mark-read () >>

[PATCH] notmuch-show: add notmuch-show-auto-mark-read option

2012-08-07 Thread Michal Nazarewicz
>> From: Michal Nazarewicz >> @@ -1383,8 +1390,9 @@ current thread." >>(notmuch-show-get-prop :headers-visible)) >> >> (defun notmuch-show-mark-read () >> - "Mark the current message as read." >> - (notmuch-show-tag-mess

‘class Xapian::Database’ has no member named ‘close’

2012-08-14 Thread Michal Nazarewicz
> Michal Nazarewicz writes: >> $ dpkg -l |grep xapian >> ii apt-xapian-index 0.25ubuntu2 maintenance tools for a Xapian index >> of Debi >> ii libxapian-dev 1.0.18-1 Development files for Xapian search >> engine l >> ii libxapian

[PATCH] notmuch-show: add notmuch-show-mark-read-tags option

2012-08-21 Thread Michal Nazarewicz
From: Michal Nazarewicz <min...@mina86.com> The `notmuch-show-mark-read-tags' lists tags that are to be applied when message is read. By default, the only value is "-unread" which will remove the unread tag. Among other uses, this variable can be used to stop notmuch-show fro

[PATCH] emacs: notmuch-search: fix faces

2012-08-23 Thread Michal Nazarewicz
From: Michal Nazarewicz <min...@mina86.com> For some reason the faces do not get applied when 'face property is used, but they work correctly with 'font-lock-face property. This commit changes notmuch-search to use the latter. --- emacs/notmuch.el | 23 +-- 1 files c

[PATCH] emacs: notmuch-search: fix faces

2012-08-28 Thread Michal Nazarewicz
> On Thu, Aug 23 2012, Michal Nazarewicz wrote: >> For some reason the faces do not get applied when 'face property is >> used, but they work correctly with 'font-lock-face property. This >> commit changes notmuch-search to use the latter. Jameson Graef Rollins writes: &

[PATCH] emacs: notmuch-search: fix faces

2012-08-28 Thread Michal Nazarewicz
> Quoth Michal Nazarewicz on Aug 28 at 1:11 am: >> I'm not an expert either, but with this patch applied I see colours, >> without this patch, I don't see colours, ie. everything is rendered >> using the default face. >> >> I'm also not entirely sure if that'

[PATCH] emacs: notmuch-search: fix faces

2012-08-28 Thread Michal Nazarewicz
> Quoth Michal Nazarewicz on Aug 28 at 2:51 am: >> I'm running Emacs compiled from a week old bzr head, emacs-version >> reports: ?GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu) of 2012-08-21 >> on mpn-glaptop?. >> >> I don't think I have any ?unusual? pa

[PATCH 1/6] emacs: add helper for tag change list manipulation

2012-09-03 Thread Michal Nazarewicz
Jani Nikula writes: > Add a helper to create (and optionally reverse) a list of tag changes. > --- > emacs/notmuch-tag.el | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el > index 0c0fc87..c1aeb99 100644 > ---

[PATCH 4/6] emacs: add support for custom tag changes on message/thread archive

2012-09-03 Thread Michal Nazarewicz
Jani Nikula writes: > Add support for customization of the tag changes that are applied when > a message or a thread is archived. Instead of hard-coded removal of > the "inbox" tag, the user can now specify a list of tag changes to > perform. > diff --git a/emacs/notmuch-show.el

[PATCH 0/6] emacs: customization for tag changes on archive

2012-09-03 Thread Michal Nazarewicz
Jani Nikula writes: > Hi all, Michal Nazarewicz added customization for tag changes on marking > messages as read (commit 1f30f7d2). This series does the same for > archiving, with some cleanups and minor refactoring. As the tag changes > may now be more complicated than si

[PATCH V2 1/2] devel: add release-checks.sh

2012-09-03 Thread Michal Nazarewicz
Tomi Ollila writes: > diff --git a/devel/release-checks.sh b/devel/release-checks.sh > new file mode 100755 > index 000..7dadefa > --- /dev/null > +++ b/devel/release-checks.sh > @@ -0,0 +1,211 @@ > +#!/usr/bin/env bash On a side note, the whole script could be relatively easily rewritten

[PATCH v2 3/5] test: fix hook-counter to accept the new no-display param

2012-09-03 Thread Michal Nazarewicz
Jani Nikula writes: > notmuch-hello-refresh-hook is now called with no-display param. Accept > (and ignore) it in hook-counter. This should go together with the previous patch since without this change, previous patch breaks code. > --- > test/test-lib.el |2 +- > 1 file changed, 1

[PATCH] emacs: notmuch-search: fix faces

2012-09-03 Thread Michal Nazarewicz
Tomi Ollila writes: > Interesting problem; You could try stripping all customizations > (emacs -q ...) and see whether coloring works -- and if it does > then "bisect" (or something) the culprit. FYI, I've identified the problem. I'll follow up when I find the solution, or separate it into a

[PATCH 4/6] emacs: add support for custom tag changes on message/thread archive

2012-09-03 Thread Michal Nazarewicz
> On Mon, 03 Sep 2012, Michal Nazarewicz wrote: >> Strictly speaking (when) should not be needed here (an in the following >> changes). Or is it? Jani Nikula writes: > I noticed it was needed in some places, so decided to slam it in all > places for similarity. No har

[PATCH V2 1/2] devel: add release-checks.sh

2012-09-03 Thread Michal Nazarewicz
ot;; continue; } >>> + test -s $f || append_emsg "File '$f' is empty" > On Mon, Sep 03 2012, Michal Nazarewicz wrote: >> if ! [ -f "$f" ]; then >> append_emsg "File '$f' is missing" >> elif ! [ -r "$f" ]; then >>

[PATCH V2 1/2] devel: add release-checks.sh

2012-09-03 Thread Michal Nazarewicz
David Bremner writes: > Michal Nazarewicz writes: >> On a side note, the whole script could be relatively easily rewritten >> not to use bash at all and work with plain POSIX shell. > How does one simulate pipefail? pipefail is used only for ?find ... | sort?, but I find s

[PATCH] emacs: Add customization group for replying

2012-09-04 Thread Michal Nazarewicz
On Thu, Jul 26 2012, Michal Sojka wrote: > Because I was getting annoyed by the empty line the between citation > line and the quoted message, I figured out that changing this is fairly > easy when one knows what to customize. On semi-related note, does anyone know how to get rid of an empty line

Release checks v3

2012-09-04 Thread Michal Nazarewicz
On Tue, Sep 04 2012, Tomi Ollila wrote: > This if V3 of release-check.sh patches, displacing > > id:"1346491928-2356-1-git-send-email-tomi.ollila at iki.fi" > > Changes: > > Bash kept, mainly for pipefail -- and that possible future pipeline > additions have more protection. > > Added set -o

  1   2   >