[PATCH] CLI: update call to notmuch_help_command for new calling conventions.

2011-11-24 Thread Tomi Ollila
On Thu, 24 Nov 2011 16:02:41 -0400, David Bremner  wrote:
> From: David Bremner 
> 
> When I changed the calling convention to pass in all but the zero-th
> argument to subcommands, I missed this one call, resulting in a
> segmentation fault.

LGTM, is analogous to other 'argc -1, [1]' uses and seems to work
on top of notmuch 0.10+21~gae7814b

Tomi

> ---
>  notmuch.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/notmuch.c b/notmuch.c
> index 77973f8..d44ce9a 100644
> --- a/notmuch.c
> +++ b/notmuch.c
> @@ -621,7 +621,7 @@ main (int argc, char *argv[])
>   return notmuch (local);
>  
>  if (STRNCMP_LITERAL (argv[1], "--help") == 0)
> - return notmuch_help_command (NULL, 0, NULL);
> + return notmuch_help_command (NULL, argc - 1, [1]);
>  
>  if (STRNCMP_LITERAL (argv[1], "--version") == 0) {
>   printf ("notmuch " STRINGIFY(NOTMUCH_VERSION) "\n");
> -- 
> 1.7.5.4
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
> 


[PATCH 4/4] emacs: test notmuch show with fourfold message indentation

2011-11-24 Thread Gregor Zattler
Previous behaviour was to indent messages in a thread according
to depth by one space per level.  This commit tests if setting
notmuch-indent-messages-width to `4' provides a message thread
with four spaces of indentation thread depth.
---
 test/emacs |7 +
 ...hread-maildir-storage-with-fourfold-indentation |  215 
 2 files changed, 222 insertions(+), 0 deletions(-)
 create mode 100644 
test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation

diff --git a/test/emacs b/test/emacs
index da6d22b..198c27b 100755
--- a/test/emacs
+++ b/test/emacs
@@ -64,6 +64,13 @@ test_emacs "(let ((notmuch-indent-messages-width 0))
  (test-output))"
 test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-without-indentation

+test_begin_subtest "Basic notmuch-show view in emacs with fourfold indentation"
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.GU3165 at dottiness.seas.harvard.edu)
+test_emacs "(let ((notmuch-indent-messages-width 4))
+ (notmuch-show \"$maildir_storage_thread\")
+ (test-output))"
+test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
+
 test_begin_subtest "notmuch-show for message with invalid From"
 add_message "[subject]=\"message-with-invalid-from\"" \
"[from]=\"\\\"Invalid \\\" From\\\" \""
diff --git 
a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
 
b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
new file mode 100644
index 000..41e2aaa
--- /dev/null
+++ 
b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
@@ -0,0 +1,215 @@
+Lars Kellogg-Stedman  (2009-11-17) (inbox signed)
+Subject: [notmuch] Working with Maildir storage?
+To: notmuch at notmuchmail.org
+Date: Tue, 17 Nov 2009 14:00:54 -0500
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+I saw the LWN article and decided to take a look at notmuch.  I'm
+currently using mutt and mairix to index and read a collection of
+Maildir mail folders (around 40,000 messages total).
+
+notmuch indexed the messages without complaint, but my attempt at
+searching bombed out. Running, for example:
+
+  notmuch search storage
+
+Resulted in 4604 lines of errors along the lines of:
+
+  Error opening
+  
/home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+  Too many open files
+
+I'm curious if this is expected behavior (i.e., notmuch does not work
+with Maildir) or if something else is going on.
+
+Cheers,
+
+[ 5-line signature. Click/Enter to show. ]
+-- 
+Lars Kellogg-Stedman 
+Senior Technologist, Computing and Information Technology
+Harvard University School of Engineering and Applied Sciences
+
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+___
+notmuch mailing list
+notmuch at notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+Mikhail Gusarov  (2009-11-17) (inbox signed 
unread)
+Subject: Re: [notmuch] Working with Maildir storage?
+To: notmuch at notmuchmail.org
+Date: Wed, 18 Nov 2009 01:02:38 +0600
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+
+Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars at seas.harvard.edu 
did gyre and gimble:
+
+ LK> Resulted in 4604 lines of errors along the lines of:
+
+ LK>   Error opening
+ LK>   
/home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+ LK>   Too many open files
+
+See the patch just posted here.
+
+[ 2-line signature. Click/Enter to show. ]
+-- 
+http://fossarchy.blogspot.com/
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+___
+notmuch mailing list
+notmuch at notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+Lars Kellogg-Stedman  (2009-11-17) (inbox 
signed unread)
+   Subject: Re: [notmuch] Working with Maildir storage?
+   To: Mikhail Gusarov 
+   Cc: notmuch at notmuchmail.org
+   Date: Tue, 17 Nov 2009 15:33:01 -0500
+
+   [ multipart/mixed ]
+   [ multipart/signed ]
+   [ text/plain ]
+   > See the patch just posted here.
+
+   Is the list archived anywhere?  The obvious archives
+   (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I
+   think I subscribed too late to get the patch (I only just saw the
+   discussion about it).
+
+   It doesn't look like the patch is in git yet.
+
+   -- Lars
+
+   [ 5-line signature. Click/Enter to show. ]
+   -- 
+   Lars Kellogg-Stedman 
+   Senior Technologist, Computing and Information Technology
+   

[PATCH 3/4] emacs: test: notmuch show without indentation

2011-11-24 Thread Gregor Zattler
Previous behaviour was to indent messages in a thread according
to depth by one space per level.  In
id:1311028119-50637-1-git-send-email-fgeller at gmail.com Felix
Geller proposed a patch in order to turn indentation off.  This
commit tests if instead setting notmuch-indent-messages-width to
`0' does turn off indentation.
---
 test/emacs |7 +
 ...show-thread-maildir-storage-without-indentation |  215 
 2 files changed, 222 insertions(+), 0 deletions(-)
 create mode 100644 
test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation

diff --git a/test/emacs b/test/emacs
index 20d52d8..da6d22b 100755
--- a/test/emacs
+++ b/test/emacs
@@ -57,6 +57,13 @@ test_emacs "(let ((notmuch-indent-messages-width 1))
  (test-output))"
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage

