unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/3] test: `notmuch-show-advance-and-archive' with invisible signature
@ 2011-06-29  1:48 Dmitry Kurochkin
  2011-06-29  1:48 ` [PATCH 2/3] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive Dmitry Kurochkin
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Dmitry Kurochkin @ 2011-06-29  1:48 UTC (permalink / raw)
  To: notmuch

Add Emacs test to check that `notmuch-show-advance-and-archive'
works for the last message in thread with invisible signature.
---

This patch series fixes the bug reported by Sebastien in [1].  I
was able to reproduce it and confirm that the second patch from
this series fixes the problem.  Unfortunately, I can not explain
why it fixes it.  The patch uses a cleaner approach for visible
text search.  But the old approach should work fine as well.
Apparently, it does not work when `invisible' property is not a
single symbol but a list (which was changed in
95ef8da29439f2e79115c36ab4d2a80aef1a1462).  I suspect that it is
an Emacs bug.  I plan to look at it later.

Another issue is that the test does not demonstrate the bug.
Again, I do not really know why.  It passes both before and after
the fix.  Although if I run the test commands by hand I hit the
bug.  I guess it has something to do with emacs daemon mode when
the buffer is not visible.  I hope someone with a better elisp
knowledge can tell what is going on and how to make the test
work.

I believe patches 2 and 3 can be pushed after review even without
a working test.

Regards,
  Dmitry

[1] id:"8739j5rn2d.fsf@cern.ch"

 test/emacs |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/test/emacs b/test/emacs
index e59de47..65a96a5 100755
--- a/test/emacs
+++ b/test/emacs
@@ -347,4 +347,16 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.
 	    (test-visible-output)'
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
 
+test_begin_subtest 'notmuch-show-advance-and-archive with invisible signature'
+message1='id:20091118010116.GC25380@dottiness.seas.harvard.edu'
+message2='id:1258491078-29658-1-git-send-email-dottedmag@dottedmag.net'
+test_emacs "(notmuch-search \"$message1 or $message2\")
+	    (notmuch-test-wait)
+	    (notmuch-search-show-thread)
+	    (notmuch-show-advance-and-archive)
+	    (test-output)"
+test_emacs "(notmuch-show \"$message2\")
+	    (test-output \"EXPECTED\")"
+test_expect_equal_file OUTPUT EXPECTED
+
 test_done
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-29 19:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29  1:48 [PATCH 1/3] test: `notmuch-show-advance-and-archive' with invisible signature Dmitry Kurochkin
2011-06-29  1:48 ` [PATCH 2/3] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive Dmitry Kurochkin
2011-06-29  1:48 ` [PATCH 3/3] emacs: remove no longer used functions from notmuch-show.el Dmitry Kurochkin
2011-06-29  5:00 ` [PATCH] emacs: remove unused `point-invisible-p' function Dmitry Kurochkin
2011-06-29  5:10 ` [PATCH 1/3] test: `notmuch-show-advance-and-archive' with invisible signature Dmitry Kurochkin
2011-06-29  8:25   ` Jani Nikula
2011-06-29 19:57   ` Dmitry Kurochkin

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).