[PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-18 Thread Felix Geller
On Mon, 18 Jul 2011 11:30:53 -0700, Jameson Graef Rollins  wrote:
Non-text part: multipart/signed
> On Wed, 13 Jul 2011 01:46:24 +0200, Felix Geller  wrote:
> > Ok, tried again :) 
> 
> Hey, Felix.  It looks like the two attachments to your email are
> actually the emails generated by format-patch that should have been sent
> to the list.  Instead of attaching them to other emails, send them to
> the list directly.  You might take a look at the git send-email command,
> which can handle sending them directly for you.

Used git send-email this time, did that turn out correctly? :)


Cheers, Felix

-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 202 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20110718/67930ee2/attachment.pgp>


[PATCH 2/2] Test for toggling message indentation

2011-07-18 Thread Felix Geller
---
 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 53f455a..c65d6d8 100755
--- a/test/emacs
+++ b/test/emacs
@@ -55,6 +55,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 without indentation"
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.GU3165 at dottiness.seas.harvard.edu)
+test_emacs "(let ((notmuch-show-indent-messages-in-thread nil))
+ (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..00bd006
--- /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. ]
+___
+notmuch mailing list
+notmuch at notmuchmail.org
+http://notmuchmail.org/mailman/listinfo/notmuch
+Mikhail Gusarov  (2009-11-17) (inbox unread)
+Subject: [notmuch] Working with Maildir storage?
+To: notmuch at notmuchmail.org
+Date: Wed, 18 Nov 2009 02:50:48 +0600
+
+
+Twas brillig at 15:33:01 17.11.2009 UTC-05 

[PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show

2011-07-18 Thread Felix Geller
---
 emacs/notmuch-show.el |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f96743b..48df4c5 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -90,6 +90,11 @@ any given message."
   :group 'notmuch
   :type 'boolean)

+(defcustom notmuch-show-indent-messages-in-thread t
+  "Should messages be indented according to their depth in a thread?"
+  :group 'notmuch
+  :type 'boolean)
+
 (defcustom notmuch-show-indent-multipart nil
   "Should the sub-parts of a multipart/* part be indented?"
   ;; dme: Not sure which is a good default.
@@ -237,8 +242,9 @@ 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)
-   (notmuch-show-clean-address (plist-get headers :From))
+(when notmuch-show-indent-messages-in-thread
+  (insert (notmuch-show-spaces-n depth)))
+(insert (notmuch-show-clean-address (plist-get headers :From))
" ("
date
") ("
@@ -733,7 +739,8 @@ current buffer, if possible."
 (setq content-end (point-marker))

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

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

-- 
1.7.6



[PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show

2011-07-18 Thread Jameson Graef Rollins
Hi, Felix.  Thanks for resubmitting these patches.  A couple more
comments:

Remember to include a longer log message with you patch.  Beyond just
the single line commit message, the patch should also include a longer
commit message, separated from the first line by a blank line, that
explains what exactly the patch is doing and why.

We've also been trying to get in the habit of sending patches to the
test suite *first*, before the patch that actually implements the
change.  The reason being that we can apply the test-suite patch first,
see that the feature or bug fix you're trying to implement is not
implemented, then apply the fix and see that everything is working
again.

Now is probably a good time to remind everyone to look at the GIT patch
submission guidlines, which notmuch has been trying to follow (also
linked from http://notmuchmail.org):

http://repo.or.cz/w/git.git?a=blob;f=Documentation/SubmittingPatches;hb=HEAD

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/20110718/237935e7/attachment.pgp>


[PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-18 Thread Jameson Graef Rollins
On Wed, 13 Jul 2011 01:46:24 +0200, Felix Geller  wrote:
> Ok, tried again :) 

Hey, Felix.  It looks like the two attachments to your email are
actually the emails generated by format-patch that should have been sent
to the list.  Instead of attaching them to other emails, send them to
the list directly.  You might take a look at the git send-email command,
which can handle sending them directly for you.

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/20110718/8a7aa4ed/attachment.pgp>


Missing inlined message/rfc822 bodies?

2011-07-18 Thread Keith Packard
On Mon, 18 Jul 2011 08:56:13 -0300, David Bremner  wrote:

> I'm curious if you're both solving the same problem.

I would assume so; my patch simply kludges around the problem with a
hack in the emacs code while jrollins is fixing the underlying gmime
interactions.

-- 
keith.packard at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20110718/a7fe2815/attachment.pgp>


Missing inlined message/rfc822 bodies?

2011-07-18 Thread David Bremner
On Mon, 18 Jul 2011 01:06:05 -0700, "Keith Packard"  
wrote:
Non-text part: multipart/mixed
Non-text part: multipart/signed
> 
> I wasn't seeing anything for an inlined message/rfc822 part (as with a
> forwarded email message) and discovered that for some reason, the
> message structure wasn't as expected. The following patch appears to
> help me.

Hi Keith;

Did you have a chance to try jrollins' patches

id:"1307320169-29905-1-git-send-email-jrollins at finestructure.net"

I'm curious if you're both solving the same problem.

d
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20110718/8b741864/attachment.pgp>


Missing inlined message/rfc822 bodies?

2011-07-18 Thread Keith Packard

I wasn't seeing anything for an inlined message/rfc822 part (as with a
forwarded email message) and discovered that for some reason, the
message structure wasn't as expected. The following patch appears to
help me.

I'm still stuck trying to use the 'v' key to display attachments from
forwarded messages; it looks like mm-dissect-buffer isn't digging into
the attached message and pulling the embedded attachments out or something.

However, I can at least view the message and save the attachments now.

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f96743b..402fb2c 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -519,6 +519,12 @@ current buffer, if possible."
 ;; message display.
 (insert "\n")

+;;
+;; I dunno, sometimes the message part is a single element list containing 
the plist
+;;
+(if (not inner-parts)
+  (setq inner-parts (plist-get (car message-part) :content)))
+
 ;; Show all of the parts.
 (mapc (lambda (inner-part)
(notmuch-show-insert-bodypart msg inner-part depth))


-- 
keith.packard at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20110718/67bcf4d0/attachment.pgp>


Re: Missing inlined message/rfc822 bodies?

2011-07-18 Thread David Bremner
On Mon, 18 Jul 2011 01:06:05 -0700, Keith Packard kei...@keithp.com wrote:
Non-text part: multipart/mixed
Non-text part: multipart/signed
 
 I wasn't seeing anything for an inlined message/rfc822 part (as with a
 forwarded email message) and discovered that for some reason, the
 message structure wasn't as expected. The following patch appears to
 help me.

Hi Keith;

Did you have a chance to try jrollins' patches

id:1307320169-29905-1-git-send-email-jroll...@finestructure.net

I'm curious if you're both solving the same problem.

d


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


Re: Missing inlined message/rfc822 bodies?

2011-07-18 Thread Keith Packard
On Mon, 18 Jul 2011 08:56:13 -0300, David Bremner da...@tethera.net wrote:

 I'm curious if you're both solving the same problem.

I would assume so; my patch simply kludges around the problem with a
hack in the emacs code while jrollins is fixing the underlying gmime
interactions.

-- 
keith.pack...@intel.com


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


Re: [PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-18 Thread Jameson Graef Rollins
On Wed, 13 Jul 2011 01:46:24 +0200, Felix Geller fgel...@gmail.com wrote:
 Ok, tried again :) 

Hey, Felix.  It looks like the two attachments to your email are
actually the emails generated by format-patch that should have been sent
to the list.  Instead of attaching them to other emails, send them to
the list directly.  You might take a look at the git send-email command,
which can handle sending them directly for you.

jamie.


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


[PATCH 2/2] Test for toggling message indentation

2011-07-18 Thread Felix Geller
---
 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 53f455a..c65d6d8 100755
--- a/test/emacs
+++ b/test/emacs
@@ -55,6 +55,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 without indentation
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@dottiness.seas.harvard.edu)
+test_emacs (let ((notmuch-show-indent-messages-in-thread nil))
+ (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..00bd006
--- /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 ]
+[ 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 unread)
+Subject: [notmuch] Working with Maildir 

Re: [PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-18 Thread Felix Geller
On Mon, 18 Jul 2011 11:30:53 -0700, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
Non-text part: multipart/signed
 On Wed, 13 Jul 2011 01:46:24 +0200, Felix Geller fgel...@gmail.com wrote:
  Ok, tried again :) 
 
 Hey, Felix.  It looks like the two attachments to your email are
 actually the emails generated by format-patch that should have been sent
 to the list.  Instead of attaching them to other emails, send them to
 the list directly.  You might take a look at the git send-email command,
 which can handle sending them directly for you.

Used git send-email this time, did that turn out correctly? :)


Cheers, Felix



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


Re: date_relative in notmuch-search

2011-07-18 Thread Jameson Graef Rollins
On Fri, 15 Jul 2011 22:04:59 +0100, Patrick Totzke 
patricktot...@googlemail.com wrote:
 Thanks for the tip with git send-mail.

Hi, Patrick.  You might have noticed my response to Felix a little while
ago.  The git format-patch command outputs an email that is meant to be
sent directly to the list, not as an attachment on another message.  The
git send-email command should actually handle sending the mails
(assuming you have a working sendmail-like MTA on your machine.  I would
recommend using git send-email to send patches to the list.

Try resending these two patches as their own emails.

 I didn't really intend to get this patch accepted. It was more that
 I feel bad asking for features all the time and as I'm not so
 comfortable with hacking on the notmuch code I thought I'd ask if one
 could implement it like this.  Anyhow, attached you'll find a patch
 for the test and another for the proposed change. Feel free to discard
 it :)

But this is exactly how features get added!  If you want a feature added
to notmuch, send in a patch for it.  Otherwise you'll have to just wait
until someone else submits a patch to do the same thing, which may or
may not ever happen.  It's a community-run project, developed by those
that use the program (which includes you!).  Since you've already done
the work to figure out what needed to be changed, all you need to do now
is follow the procedure I've outlined to publish the patch to the list,
and eventually, hopefully, Carl will get around to pulling it in to the
notmuch master repo.

jamie.


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


Re: [PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-18 Thread David Bremner
On Mon, 18 Jul 2011 21:04:17 +0200, Felix Geller fgel...@gmail.com wrote:
 
 Used git send-email this time, did that turn out correctly? :)
 

It looks good, except you need some commit messages. Have a look at the
existing commits to get an idea of what the standards are. Particularly
look at cworth's commits and you'll know what he thinks ;)

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


Re: [PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show

2011-07-18 Thread Jameson Graef Rollins
Hi, Felix.  Thanks for resubmitting these patches.  A couple more
comments:

Remember to include a longer log message with you patch.  Beyond just
the single line commit message, the patch should also include a longer
commit message, separated from the first line by a blank line, that
explains what exactly the patch is doing and why.

We've also been trying to get in the habit of sending patches to the
test suite *first*, before the patch that actually implements the
change.  The reason being that we can apply the test-suite patch first,
see that the feature or bug fix you're trying to implement is not
implemented, then apply the fix and see that everything is working
again.

Now is probably a good time to remind everyone to look at the GIT patch
submission guidlines, which notmuch has been trying to follow (also
linked from http://notmuchmail.org):

http://repo.or.cz/w/git.git?a=blob;f=Documentation/SubmittingPatches;hb=HEAD

jamie.


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


[PATCH] Emacs: Toggle message indentation for threads in notmuch-show

2011-07-18 Thread Felix Geller
Yet another attempt at submitting a trivial patch for toggling message
indentation in Emacs' notmuch-show buffers and a test for such
functionality.

Signed-off-by: Felix Geller fgel...@gmail.com

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


[PATCH 1/2] Emacs: Test for turning off indentation of messages in threads

2011-07-18 Thread Felix Geller
In Emacs, notmuch indents messages according to their thread
depth. This leads to unused space and sometimes strange
formatting of paragraphs with long lines. Therefore I would like
to turn it off and have the message thread look more like a
conversation, as on GMail for example.

This commit contains a test for such functionality. It tests
notmuch-show for a message thread without the indentation to
indicate thread depth of messages.
---
 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 53f455a..c65d6d8 100755
--- a/test/emacs
+++ b/test/emacs
@@ -55,6 +55,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 without indentation
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@dottiness.seas.harvard.edu)
+test_emacs (let ((notmuch-show-indent-messages-in-thread nil))
+ (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..00bd006
--- /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 

[PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show

2011-07-18 Thread Felix Geller
Add customizable variable notmuch-show-indent-messages-in-thread
to toggle indentation of messages in a thread in a notmuch-show
buffer.
---
 emacs/notmuch-show.el |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f96743b..48df4c5 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -90,6 +90,11 @@ any given message.
   :group 'notmuch
   :type 'boolean)
 
+(defcustom notmuch-show-indent-messages-in-thread t
+  Should messages be indented according to their depth in a thread?
+  :group 'notmuch
+  :type 'boolean)
+
 (defcustom notmuch-show-indent-multipart nil
   Should the sub-parts of a multipart/* part be indented?
   ;; dme: Not sure which is a good default.
@@ -237,8 +242,9 @@ 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)
-   (notmuch-show-clean-address (plist-get headers :From))
+(when notmuch-show-indent-messages-in-thread
+  (insert (notmuch-show-spaces-n depth)))
+(insert (notmuch-show-clean-address (plist-get headers :From))
 (
date
) (
@@ -733,7 +739,8 @@ current buffer, if possible.
 (setq content-end (point-marker))
 
 ;; Indent according to the depth in the thread.
-(indent-rigidly content-start content-end depth)
+(when notmuch-show-indent-messages-in-thread
+  (indent-rigidly content-start content-end depth))
 
 (setq message-end (point-max-marker))
 
-- 
1.7.6

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