+test_begin_subtest "Basic notmuch-show view in emacs without indentation"
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.GU3165 at dottiness.seas.harvard.edu)
+test_emacs "(let ((notmuch-indent-messages-width 0))
+ (notmuch-show \"$maildir_storage_thread\")
+ (test-output))"
+test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-without-indentation
+
 test_begin_subtest "notmuch-show for message with invalid From"
 add_message "[subject]=\"message-with-invalid-from\"" \
"[from]=\"\\\"Invalid \\\" From\\\" \""
diff --git 
a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation
 
b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation
new file mode 100644
index 000..fa2108e
--- /dev/null
+++ 
b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation
@@ -0,0 +1,215 @@
+Lars Kellogg-Stedman  (2009-11-17) (inbox signed)
+Subject: [notmuch] Working with Maildir storage?
+To: notmuch at notmuchmail.org
+Date: Tue, 17 Nov 2009 14:00:54 -0500
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+I saw the LWN article and decided to take a look at notmuch.  I'm
+currently using mutt and mairix to index and read a collection of
+Maildir mail folders (around 40,000 messages total).
+
+notmuch indexed the messages without complaint, but my attempt at
+searching bombed out. Running, for example:
+
+  notmuch search storage
+
+Resulted in 4604 lines of errors along the lines of:
+
+  Error opening
+  
/home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+  Too many open files
+
+I'm curious if this is expected behavior (i.e., notmuch does not work
+with Maildir) or if something else is going on.
+
+Cheers,
+
+[ 5-line signature. Click/Enter to show. ]
+-- 
+Lars Kellogg-Stedman 
+Senior Technologist, Computing and Information Technology
+Harvard University School of Engineering and Applied Sciences
+
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+___
+notmuch mailing list
+notmuch at notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+Mikhail Gusarov  (2009-11-17) (inbox signed unread)
+Subject: Re: [notmuch] Working with Maildir storage?
+To: notmuch at notmuchmail.org
+Date: Wed, 18 Nov 2009 01:02:38 +0600
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+
+Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars at seas.harvard.edu did 
gyre and gimble:
+
+ LK> Resulted in 4604 lines of errors along the lines of:
+
+ LK>   Error opening
+ LK>   
/home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+ LK>   Too many open files
+
+See the patch just posted here.
+
+[ 2-line signature. Click/Enter to show. ]
+-- 
+http://fossarchy.blogspot.com/
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+___
+notmuch mailing list
+notmuch at notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+Lars Kellogg-Stedman  (2009-11-17) (inbox signed 
unread)
+Subject: Re: [notmuch] Working with Maildir storage?
+To: Mikhail Gusarov 
+Cc: notmuch at notmuchmail.org
+Date: Tue, 17 Nov 2009 15:33:01 -0500
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+> See the patch just posted here.
+
+Is the list archived anywhere?  The obvious archives
+(http://notmuchmail.org/pipermail/notmuch/) aren't available, and I
+think I subscribed too late to get the patch (I only just saw the
+discussion about it).
+
+It doesn't look like the patch is in git yet.
+
+-- Lars
+
+[ 5-line signature. Click/Enter to show. ]
+-- 
+Lars Kellogg-Stedman 
+Senior Technologist, Computing and Information Technology
+Harvard University School of Engineering and Applied Sciences
+
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+___

[PATCH 2/4] emacs: test notmuch-indent-messages-width default

2011-11-24 Thread Gregor Zattler
Previous behaviour was to indent messages in a thread according
to depth by one space per level.  This is still the case with
notmuch-indent-messages-width default value `1'.  This test
succeeds if output with default value is same as in "Basic
notmuch-show view in emacs".
---
 test/emacs |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/test/emacs b/test/emacs
index 3bf2e29..20d52d8 100755
--- a/test/emacs
+++ b/test/emacs
@@ -50,6 +50,13 @@ test_emacs "(notmuch-show \"$maildir_storage_thread\")
(test-output)"
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage

+test_begin_subtest "Basic notmuch-show view in emacs default indentation"
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.GU3165 at dottiness.seas.harvard.edu)
+test_emacs "(let ((notmuch-indent-messages-width 1))
+ (notmuch-show \"$maildir_storage_thread\")
+ (test-output))"
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
+
 test_begin_subtest "notmuch-show for message with invalid From"
 add_message "[subject]=\"message-with-invalid-from\"" \
"[from]=\"\\\"Invalid \\\" From\\\" \""
-- 
1.7.7.3



[PATCH 1/4] emacs: make message indentation width customisable

2011-11-24 Thread Gregor Zattler
Till now Emacs UI indents messages according to their respecive
depth of neting in the thread.  The actual width of indentation
per level is hardcoded to `1' space.
This patch makes message indentation customisable by introducing
a variable `notmuch-indent-messages-width' which defaults to `1',
which is the same as before.  Felix could set this variable to
`0' in order to disable indentation, I tested it with a value of
`4' for a clearer separation of messages in a thread.
---
 emacs/notmuch-show.el |   14 --
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 7be88f8..d7fbbca 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -91,6 +91,16 @@ any given message."
   :group 'notmuch
   :type 'boolean)

+(defcustom notmuch-indent-messages-width 1
+  "Width of message indentation in threads.
+
+Messages are shown indented according to their depth in a thread.
+This variable determines the width of this indentation measured
+in number of blanks.  Defaults to `1', choose `0' to disable
+indentation."
+  :group 'notmuch
+  :type 'integer)
+
 (defcustom notmuch-show-indent-multipart nil
   "Should the sub-parts of a multipart/* part be indented?"
   ;; dme: Not sure which is a good default.
@@ -238,7 +248,7 @@ unchanged ADDRESS if parsing fails."
   "Insert a notmuch style headerline based on HEADERS for a
 message at DEPTH in the current thread."
   (let ((start (point)))
-(insert (notmuch-show-spaces-n depth)
+(insert (notmuch-show-spaces-n (* notmuch-indent-messages-width depth))
(notmuch-show-clean-address (plist-get headers :From))
" ("
date
@@ -739,7 +749,7 @@ current buffer, if possible."
 (setq content-end (point-marker))

 ;; Indent according to the depth in the thread.
-(indent-rigidly content-start content-end depth)
+(indent-rigidly content-start content-end (* notmuch-indent-messages-width 
depth))

 (setq message-end (point-max-marker))

-- 
1.7.7.3



[PATCH 0/4] emacs: make message indentation width customisable (was: Re: [PATCH 2a/2] emacs: test notmuch-indent-messages-width default)

2011-11-24 Thread Gregor Zattler
Dear David, notmuch developers,

* David Bremner  [24. Nov. 2011]:
> On Sun, 23 Oct 2011 21:38:43 +0200, Gregor Zattler  
> wrote:
> The extra copy of the patch header messes up the log messages with the 3
> test related patches in this series are applied. Can you resend with
> git-send-email?

Sure.

Felix Geller started this thread by proposing a patch to turn off
message indentation in notmuch show.  I instead wanted more
indentation.  I propose this patch set which

a) makes indentation width configurable, therefore Felix may set
   it to `0' which turns indentation off, I set it to `4' since I
   want clearer indication of thread level, while default is `1'
   which is the same as before.

b) contains three tests fore the above mentioned indentation width 
   values.

Thanks for notmuch, gregor


Gregor Zattler (4):
  emacs: make message indentation width customisable
  emacs: test notmuch-indent-messages-width default
  emacs: test: notmuch show without indentation
  emacs: test notmuch show with fourfold message indentation

 emacs/notmuch-show.el  |   14 +-
 test/emacs |   21 ++
 ...hread-maildir-storage-with-fourfold-indentation |  215 
 ...show-thread-maildir-storage-without-indentation |  215 
 4 files changed, 463 insertions(+), 2 deletions(-)
 create mode 100644 
test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
 create mode 100644 
test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation

--
1.7.7.3


[PATCH] have LATEST-notmuch-.tar.gz on releases web page

2011-11-24 Thread Tomi Ollila
The notmuchmail/releases page used to have LATEST-notmuch-
to link to the latest notmuch source tarball. This is confusing on
web page and on disk when the file has been downloaded. This change
looks a bit inconsistent with the 'rm' command just executed before.
$(TAR_FILE) is defined (currently) as $(PACKAGE)-$(VERSION).tar.gz;
as long as the prefix stays $(PACKAGE)-$(VERSION) and version begins
with a digit then this line is good in execution point of view.
---
 Makefile.local |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index c94402b..b4faada 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -122,7 +122,7 @@ release: verify-source-tree-and-version
 ifeq ($(REALLY_UPLOAD),yes)
git push origin $(VERSION)
cd releases && scp $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) 
$(RELEASE_HOST):$(RELEASE_DIR)
-   ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-[0-9]* ; ln 
-s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
+   ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-[0-9]* ; ln 
-s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(TAR_FILE)"
 endif
@echo "Please send a release announcement using 
$(PACKAGE)-$(VERSION).announce as a template."

-- 
1.7.7.3



compile error of current git on F15

2011-11-24 Thread Darren McGuicken
On Wed, 01 Jun 2011 09:55:16 -0700, Jameson Graef Rollins  wrote:
> On Wed, 01 Jun 2011 05:35:29 -0700, Dirk Hohndel  
> wrote:
> > This used to work and used to be supported and was broken in a
> > recent notmuch patch.
>
> If you don't have access to gmime 2.4, then maybe you could look into
> providing patches for gmime 2.6 support, or alternately into disabling
> the notmuch functionality that does not work with gmime 2.6 if only
> 2.6 is available.

Hi guys, I assume this is old news, although I haven't seen anything
else mentioned on list since the chain Dirk started - there's a koji
build of 0.9 for rawhide, the source rpm of which contains a gmime 2.6
patch.  I recently moved from Ubuntu to Fedora 16 on the netbook so I
grabbed the patch and spec file, updated it to point to the 0.10 tarball
and can confirm that the patch still applies cleanly and the notmuch
build appears fine (crypto et al).

Assuming this mail sends, of course :-)
-- 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/2024/f6fecbe5/attachment.pgp>


[PATCH v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-24 Thread Michal Sojka
On Thu, 24 Nov 2011, Daniel Schoepe wrote:
> On Thu, 24 Nov 2011 09:54:50 -0400, David Bremner  
> wrote:
> > On Mon, 10 Oct 2011 15:39:41 +0200, Daniel Schoepe  
> > wrote:
> > > From: Daniel Schoepe 
> > > 
> > > This patch makes the notmuch-hello screen fully customizable
> > > by allowing the user to add and remove arbitrary sections. It
> > > also provides some convenience functions for constructing sections,
> > > e.g. showing the unread message count for each tag.
> > > 
> > 
> > Yow, that is a big patch, I think it needs some more review.

I use this patch on a daily basis. There is probably some space for
improvements, especially in the coding style, but I'd like to see a more
experience elisp hacker than me looking at it.

> Yes; Unfortunately I didn't manage to come up with good partitioning
> into smaller patches, because the changes are quite interconnected.
> 
> Is there something I can do to help with the review?
> 
> I think there's also one performance improvement written by Michal
> Sojka, that isn't included in this version yet, 

Yes, that's true. I'm aware of one bug in this improvement. I usually
start notmuch by

  emacsclient -c -a '' -e "(notmuch)"

and the bug is that sometimes the emacs window disappear immediately
after appearing. This did not happen without this improvement and I
guess it is caused by some unexpected return value, perhaps in the code
which determines the initial position of the point.

Cheers,
-Michal


[PATCH] CLI: update call to notmuch_help_command for new calling conventions.

2011-11-24 Thread David Bremner
From: David Bremner 

When I changed the calling convention to pass in all but the zero-th
argument to subcommands, I missed this one call, resulting in a
segmentation fault.
---
 notmuch.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/notmuch.c b/notmuch.c
index 77973f8..d44ce9a 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -621,7 +621,7 @@ main (int argc, char *argv[])
return notmuch (local);

 if (STRNCMP_LITERAL (argv[1], "--help") == 0)
-   return notmuch_help_command (NULL, 0, NULL);
+   return notmuch_help_command (NULL, argc - 1, [1]);

 if (STRNCMP_LITERAL (argv[1], "--version") == 0) {
printf ("notmuch " STRINGIFY(NOTMUCH_VERSION) "\n");
-- 
1.7.5.4



[PATCH v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-24 Thread Daniel Schoepe
On Thu, 24 Nov 2011 09:54:50 -0400, David Bremner  wrote:
> On Mon, 10 Oct 2011 15:39:41 +0200, Daniel Schoepe  
> wrote:
> > From: Daniel Schoepe 
> > 
> > This patch makes the notmuch-hello screen fully customizable
> > by allowing the user to add and remove arbitrary sections. It
> > also provides some convenience functions for constructing sections,
> > e.g. showing the unread message count for each tag.
> > 
> 
> Yow, that is a big patch, I think it needs some more review.

Yes; Unfortunately I didn't manage to come up with good partitioning
into smaller patches, because the changes are quite interconnected.

Is there something I can do to help with the review?

I think there's also one performance improvement written by Michal
Sojka, that isn't included in this version yet, but since patches are
getting applied more timely now, I guess that can be merged afterwards.

Cheers,
Daniel
-- 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/2024/3569091b/attachment.pgp>


python-notmuch decoding error on a message

2011-11-24 Thread David Bremner
On Sun, 6 Nov 2011 23:15:54 +0100, Antoine Amarilli  wrote:
> Hello,
> 
> The attached message makes python-notmuch crash when trying to access it (see
> attached log).
> 
> I don't know if the encoding of Subject is valid or not, but it would probably
> be better anyway to ignore decoding errors and return some approximation of
> Subject instead of failing like this.
> 

I get a set of critical errors about forgetting to call g_type_init.

We actually call g_type_init in the CLI now, thanks to 

   id:"1311625989-97755-1-git-send-email-aaronecay at gmail.com"

but it sounds like this probably needs to be called either in libnotmuch
or in the bindings. 

For what it is worth this message decodes fine in the CLI

d


[PATCH v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-24 Thread David Bremner
On Mon, 10 Oct 2011 15:39:41 +0200, Daniel Schoepe  
wrote:
> From: Daniel Schoepe 
> 
> This patch makes the notmuch-hello screen fully customizable
> by allowing the user to add and remove arbitrary sections. It
> also provides some convenience functions for constructing sections,
> e.g. showing the unread message count for each tag.
> 

Yow, that is a big patch, I think it needs some more review.

d


[PATCH] emacs: Don't record undo information for search or show buffers.

2011-11-24 Thread David Bremner
On Sun, 20 Nov 2011 20:00:55 -0500, Austin Clements  wrote:
> There's no reason to record undo information for read-only,
> programmatically-constructed buffers.  The undo list just chews up
> memory keeping track of our calls to insert.

Pushed.

d


Re: Notmuch indexing 21 million emails

2011-11-24 Thread Felipe Contreras
On Tue, Nov 22, 2011 at 5:02 AM, Tom Bulli mrbu...@yahoo.com wrote:
 I have a project where I need to search about 21 emails - and decided to use 
 notmuch for it.  The system is a Debian Squeeze, the notmuch version is 
 0.8-1~bpo60+1 from kyria's private repository.

 I am running the notmuch new for approx. 4 days now - and according to 
 not,uch count it has indexed about 4.5 million emails.

 Is this expected performance?  Is there any way to speed that up?

It would be nice to run something like this with OProfile (or perf)
and see if there's some obvious fixes.

-- 
Felipe Contreras
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


notmuch release 0.10 now available

2011-11-24 Thread David Bremner

Where to obtain notmuch 0.10
===
  http://notmuchmail.org/releases/notmuch-0.10.tar.gz

Which can be verified with:

  http://notmuchmail.org/releases/notmuch-0.10.tar.gz.sha1
  6dc3d84da53cb16818d06e1825022f3b23e473d5  notmuch-0.10.tar.gz

  http://notmuchmail.org/releases/notmuch-0.10.tar.gz.sha1.asc
  (signed by David Bremner)

What's new in notmuch 0.10
=

New build and testing features
--

Emacs tests are now done in dtach. This means that dtach  is now
needed to run the notmuch test suite, at least until the checking for
prerequisites is improved.

Full test coverage of the stashing feature in Emacs.

New command-line features
-

Add notmuch restore --accumulate option

  The --accumulate switch causes the union of the existing and new tags to be
  applied, instead of replacing each message's tags as they are read in from
  the dump file.

Add search terms to  notmuch dump

  The dump command now takes an optional search term much like notmuch
  search/show/tag. The output file argument of dump is deprecated in
  favour of using stdout.

Add notmuch search --offset and --limit options

  The search command now takes options --offset=[-]N and --limit=N to limit
  the number of results shown.

Add notmuch count --output option

  The count command is now capable of counting threads in addition to
  messages. This is selected using the new --output=(threads|messages) option.

New emacs UI features
-

Add tab-completion for notmuch-search and notmuch-search-filter

  These functions now support completion tags for query parts
  starting with tag:.

Turn id:MSG-ID links into buttons associated with notmuch searches

  Text of the form id:MSG-ID in mails is now a clickable button that
  opens a notmuch search for the given message id.

Add keybinding ('c I') for stashing Message-ID's without an id: prefix

  Reduces manual labour when stashing them for use outside notmuch.

Do not query on notmuch-search exit

   It is harmless to kill the external notmuch process, so the user
   is no longer interrogated when they interrupt a search.

Performance
---

Emacs now constructs large search buffers more efficiently

Search avoids opening and parsing message files

  We now store more information in the database so search no longer
  has to open every message file to get basic headers.  This can
  improve search speed by as much as 10X, but taking advantage of this
  requires a database rebuild:

notmuch dump  notmuch.dump
# Backup, then remove notmuch database ($MAIL/.notmuch)
notmuch new
notmuch restore notmuch.dump

New collection of add-on tools
--

The source directory contrib contains tools built on notmuch.  These
tools are not part of notmuch, and you should check their individual
licenses.  Feel free to report problems with them to the notmuch
mailing list.

nmbug - share tags with a given prefix

   nmbug helps maintain a git repo containing all tags with a given
   prefix (by default notmuch::). Tags can be shared by commiting
   them to git in one location and restoring in another.

What is notmuch
===
Notmuch is a system for indexing, searching, reading, and tagging
large collections of email messages in maildir or mh format. It uses
the Xapian library to provide fast, full-text search with a convenient
search syntax.

For more about notmuch, see http://notmuchmail.org



pgpIDlV2PML6x.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[RFC PATCH 1/2] emacs: allow functions as saved searches

2011-11-24 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org
---
 emacs/notmuch-hello.el |9 +++--
 emacs/notmuch-lib.el   |8 ++--
 emacs/notmuch.el   |9 +++--
 3 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 0582cae..ad3ae74 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -274,7 +274,9 @@ should be. Returns a cons cell `(tags-per-line width)'.
;; (not elem) indicates an empty slot in the matrix.
(when elem
  (let* ((name (car elem))
-(query (cdr elem))
+(query (if (functionp (cdr elem))
+   (funcall (cdr elem) elem)
+   (cdr elem)))
 (formatted-name (format %s  name)))
(widget-insert (format %8s 
   (notmuch-hello-nice-number
@@ -452,7 +454,10 @@ Complete list of currently available key bindings:
  (if notmuch-show-empty-saved-searches
  notmuch-saved-searches
(loop for elem in notmuch-saved-searches
- if ( (string-to-number (notmuch-saved-search-count (cdr 
elem))) 0)
+ if ( (string-to-number (notmuch-saved-search-count
+  (if (functionp (cdr elem))
+  (funcall (cdr elem) elem)
+(cdr elem 0)
  collect elem)))
 (saved-widest (notmuch-hello-longest-label saved-alist))
 (alltags-alist (if notmuch-show-all-tags-list 
(notmuch-hello-generate-tag-alist)))
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 0f856bf..2ecb3fc 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -36,8 +36,12 @@
 ;;
 
 (defcustom notmuch-saved-searches nil
-  A list of saved searches to display.
-  :type '(alist :key-type string :value-type string)
+  A list of saved searches to display.
+
+The list of saved searches is a list of key/value pairs, where
+the key is the name of the saved search, and value is either a
+query string, or a function that should return a query string.
+  :type '(alist :key-type string :value-type (choice string function))
   :group 'notmuch)
 
 (defvar notmuch-folders nil
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index c1827cc..62f33e9 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -854,14 +854,19 @@ characters as well as `_.+-'.
  (let (longest
(longest-length 0))
(loop for tuple in notmuch-saved-searches
- if (let ((quoted-query (regexp-quote (cdr tuple
+ if (let ((quoted-query (regexp-quote
+ (if (functionp (cdr tuple))
+ (funcall (cdr tuple) tuple)
+   (cdr tuple)
   (and (string-match (concat ^ quoted-query) query)
( (length (match-string 0 query))
   longest-length)))
  do (setq longest tuple))
longest))
 (saved-search-name (car saved-search))
-(saved-search-query (cdr saved-search)))
+(saved-search-query (if (functionp (cdr saved-search))
+(funcall (cdr saved-search) saved-search)
+  (cdr saved-search
 (cond ((and saved-search (equal saved-search-query query))
   ;; Query is the same as saved search (ignoring case)
   (concat *notmuch-saved-search- saved-search-name *))
-- 
1.7.5.4

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[RFC PATCH 2/2] emacs: a couple of example functions that might be useful with saved searches

2011-11-24 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org
---
 emacs/notmuch-hello.el |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index ad3ae74..f03e4b9 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -26,6 +26,24 @@
 (require 'notmuch-lib)
 (require 'notmuch-mua)
 
+(defun notmuch-no-saved-search-match (this)
+  (mapconcat (lambda (arg) (concat (not (
+  (if (functionp (cdr arg))
+  (funcall (cdr arg) arg)
+(cdr arg)) 
+(loop for elem in notmuch-saved-searches
+  if (not (equal (car this) (car elem)))
+  collect elem)
+ and ))
+
+(defun notmuch-get-saved-search (name)
+  (let ((elem (assoc name notmuch-saved-searches)))
+(if elem
+   (if (functionp (cdr elem))
+   (funcall (cdr elem) elem)
+ (cdr elem))
+  )))
+
 (declare-function notmuch-search notmuch (query optional oldest-first 
target-thread target-line continuation))
 (declare-function notmuch-poll notmuch ())
 
-- 
1.7.5.4

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 2a/2] emacs: test notmuch-indent-messages-width default

2011-11-24 Thread David Bremner
On Sun, 23 Oct 2011 21:38:43 +0200, Gregor Zattler telegr...@gmx.net wrote:
 From e9cbb995c2d51cb3de3baa485e9a6861f6c36b0a Mon Sep 17 00:00:00 2001
 From: Gregor Zattler telegr...@gmx.net
 Date: Sun, 23 Oct 2011 21:10:18 +0200
 Subject: [PATCH] emacs: test notmuch-indent-messages-width default

Hi Gregor;

The extra copy of the patch header messes up the log messages with the 3
test related patches in this series are applied. Can you resend with
git-send-email?

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-24 Thread David Bremner
On Mon, 10 Oct 2011 15:39:41 +0200, Daniel Schoepe dan...@schoepe.org wrote:
 From: Daniel Schoepe daniel.scho...@googlemail.com
 
 This patch makes the notmuch-hello screen fully customizable
 by allowing the user to add and remove arbitrary sections. It
 also provides some convenience functions for constructing sections,
 e.g. showing the unread message count for each tag.
 

Yow, that is a big patch, I think it needs some more review.

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-24 Thread Daniel Schoepe
On Thu, 24 Nov 2011 09:54:50 -0400, David Bremner da...@tethera.net wrote:
 On Mon, 10 Oct 2011 15:39:41 +0200, Daniel Schoepe dan...@schoepe.org wrote:
  From: Daniel Schoepe daniel.scho...@googlemail.com
  
  This patch makes the notmuch-hello screen fully customizable
  by allowing the user to add and remove arbitrary sections. It
  also provides some convenience functions for constructing sections,
  e.g. showing the unread message count for each tag.
  
 
 Yow, that is a big patch, I think it needs some more review.

Yes; Unfortunately I didn't manage to come up with good partitioning
into smaller patches, because the changes are quite interconnected.

Is there something I can do to help with the review?

I think there's also one performance improvement written by Michal
Sojka, that isn't included in this version yet, but since patches are
getting applied more timely now, I guess that can be merged afterwards.

Cheers,
Daniel


pgpo873yGBoYF.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] debian/control: require dtach version = 0.8 in Build-Depends

2011-11-24 Thread David Bremner
On Mon, 21 Nov 2011 17:18:00 +0200, Tomi Ollila tomi.oll...@iki.fi wrote:
 Since version 0.8 of dtach -n does no longer require controlling
 tty to be present when executed. Currently controlling tty is not
 always (if ever) present when tests are executed.

Pushed.

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] emacs: Avoid unnecessary markers.

2011-11-24 Thread David Bremner
On Sun, 20 Nov 2011 20:07:02 -0500, Austin Clements amdra...@mit.edu wrote:
 This is just cleanup.  These markers are all immediately resolved to
 points by Emacs, so using markers here is just unncessary overhead.

Pushed.

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] emacs: Don't record undo information for search or show buffers.

2011-11-24 Thread David Bremner
On Sun, 20 Nov 2011 20:00:55 -0500, Austin Clements amdra...@mit.edu wrote:
 There's no reason to record undo information for read-only,
 programmatically-constructed buffers.  The undo list just chews up
 memory keeping track of our calls to insert.

Pushed.

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-24 Thread Michal Sojka
On Thu, 24 Nov 2011, Daniel Schoepe wrote:
 On Thu, 24 Nov 2011 09:54:50 -0400, David Bremner da...@tethera.net wrote:
  On Mon, 10 Oct 2011 15:39:41 +0200, Daniel Schoepe dan...@schoepe.org 
  wrote:
   From: Daniel Schoepe daniel.scho...@googlemail.com
   
   This patch makes the notmuch-hello screen fully customizable
   by allowing the user to add and remove arbitrary sections. It
   also provides some convenience functions for constructing sections,
   e.g. showing the unread message count for each tag.
   
  
  Yow, that is a big patch, I think it needs some more review.

I use this patch on a daily basis. There is probably some space for
improvements, especially in the coding style, but I'd like to see a more
experience elisp hacker than me looking at it.

 Yes; Unfortunately I didn't manage to come up with good partitioning
 into smaller patches, because the changes are quite interconnected.
 
 Is there something I can do to help with the review?
 
 I think there's also one performance improvement written by Michal
 Sojka, that isn't included in this version yet, 

Yes, that's true. I'm aware of one bug in this improvement. I usually
start notmuch by

  emacsclient -c -a '' -e (notmuch)

and the bug is that sometimes the emacs window disappear immediately
after appearing. This did not happen without this improvement and I
guess it is caused by some unexpected return value, perhaps in the code
which determines the initial position of the point.

Cheers,
-Michal
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: python-notmuch decoding error on a message

2011-11-24 Thread David Bremner
On Sun, 6 Nov 2011 23:15:54 +0100, Antoine Amarilli antoine.amari...@ens.fr 
wrote:
 Hello,
 
 The attached message makes python-notmuch crash when trying to access it (see
 attached log).
 
 I don't know if the encoding of Subject is valid or not, but it would probably
 be better anyway to ignore decoding errors and return some approximation of
 Subject instead of failing like this.
 

I get a set of critical errors about forgetting to call g_type_init.

We actually call g_type_init in the CLI now, thanks to 
   
   id:1311625989-97755-1-git-send-email-aarone...@gmail.com

but it sounds like this probably needs to be called either in libnotmuch
or in the bindings. 

For what it is worth this message decodes fine in the CLI

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] CLI: update call to notmuch_help_command for new calling conventions.

2011-11-24 Thread David Bremner
From: David Bremner brem...@debian.org

When I changed the calling convention to pass in all but the zero-th
argument to subcommands, I missed this one call, resulting in a
segmentation fault.
---
 notmuch.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/notmuch.c b/notmuch.c
index 77973f8..d44ce9a 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -621,7 +621,7 @@ main (int argc, char *argv[])
return notmuch (local);
 
 if (STRNCMP_LITERAL (argv[1], --help) == 0)
-   return notmuch_help_command (NULL, 0, NULL);
+   return notmuch_help_command (NULL, argc - 1, argv[1]);
 
 if (STRNCMP_LITERAL (argv[1], --version) == 0) {
printf (notmuch  STRINGIFY(NOTMUCH_VERSION) \n);
-- 
1.7.5.4

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: compile error of current git on F15

2011-11-24 Thread Darren McGuicken
On Wed, 01 Jun 2011 09:55:16 -0700, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
 On Wed, 01 Jun 2011 05:35:29 -0700, Dirk Hohndel hohn...@infradead.org 
 wrote:
  This used to work and used to be supported and was broken in a
  recent notmuch patch.

 If you don't have access to gmime 2.4, then maybe you could look into
 providing patches for gmime 2.6 support, or alternately into disabling
 the notmuch functionality that does not work with gmime 2.6 if only
 2.6 is available.

Hi guys, I assume this is old news, although I haven't seen anything
else mentioned on list since the chain Dirk started - there's a koji
build of 0.9 for rawhide, the source rpm of which contains a gmime 2.6
patch.  I recently moved from Ubuntu to Fedora 16 on the netbook so I
grabbed the patch and spec file, updated it to point to the 0.10 tarball
and can confirm that the patch still applies cleanly and the notmuch
build appears fine (crypto et al).

Assuming this mail sends, of course :-)


pgp8B9YzVCCLp.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 0/4] emacs: make message indentation width customisable (was: Re: [PATCH 2a/2] emacs: test notmuch-indent-messages-width default)

2011-11-24 Thread Gregor Zattler
Dear David, notmuch developers,

* David Bremner da...@tethera.net [24. Nov. 2011]:
 On Sun, 23 Oct 2011 21:38:43 +0200, Gregor Zattler telegr...@gmx.net wrote:
 The extra copy of the patch header messes up the log messages with the 3
 test related patches in this series are applied. Can you resend with
 git-send-email?

Sure.

Felix Geller started this thread by proposing a patch to turn off
message indentation in notmuch show.  I instead wanted more
indentation.  I propose this patch set which

a) makes indentation width configurable, therefore Felix may set
   it to `0' which turns indentation off, I set it to `4' since I
   want clearer indication of thread level, while default is `1'
   which is the same as before.

b) contains three tests fore the above mentioned indentation width 
   values.

Thanks for notmuch, gregor


Gregor Zattler (4):
  emacs: make message indentation width customisable
  emacs: test notmuch-indent-messages-width default
  emacs: test: notmuch show without indentation
  emacs: test notmuch show with fourfold message indentation

 emacs/notmuch-show.el  |   14 +-
 test/emacs |   21 ++
 ...hread-maildir-storage-with-fourfold-indentation |  215 
 ...show-thread-maildir-storage-without-indentation |  215 
 4 files changed, 463 insertions(+), 2 deletions(-)
 create mode 100644 
test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
 create mode 100644 
test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation

--
1.7.7.3
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/4] emacs: make message indentation width customisable

2011-11-24 Thread Gregor Zattler
Till now Emacs UI indents messages according to their respecive
depth of neting in the thread.  The actual width of indentation
per level is hardcoded to `1' space.
This patch makes message indentation customisable by introducing
a variable `notmuch-indent-messages-width' which defaults to `1',
which is the same as before.  Felix could set this variable to
`0' in order to disable indentation, I tested it with a value of
`4' for a clearer separation of messages in a thread.
---
 emacs/notmuch-show.el |   14 --
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 7be88f8..d7fbbca 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -91,6 +91,16 @@ any given message.
   :group 'notmuch
   :type 'boolean)
 
+(defcustom notmuch-indent-messages-width 1
+  Width of message indentation in threads.
+
+Messages are shown indented according to their depth in a thread.
+This variable determines the width of this indentation measured
+in number of blanks.  Defaults to `1', choose `0' to disable
+indentation.
+  :group 'notmuch
+  :type 'integer)
+
 (defcustom notmuch-show-indent-multipart nil
   Should the sub-parts of a multipart/* part be indented?
   ;; dme: Not sure which is a good default.
@@ -238,7 +248,7 @@ unchanged ADDRESS if parsing fails.
   Insert a notmuch style headerline based on HEADERS for a
 message at DEPTH in the current thread.
   (let ((start (point)))
-(insert (notmuch-show-spaces-n depth)
+(insert (notmuch-show-spaces-n (* notmuch-indent-messages-width depth))
(notmuch-show-clean-address (plist-get headers :From))
 (
date
@@ -739,7 +749,7 @@ current buffer, if possible.
 (setq content-end (point-marker))
 
 ;; Indent according to the depth in the thread.
-(indent-rigidly content-start content-end depth)
+(indent-rigidly content-start content-end (* notmuch-indent-messages-width 
depth))
 
 (setq message-end (point-max-marker))
 
-- 
1.7.7.3

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 3/4] emacs: test: notmuch show without indentation

2011-11-24 Thread Gregor Zattler
Previous behaviour was to indent messages in a thread according
to depth by one space per level.  In
id:1311028119-50637-1-git-send-email-fgel...@gmail.com Felix
Geller proposed a patch in order to turn indentation off.  This
commit tests if instead setting notmuch-indent-messages-width to
`0' does turn off indentation.
---
 test/emacs |7 +
 ...show-thread-maildir-storage-without-indentation |  215 
 2 files changed, 222 insertions(+), 0 deletions(-)
 create mode 100644 
test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation

diff --git a/test/emacs b/test/emacs
index 20d52d8..da6d22b 100755
--- a/test/emacs
+++ b/test/emacs
@@ -57,6 +57,13 @@ test_emacs (let ((notmuch-indent-messages-width 1))
  (test-output))
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
 
+test_begin_subtest Basic notmuch-show view in emacs without indentation
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@dottiness.seas.harvard.edu)
+test_emacs (let ((notmuch-indent-messages-width 0))
+ (notmuch-show \$maildir_storage_thread\)
+ (test-output))
+test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-without-indentation
+
 test_begin_subtest notmuch-show for message with invalid From
 add_message [subject]=\message-with-invalid-from\ \
[from]=Invalid \\\ From\\\ test_su...@notmuchmail.org\
diff --git 
a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation
 
b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation
new file mode 100644
index 000..fa2108e
--- /dev/null
+++ 
b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation
@@ -0,0 +1,215 @@
+Lars Kellogg-Stedman l...@seas.harvard.edu (2009-11-17) (inbox signed)
+Subject: [notmuch] Working with Maildir storage?
+To: notmuch@notmuchmail.org
+Date: Tue, 17 Nov 2009 14:00:54 -0500
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+I saw the LWN article and decided to take a look at notmuch.  I'm
+currently using mutt and mairix to index and read a collection of
+Maildir mail folders (around 40,000 messages total).
+
+notmuch indexed the messages without complaint, but my attempt at
+searching bombed out. Running, for example:
+
+  notmuch search storage
+
+Resulted in 4604 lines of errors along the lines of:
+
+  Error opening
+  
/home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+  Too many open files
+
+I'm curious if this is expected behavior (i.e., notmuch does not work
+with Maildir) or if something else is going on.
+
+Cheers,
+
+[ 5-line signature. Click/Enter to show. ]
+-- 
+Lars Kellogg-Stedman l...@seas.harvard.edu
+Senior Technologist, Computing and Information Technology
+Harvard University School of Engineering and Applied Sciences
+
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+___
+notmuch mailing list
+notmuch@notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+Mikhail Gusarov dotted...@dottedmag.net (2009-11-17) (inbox signed unread)
+Subject: Re: [notmuch] Working with Maildir storage?
+To: notmuch@notmuchmail.org
+Date: Wed, 18 Nov 2009 01:02:38 +0600
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+
+Twas brillig at 14:00:54 17.11.2009 UTC-05 when l...@seas.harvard.edu did gyre 
and gimble:
+
+ LK Resulted in 4604 lines of errors along the lines of:
+
+ LK   Error opening
+ LK   
/home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+ LK   Too many open files
+
+See the patch just posted here.
+
+[ 2-line signature. Click/Enter to show. ]
+-- 
+http://fossarchy.blogspot.com/
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+___
+notmuch mailing list
+notmuch@notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+Lars Kellogg-Stedman l...@seas.harvard.edu (2009-11-17) (inbox signed unread)
+Subject: Re: [notmuch] Working with Maildir storage?
+To: Mikhail Gusarov dotted...@dottedmag.net
+Cc: notmuch@notmuchmail.org
+Date: Tue, 17 Nov 2009 15:33:01 -0500
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+ See the patch just posted here.
+
+Is the list archived anywhere?  The obvious archives
+(http://notmuchmail.org/pipermail/notmuch/) aren't available, and I
+think I subscribed too late to get the patch (I only just saw the
+discussion about it).
+
+It doesn't look like the patch is in git yet.
+
+-- Lars
+
+[ 5-line signature. Click/Enter to show. ]
+-- 
+Lars Kellogg-Stedman l...@seas.harvard.edu
+Senior Technologist, Computing and Information Technology
+Harvard University School of Engineering and Applied Sciences
+
+[ application/pgp-signature ]
+[ 

[PATCH 4/4] emacs: test notmuch show with fourfold message indentation

2011-11-24 Thread Gregor Zattler
Previous behaviour was to indent messages in a thread according
to depth by one space per level.  This commit tests if setting
notmuch-indent-messages-width to `4' provides a message thread
with four spaces of indentation thread depth.
---
 test/emacs |7 +
 ...hread-maildir-storage-with-fourfold-indentation |  215 
 2 files changed, 222 insertions(+), 0 deletions(-)
 create mode 100644 
test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation

diff --git a/test/emacs b/test/emacs
index da6d22b..198c27b 100755
--- a/test/emacs
+++ b/test/emacs
@@ -64,6 +64,13 @@ test_emacs (let ((notmuch-indent-messages-width 0))
  (test-output))
 test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-without-indentation
 
+test_begin_subtest Basic notmuch-show view in emacs with fourfold indentation
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@dottiness.seas.harvard.edu)
+test_emacs (let ((notmuch-indent-messages-width 4))
+ (notmuch-show \$maildir_storage_thread\)
+ (test-output))
+test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
+
 test_begin_subtest notmuch-show for message with invalid From
 add_message [subject]=\message-with-invalid-from\ \
[from]=Invalid \\\ From\\\ test_su...@notmuchmail.org\
diff --git 
a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
 
b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
new file mode 100644
index 000..41e2aaa
--- /dev/null
+++ 
b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
@@ -0,0 +1,215 @@
+Lars Kellogg-Stedman l...@seas.harvard.edu (2009-11-17) (inbox signed)
+Subject: [notmuch] Working with Maildir storage?
+To: notmuch@notmuchmail.org
+Date: Tue, 17 Nov 2009 14:00:54 -0500
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+I saw the LWN article and decided to take a look at notmuch.  I'm
+currently using mutt and mairix to index and read a collection of
+Maildir mail folders (around 40,000 messages total).
+
+notmuch indexed the messages without complaint, but my attempt at
+searching bombed out. Running, for example:
+
+  notmuch search storage
+
+Resulted in 4604 lines of errors along the lines of:
+
+  Error opening
+  
/home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+  Too many open files
+
+I'm curious if this is expected behavior (i.e., notmuch does not work
+with Maildir) or if something else is going on.
+
+Cheers,
+
+[ 5-line signature. Click/Enter to show. ]
+-- 
+Lars Kellogg-Stedman l...@seas.harvard.edu
+Senior Technologist, Computing and Information Technology
+Harvard University School of Engineering and Applied Sciences
+
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+___
+notmuch mailing list
+notmuch@notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+Mikhail Gusarov dotted...@dottedmag.net (2009-11-17) (inbox signed 
unread)
+Subject: Re: [notmuch] Working with Maildir storage?
+To: notmuch@notmuchmail.org
+Date: Wed, 18 Nov 2009 01:02:38 +0600
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ text/plain ]
+
+Twas brillig at 14:00:54 17.11.2009 UTC-05 when l...@seas.harvard.edu did 
gyre and gimble:
+
+ LK Resulted in 4604 lines of errors along the lines of:
+
+ LK   Error opening
+ LK   
/home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:
+ LK   Too many open files
+
+See the patch just posted here.
+
+[ 2-line signature. Click/Enter to show. ]
+-- 
+http://fossarchy.blogspot.com/
+[ application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]
+___
+notmuch mailing list
+notmuch@notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+Lars Kellogg-Stedman l...@seas.harvard.edu (2009-11-17) (inbox 
signed unread)
+   Subject: Re: [notmuch] Working with Maildir storage?
+   To: Mikhail Gusarov dotted...@dottedmag.net
+   Cc: notmuch@notmuchmail.org
+   Date: Tue, 17 Nov 2009 15:33:01 -0500
+
+   [ multipart/mixed ]
+   [ multipart/signed ]
+   [ text/plain ]
+See the patch just posted here.
+
+   Is the list archived anywhere?  The obvious archives
+   (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I
+   think I subscribed too late to get the patch (I only just saw the
+   discussion about it).
+
+   It doesn't look like the patch is in git yet.
+
+   -- Lars
+
+   [ 5-line signature. Click/Enter to show. ]
+   -- 
+   Lars