From: David Bremner Date: Sun, 27 Nov 2011 05:15:20 +0000 (-0800) Subject: Merge branch 'release' X-Git-Tag: 0.11_rc1~96 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=ac8576de63b4383aef597e1db5af939e3b46594c;hp=398b94bb394e2be0633175b58b47451bc3ba98ca Merge branch 'release' --- diff --git a/Makefile.local b/Makefile.local index 8b42136a..c94402b1 100644 --- a/Makefile.local +++ b/Makefile.local @@ -12,16 +12,18 @@ PACKAGE=notmuch IS_GIT=$(shell if [ -d .git ] ; then echo yes ; else echo no; fi) +ifeq ($(IS_GIT),yes) +DATE:=$(shell git log --date=short -1 --pretty=format:%cd) +else +DATE:=$(shell date +%F) +endif + VERSION:=$(shell cat ${srcdir}/version) -ifneq ($(MAKECMDGOALS),release) -ifneq ($(MAKECMDGOALS),release-message) -ifneq ($(MAKECMDGOALS),pre-release) +ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),) ifeq ($(IS_GIT),yes) VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/) endif endif -endif -endif UPSTREAM_TAG=$(subst ~,_,$(VERSION)) DEB_TAG=debian/$(UPSTREAM_TAG)-1 @@ -91,6 +93,12 @@ $(GPG_FILE): $(SHA1_FILE) .PHONY: dist dist: $(TAR_FILE) +.PHONY: update-versions + +update-versions: + sed -i "s/^.TH NOTMUCH 1.*$$/.TH NOTMUCH 1 ${DATE} \"Notmuch ${VERSION}\"/" notmuch.1 + sed -i "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" $(PV_FILE) + # We invoke make recursively only to force ordering of our phony # targets in the case of parallel invocation of make (-j). # @@ -179,7 +187,7 @@ release-message: verify-source-tree-and-version: verify-no-dirty-code .PHONY: verify-no-dirty-code -verify-no-dirty-code: verify-version-debian verify-version-python +verify-no-dirty-code: verify-version-debian verify-version-python verify-version-manpage ifeq ($(IS_GIT),yes) @printf "Checking that source tree is clean..." ifneq ($(shell git ls-files -m),) @@ -199,28 +207,33 @@ endif .PHONY: verify-version-debian verify-version-debian: verify-version-components @echo -n "Checking that Debian package version is $(VERSION)-1..." - @if [ "$(VERSION)-1" != $$(dpkg-parsechangelog | grep ^Version | awk '{print $$2}') ] ; then \ + @[ "$(VERSION)-1" = $$(sed '1{ s/).*//; s/.*(//; q; }' debian/changelog) ] || \ (echo "No." && \ - echo "Please edit version and debian/changelog to have consistent versions." && false) \ - fi + echo "Please edit version and debian/changelog to have consistent versions." && false) @echo "Good." .PHONY: verify-version-python verify-version-python: verify-version-components @echo -n "Checking that python bindings version is $(VERSION)..." - @if [ "$(VERSION)" != $$(python -c "execfile('$(PV_FILE)'); print __VERSION__") ] ; then \ + @[ "$(VERSION)" = $$(python -c "execfile('$(PV_FILE)'); print __VERSION__") ] || \ + (echo "No." && \ + echo "Please edit version and $(PV_FILE) to have consistent versions." && false) + @echo "Good." + +.PHONY: verify-version-manpage +verify-version-manpage: verify-version-components + @echo -n "Checking that manual page version is $(VERSION)..." + @[ "$(VERSION)" = $$(sed -n '/^[.]TH NOTMUCH 1/{s/.*"Notmuch //;s/".*//p;}' notmuch.1) ] || \ (echo "No." && \ - echo "Please edit version and $(PV_FILE) to have consistent versions." && false) \ - fi + echo "Please edit version and notmuch.1 to have consistent versions." && false) @echo "Good." .PHONY: verify-version-components verify-version-components: @echo -n "Checking that $(VERSION) consists only of digits and periods..." - @if echo $(VERSION) | grep -q -v -x '[0-9.]*'; then \ + @echo $(VERSION) | grep -q -x '^[0-9.]*$$' || \ (echo "No." && \ - echo "Please follow the instructions in RELEASING to choose a version" && false) \ - else :; fi + echo "Please follow the instructions in RELEASING to choose a version" && false) @echo "Good." .PHONY: verify-newer diff --git a/RELEASING b/RELEASING index e3e0cefe..88dab04e 100644 --- a/RELEASING +++ b/RELEASING @@ -62,11 +62,11 @@ repository. From here, there are just a few steps to release: be "1.0.1" and a subsequent bug-fix release would be "1.0.2" etc. - Update bindings/python/notmuch/version.py to match version. + When you are happy with the file 'version', run - Update the version in notmuch.1 to match version. + make update-versions - XXX: Probably these last two steps should be (semi-)automated. + to propagate the version to the other places needed. Commit these changes. diff --git a/debian/control b/debian/control index 3252f32c..f6f415ed 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: python-all (>= 2.6.6-3~), emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~), gdb, - dtach + dtach (>= 0.8) Standards-Version: 3.9.2 Homepage: http://notmuchmail.org/ Vcs-Git: git://notmuchmail.org/git/notmuch diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 1a76c30a..0582cae7 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -42,6 +42,26 @@ :type 'boolean :group 'notmuch) +(defun notmuch-sort-saved-searches (alist) + "Generate an alphabetically sorted saved searches alist." + (sort alist (lambda (a b) (string< (car a) (car b))))) + +(defcustom notmuch-saved-search-sort-function nil + "Function used to sort the saved searches for the notmuch-hello view. + +This variable controls how saved searches should be sorted. No +sorting (nil) displays the saved searches in the order they are +stored in `notmuch-saved-searches'. Sort alphabetically sorts the +saved searches in alphabetical order. Custom sort function should +be a function or a lambda expression that takes the saved +searches alist as a parameter, and returns a new saved searches +alist to be used." + :type '(choice (const :tag "No sorting" nil) + (const :tag "Sort alphabetically" notmuch-sort-saved-searches) + (function :tag "Custom sort function" + :value notmuch-sort-saved-searches)) + :group 'notmuch) + (defvar notmuch-hello-indent 4 "How much to indent non-headers.") @@ -168,8 +188,8 @@ Typically \",\" in the US and UK and \".\" in Europe." collect elem)) ;; Add the new one. (customize-save-variable 'notmuch-saved-searches - (push (cons name search) - notmuch-saved-searches)) + (add-to-list 'notmuch-saved-searches + (cons name search) t)) (message "Saved '%s' as '%s'." search name) (notmuch-hello-update))) @@ -440,6 +460,10 @@ Complete list of currently available key bindings: (widest (max saved-widest alltags-widest))) (when saved-alist + ;; Sort saved searches if required. + (when notmuch-saved-search-sort-function + (setq saved-alist + (funcall notmuch-saved-search-sort-function saved-alist))) (widget-insert "\nSaved searches: ") (widget-create 'push-button :notify (lambda (&rest ignore) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index d5c95d80..d7fbbca9 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)) @@ -843,6 +853,8 @@ buffer." (inhibit-read-only t)) (switch-to-buffer buffer) (notmuch-show-mode) + ;; Don't track undo information for this buffer + (set 'buffer-undo-list t) (setq notmuch-show-thread-id thread-id) (setq notmuch-show-parent-buffer parent-buffer) @@ -1135,26 +1147,18 @@ All currently available key bindings: ;; Commands typically bound to keys. -(defun notmuch-show-advance-and-archive () - "Advance through thread and archive. - -This command is intended to be one of the simplest ways to -process a thread of email. It does the following: +(defun notmuch-show-advance () + "Advance through thread. If the current message in the thread is not yet fully visible, scroll by a near screenful to read more of the message. Otherwise, (the end of the current message is already within the -current window), advance to the next open message. - -Finally, if there is no further message to advance to, and this -last message is already read, then archive the entire current -thread, (remove the \"inbox\" tag from each message). Also kill -this buffer, and display the next thread from the search from -which this thread was originally shown." +current window), advance to the next open message." (interactive) (let* ((end-of-this-message (notmuch-show-message-bottom)) - (visible-end-of-this-message (1- end-of-this-message))) + (visible-end-of-this-message (1- end-of-this-message)) + (ret nil)) (while (invisible-p visible-end-of-this-message) (setq visible-end-of-this-message (previous-single-char-property-change visible-end-of-this-message @@ -1173,8 +1177,24 @@ which this thread was originally shown." (notmuch-show-next-open-message)) (t - ;; This is the last message - archive the thread. - (notmuch-show-archive-thread))))) + ;; This is the last message - change the return value + (setq ret t))) + ret)) + +(defun notmuch-show-advance-and-archive () + "Advance through thread and archive. + +This command is intended to be one of the simplest ways to +process a thread of email. It works exactly like +notmuch-show-advance, in that it scrolls through messages in a +show buffer, except that when it gets to the end of the buffer it +archives the entire current thread, (remove the \"inbox\" tag +from each message), kills the buffer, and displays the next +thread from the search from which this thread was originally +shown." + (interactive) + (if (notmuch-show-advance) + (notmuch-show-archive-thread))) (defun notmuch-show-rewind () "Backup through the thread, (reverse scrolling compared to \\[notmuch-show-advance-and-archive]). diff --git a/emacs/notmuch.el b/emacs/notmuch.el index c1827cc2..f15a75b1 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -805,12 +805,12 @@ non-authors is found, assume that all of the authors match." (goto-char (point-max)) (if (/= (match-beginning 1) line) (insert (concat "Error: Unexpected output from notmuch search:\n" (substring string line (match-beginning 1)) "\n"))) - (let ((beg (point-marker))) + (let ((beg (point))) (notmuch-search-show-result date count authors subject tags) - (notmuch-search-color-line beg (point-marker) tag-list) - (put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id) - (put-text-property beg (point-marker) 'notmuch-search-authors authors) - (put-text-property beg (point-marker) 'notmuch-search-subject subject) + (notmuch-search-color-line beg (point) tag-list) + (put-text-property beg (point) 'notmuch-search-thread-id thread-id) + (put-text-property beg (point) 'notmuch-search-authors authors) + (put-text-property beg (point) 'notmuch-search-subject subject) (if (string= thread-id notmuch-search-target-thread) (progn (set 'found-target beg) @@ -920,6 +920,8 @@ The optional parameters are used as follows: (let ((buffer (get-buffer-create (notmuch-search-buffer-title query)))) (switch-to-buffer buffer) (notmuch-search-mode) + ;; Don't track undo information for this buffer + (set 'buffer-undo-list t) (set 'notmuch-search-query-string query) (set 'notmuch-search-oldest-first oldest-first) (set 'notmuch-search-target-thread target-thread) diff --git a/lib/Makefile.local b/lib/Makefile.local index 57dca702..54c4dea4 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -30,7 +30,7 @@ LIBRARY_SUFFIX = so LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX) SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR) LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE) -LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME) +LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME) -Wl,--no-undefined ifeq ($(LIBDIR_IN_LDCONFIG),1) ifeq ($(DESTDIR),) LIBRARY_INSTALL_POST_COMMAND=ldconfig diff --git a/lib/message.cc b/lib/message.cc index ca7fbf21..00754254 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -49,16 +49,16 @@ struct visible _notmuch_message { struct maildir_flag_tag { char flag; const char *tag; - bool inverse; + notmuch_bool_t inverse; }; /* ASCII ordered table of Maildir flags and associated tags */ static struct maildir_flag_tag flag2tag[] = { - { 'D', "draft", false}, - { 'F', "flagged", false}, - { 'P', "passed", false}, - { 'R', "replied", false}, - { 'S', "unread", true } + { 'D', "draft", FALSE}, + { 'F', "flagged", FALSE}, + { 'P', "passed", FALSE}, + { 'R', "replied", FALSE}, + { 'S', "unread", TRUE } }; /* We end up having to call the destructor explicitly because we had @@ -1217,8 +1217,6 @@ _new_maildir_filename (void *ctx, if (info == NULL) { info = filename + strlen(filename); } else { - flags = info + 3; - /* Loop through existing flags in filename. */ for (flags = info + 3, last_flag = 0; *flags; diff --git a/test/Makefile.local b/test/Makefile.local index 8eb04330..9b3308a1 100644 --- a/test/Makefile.local +++ b/test/Makefile.local @@ -17,4 +17,4 @@ test: all $(dir)/smtp-dummy check: test -CLEAN := $(CLEAN) $(dir)/smtp-dummy +CLEAN := $(CLEAN) $(dir)/smtp-dummy $(dir)/smtp-dummy.o diff --git a/test/basic b/test/basic index 38db2baf..f258d1f9 100755 --- a/test/basic +++ b/test/basic @@ -51,17 +51,11 @@ test_expect_code 2 'failure to clean up causes the test to fail' ' # Ensure that all tests are being run test_begin_subtest 'Ensure that all available tests will be run by notmuch-test' -eval $(sed -n -e '/^TESTS="$/,/^"$/p' notmuch-test $TEST_DIRECTORY/notmuch-test) +eval $(sed -n -e '/^TESTS="$/,/^"$/p' $TEST_DIRECTORY/notmuch-test) tests_in_suite=$(for i in $TESTS; do echo $i; done | sort) -available=$(ls -1 $TEST_DIRECTORY/ | \ - sed -r -e "/^(aggregate-results.sh|Makefile|Makefile.local|notmuch-test)/d" \ - -e "/^(README|test-lib.sh|test-lib.el|test-results|tmp.*|valgrind|corpus*)/d" \ - -e "/^(emacs.expected-output|smtp-dummy|smtp-dummy.c|test-verbose|symbol-test.cc)/d" \ - -e "/^(test.expected-output|.*~)/d" \ - -e "/^(gnupg-secret-key.asc)/d" \ - -e "/^(gnupg-secret-key.NOTE)/d" \ - -e "/^(atomicity.gdb)/d" \ - | sort) +available=$(find "$TEST_DIRECTORY" -maxdepth 1 -type f -executable -printf '%f\n' | \ + sed -r -e "/^(aggregate-results.sh|notmuch-test|smtp-dummy|test-verbose)$/d" | \ + sort) test_expect_equal "$tests_in_suite" "$available" EXPECTED=$TEST_DIRECTORY/test.expected-output diff --git a/test/emacs b/test/emacs index 75a0a744..198c27b0 100755 --- a/test/emacs +++ b/test/emacs @@ -50,6 +50,27 @@ 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@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 "Basic notmuch-show view in emacs without indentation" +maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@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 "Basic notmuch-show view in emacs with fourfold indentation" +maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@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\\\" \"" @@ -369,8 +390,18 @@ test_emacs '(notmuch-show "id:\"bought\"") (rotate-yank-pointer 1)) (reverse-region (point-min) (point-max)) (test-output)' -sed -i -e 's/^.*tmp.emacs\/mail.*$/FILENAME/' OUTPUT -test_expect_equal_file OUTPUT $EXPECTED/emacs-stashing +cat <EXPECTED +Sat, 01 Jan 2000 12:00:00 -0000 +Some One +Some One Else +Notmuch +Stash my stashables +id:"bought" +bought +inbox,stashtest +${gen_msg_filename} +EOF +test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "Stashing in notmuch-search" test_emacs '(notmuch-search "id:\"bought\"") diff --git a/test/emacs.expected-output/emacs-stashing b/test/emacs.expected-output/emacs-stashing deleted file mode 100644 index 49235947..00000000 --- a/test/emacs.expected-output/emacs-stashing +++ /dev/null @@ -1,9 +0,0 @@ -Sat, 01 Jan 2000 12:00:00 -0000 -Some One -Some One Else -Notmuch -Stash my stashables -id:"bought" -bought -inbox,stashtest -FILENAME 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 00000000..41e2aaa3 --- /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@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@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@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@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 (2009-11-17) (inbox signed unread) + Subject: Re: [notmuch] Working with Maildir storage? + To: Mikhail Gusarov + 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 + 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 (2009-11-17) (inbox unread) + Subject: [notmuch] Working with Maildir storage? + To: notmuch@notmuchmail.org + Date: Wed, 18 Nov 2009 02:50:48 +0600 + + + Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu did gyre and gimble: + + LK> Is the list archived anywhere? The obvious archives + LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I + LK> think I subscribed too late to get the patch (I only just saw the + LK> discussion about it). + + LK> It doesn't look like the patch is in git yet. + + Just has been pushed + + [ 10-line signature. Click/Enter to show. ] + -- + http://fossarchy.blogspot.com/ + -------------- next part -------------- + A non-text attachment was scrubbed... + Name: not available + Type: application/pgp-signature + Size: 834 bytes + Desc: not available + URL: + + Keith Packard (2009-11-17) (inbox unread) + Subject: [notmuch] Working with Maildir storage? + To: notmuch@notmuchmail.org + Date: Tue, 17 Nov 2009 13:24:13 -0800 + + On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman wrote: + > > See the patch just posted here. + + I've also pushed a slightly more complicated (and complete) fix to my + private notmuch repository + + git://keithp.com/git/notmuch + + > Is the list archived anywhere? + + Oops. Looks like Carl's mail server is broken. He's traveling to + Barcelona today and so it won't get fixed for a while. + + Thanks to everyone for trying out notmuch! + + -keith + + Lars Kellogg-Stedman (2009-11-18) (inbox signed unread) + Subject: Re: [notmuch] Working with Maildir storage? + To: Keith Packard + Cc: notmuch@notmuchmail.org + Date: Tue, 17 Nov 2009 19:50:40 -0500 + + [ multipart/mixed ] + [ multipart/signed ] + [ text/plain ] + > I've also pushed a slightly more complicated (and complete) fix to my + > private notmuch repository + + The version of lib/messages.cc in your repo doesn't build because it's + missing "#include " (for the uint32_t on line 466). + + [ 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@notmuchmail.org + http://notmuchmail.org/mailman/listinfo/notmuch + Carl Worth (2009-11-18) (inbox unread) + Subject: [notmuch] Working with Maildir storage? + To: notmuch@notmuchmail.org + Date: Wed, 18 Nov 2009 02:08:10 -0800 + + On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman wrote: + > 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). + + Welcome, Lars! + + I hadn't even seen that Keith's blog post had been picked up by lwn.net. + That's very interesting. So, thanks for coming and trying out notmuch. + + > Error opening + > /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: + > Too many open files + + Sadly, the lwn article coincided with me having just introduced this + bug, and then getting on a Trans-Atlantic flight. So I fixed the bug + fairly quickly, but there was quite a bit of latency before I could push + the fix out. It should be fixed now. + + > I'm curious if this is expected behavior (i.e., notmuch does not work + > with Maildir) or if something else is going on. + + Notmuch works just fine with maildir---it's one of the things that it + likes the best. + + Happy hacking, + + -Carl + 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 00000000..fa2108ef --- /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@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@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@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@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 (2009-11-17) (inbox signed unread) +Subject: Re: [notmuch] Working with Maildir storage? +To: Mikhail Gusarov +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 +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 (2009-11-17) (inbox unread) +Subject: [notmuch] Working with Maildir storage? +To: notmuch@notmuchmail.org +Date: Wed, 18 Nov 2009 02:50:48 +0600 + + +Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu did gyre and gimble: + + LK> Is the list archived anywhere? The obvious archives + LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I + LK> think I subscribed too late to get the patch (I only just saw the + LK> discussion about it). + + LK> It doesn't look like the patch is in git yet. + +Just has been pushed + +[ 10-line signature. Click/Enter to show. ] +-- +http://fossarchy.blogspot.com/ +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: not available +Type: application/pgp-signature +Size: 834 bytes +Desc: not available +URL: + +Keith Packard (2009-11-17) (inbox unread) +Subject: [notmuch] Working with Maildir storage? +To: notmuch@notmuchmail.org +Date: Tue, 17 Nov 2009 13:24:13 -0800 + +On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman wrote: +> > See the patch just posted here. + +I've also pushed a slightly more complicated (and complete) fix to my +private notmuch repository + +git://keithp.com/git/notmuch + +> Is the list archived anywhere? + +Oops. Looks like Carl's mail server is broken. He's traveling to +Barcelona today and so it won't get fixed for a while. + +Thanks to everyone for trying out notmuch! + +-keith + +Lars Kellogg-Stedman (2009-11-18) (inbox signed unread) +Subject: Re: [notmuch] Working with Maildir storage? +To: Keith Packard +Cc: notmuch@notmuchmail.org +Date: Tue, 17 Nov 2009 19:50:40 -0500 + +[ multipart/mixed ] +[ multipart/signed ] +[ text/plain ] +> I've also pushed a slightly more complicated (and complete) fix to my +> private notmuch repository + +The version of lib/messages.cc in your repo doesn't build because it's +missing "#include " (for the uint32_t on line 466). + +[ 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@notmuchmail.org +http://notmuchmail.org/mailman/listinfo/notmuch +Carl Worth (2009-11-18) (inbox unread) +Subject: [notmuch] Working with Maildir storage? +To: notmuch@notmuchmail.org +Date: Wed, 18 Nov 2009 02:08:10 -0800 + +On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman wrote: +> 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). + +Welcome, Lars! + +I hadn't even seen that Keith's blog post had been picked up by lwn.net. +That's very interesting. So, thanks for coming and trying out notmuch. + +> Error opening +> /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: +> Too many open files + +Sadly, the lwn article coincided with me having just introduced this +bug, and then getting on a Trans-Atlantic flight. So I fixed the bug +fairly quickly, but there was quite a bit of latency before I could push +the fix out. It should be fixed now. + +> I'm curious if this is expected behavior (i.e., notmuch does not work +> with Maildir) or if something else is going on. + +Notmuch works just fine with maildir---it's one of the things that it +likes the best. + +Happy hacking, + +-Carl + diff --git a/test/notmuch-test b/test/notmuch-test index 5aced5ce..ba28ff39 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -61,10 +61,13 @@ else TEST_TIMEOUT_CMD="" fi +trap 'e=$?; kill $!; exit $e' HUP INT TERM # Run the tests for test in $TESTS; do - $TEST_TIMEOUT_CMD ./$test "$@" + $TEST_TIMEOUT_CMD ./$test "$@" & + wait $! done +trap - HUP INT TERM # Report results ./aggregate-results.sh test-results/* diff --git a/test/raw b/test/raw index b7e265a8..99d3a3bf 100755 --- a/test/raw +++ b/test/raw @@ -1,4 +1,4 @@ -#!/usr//bin/env bash +#!/usr/bin/env bash test_description='notmuch show --format=raw' . ./test-lib.sh diff --git a/test/symbol-test.cc b/test/symbol-test.cc index 1de06eae..1548ca40 100644 --- a/test/symbol-test.cc +++ b/test/symbol-test.cc @@ -1,17 +1,17 @@ #include #include #include -main (int argc, char **argv){ - notmuch_database_t *notmuch - = notmuch_database_open ("fakedb", - NOTMUCH_DATABASE_MODE_READ_ONLY); - try{ - (void)new Xapian::WritableDatabase ("./nonexistant", Xapian::DB_OPEN); +int main() { + (void) notmuch_database_open("fakedb", NOTMUCH_DATABASE_MODE_READ_ONLY); + + try { + (void) new Xapian::WritableDatabase("./nonexistant", Xapian::DB_OPEN); } catch (const Xapian::Error &error) { - printf("caught %s\n",error.get_msg().c_str()); + printf("caught %s\n", error.get_msg().c_str()); return 0; } + return 1; } diff --git a/test/test-lib.sh b/test/test-lib.sh old mode 100755 new mode 100644 index cf309f94..93867b03 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -398,6 +398,8 @@ emacs_deliver_message () (insert \"${body}\") $@ (message-send-and-exit))" + # opportunistically quit smtp-dummy in case above fails. + { echo QUIT > /dev/tcp/localhost/25025; } 2>/dev/null wait ${smtp_dummy_pid} notmuch new >/dev/null } diff --git a/util/Makefile.local b/util/Makefile.local index 2ff42b3d..03408995 100644 --- a/util/Makefile.local +++ b/util/Makefile.local @@ -9,3 +9,5 @@ libutil_modules := $(libutil_c_srcs:.c=.o) $(dir)/libutil.a: $(libutil_modules) $(call quiet,AR) rcs $@ $^ + +CLEAN := $(CLEAN) $(dir)/xutil.o $(dir)/error_util.o $(dir)/libutil.a