]> git.cworth.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <david@tethera.net>
Sun, 22 Jun 2014 09:53:21 +0000 (06:53 -0300)
committerDavid Bremner <david@tethera.net>
Sun, 22 Jun 2014 09:53:21 +0000 (06:53 -0300)
Austin's termpos patches and Felipe's zlib.pc workaround

Makefile.local
bindings/ruby/defs.h
bindings/ruby/init.c
bindings/ruby/query.c
doc/.gitignore
emacs/notmuch-show.el
emacs/notmuch.el
performance-test/Makefile.local
test/.gitignore
test/test-databases/Makefile.local

index 4f8f4640e8325b25bfa1a60138e4bfe5b365b3cb..3377d55e1d49eef3f80323644c99d01247d70d21 100644 (file)
@@ -21,7 +21,7 @@ endif
 VERSION:=$(shell cat ${srcdir}/version)
 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/-/~/)
+VERSION:=$(shell git describe --abbrev=7 --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
 # Write the file 'version.stamp' in case its contents differ from $(VERSION)
 FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs)
 ifneq ($(FILE_VERSION),$(VERSION))
@@ -262,6 +262,10 @@ clean:
 distclean: clean
        rm -rf $(DISTCLEAN)
 
+.PHONY: dataclean
+dataclean: distclean
+       rm -rf $(DATACLEAN)
+
 notmuch_client_srcs =          \
        command-line-arguments.c\
        debugger.c              \
@@ -331,7 +335,8 @@ install-desktop:
        desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" notmuch.desktop
 
 SRCS  := $(SRCS) $(notmuch_client_srcs)
-CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) version.stamp
+CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules)
+CLEAN := $(CLEAN) version.stamp notmuch-*.tar.gz.tmp
 
 DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config
 
index 5b44585a6ad0cc329d311975a7aa4470a6a890ee..f4901a047923e3340e373b4bff8ded8335996323 100644 (file)
@@ -231,6 +231,9 @@ notmuch_rb_query_search_messages (VALUE self);
 VALUE
 notmuch_rb_query_count_messages (VALUE self);
 
+VALUE
+notmuch_rb_query_count_threads (VALUE self);
+
 /* threads.c */
 VALUE
 notmuch_rb_threads_destroy (VALUE self);
index 663271d4e598ed46d60cec5467d4e82f127d8729..ab3f22df9c8106624b7e42e28bd4a805fa925686 100644 (file)
@@ -271,6 +271,7 @@ Init_notmuch (void)
     rb_define_method (notmuch_rb_cQuery, "search_threads", notmuch_rb_query_search_threads, 0); /* in query.c */
     rb_define_method (notmuch_rb_cQuery, "search_messages", notmuch_rb_query_search_messages, 0); /* in query.c */
     rb_define_method (notmuch_rb_cQuery, "count_messages", notmuch_rb_query_count_messages, 0); /* in query.c */
+    rb_define_method (notmuch_rb_cQuery, "count_threads", notmuch_rb_query_count_threads, 0); /* in query.c */
 
     /*
      * Document-class: Notmuch::Threads
index 1658edee4dac046e7bcc9f95e751ef77f9cee9da..a7dacba3351edfe631934daac37220c34cd9e781 100644 (file)
@@ -182,3 +182,22 @@ notmuch_rb_query_count_messages (VALUE self)
      */
     return UINT2NUM(notmuch_query_count_messages(query));
 }
+
+/*
+ * call-seq: QUERY.count_threads => Fixnum
+ *
+ * Return an estimate of the number of threads matching a search
+ */
+VALUE
+notmuch_rb_query_count_threads (VALUE self)
+{
+    notmuch_query_t *query;
+
+    Data_Get_Notmuch_Query (self, query);
+
+    /* Xapian exceptions are not handled properly.
+     * (function may return 0 after printing a message)
+     * Thus there is nothing we can do here...
+     */
+    return UINT2NUM(notmuch_query_count_threads(query));
+}
index a60fb31e94198450a2e787f7098147a328d72778..f0cbb9c27b243f68a92d19734b7b461bf057c9c3 100644 (file)
@@ -1,2 +1,3 @@
+*.pyc
 docdeps.mk
 _build
index df10d4bad93b3936c00461194774cef4214725c1..10fc872141dc03f6e4bac4a87a20130e9bb7925f 100644 (file)
@@ -180,10 +180,21 @@ each attachment handler is logged in buffers with names beginning
     )
   "List of Mailing List Archives to use when stashing links.
 
-These URIs are concatenated with the current message's
-Message-Id in `notmuch-show-stash-mlarchive-link'."
+This list is used for generating a Mailing List Archive reference
+URI with the current message's Message-Id in
+`notmuch-show-stash-mlarchive-link'.
+
+If the cdr of the alist element is not a function, the cdr is
+expected to contain a URI that is concatenated with the current
+message's Message-Id to create a ML archive reference URI.
+
+If the cdr is a function, the function is called with the
+Message-Id as the argument, and the function is expected to
+return the ML archive reference URI."
   :type '(alist :key-type (string :tag "Name")
-               :value-type (string :tag "URL"))
+               :value-type (choice
+                            (string :tag "URL")
+                            (function :tag "Function returning the URL")))
   :group 'notmuch-show)
 
 (defcustom notmuch-show-stash-mlarchive-link-default "Gmane"
@@ -2055,16 +2066,19 @@ This presumes that the message is available at the selected Mailing List Archive
 If optional argument MLA is non-nil, use the provided key instead of prompting
 the user (see `notmuch-show-stash-mlarchive-link-alist')."
   (interactive)
-  (notmuch-common-do-stash
-   (concat (cdr (assoc
-                (or mla
-                    (let ((completion-ignore-case t))
-                      (completing-read
-                       "Mailing List Archive: "
-                       notmuch-show-stash-mlarchive-link-alist
-                       nil t nil nil notmuch-show-stash-mlarchive-link-default)))
-                notmuch-show-stash-mlarchive-link-alist))
-          (notmuch-show-get-message-id t))))
+  (let ((url (cdr (assoc
+                  (or mla
+                      (let ((completion-ignore-case t))
+                        (completing-read
+                         "Mailing List Archive: "
+                         notmuch-show-stash-mlarchive-link-alist
+                         nil t nil nil
+                         notmuch-show-stash-mlarchive-link-default)))
+                  notmuch-show-stash-mlarchive-link-alist))))
+    (notmuch-common-do-stash
+     (if (functionp url)
+        (funcall url (notmuch-show-get-message-id t))
+       (concat url (notmuch-show-get-message-id t))))))
 
 (defun notmuch-show-stash-mlarchive-link-and-go (&optional mla)
   "Copy an ML Archive URI for the current message to the kill-ring and visit it.
index 1adea9c2c7d6fccf9e863d026745971185c3859b..f6bf9c84d6a9cc4c86c647237d668e5a60784daf 100644 (file)
@@ -649,12 +649,12 @@ of the result."
 Here is an example of how to color search results based on tags.
  (the following text would be placed in your ~/.emacs file):
 
- (setq notmuch-search-line-faces '((\"deleted\" . (:foreground \"red\"
-                                                 :background \"blue\"))
-                                   (\"unread\" . (:foreground \"green\"))))
+ (setq notmuch-search-line-faces '((\"unread\" . (:foreground \"green\"))
+                                   (\"deleted\" . (:foreground \"red\"
+                                                 :background \"blue\"))))
 
-The attributes defined for matching tags are merged, with later
-attributes overriding earlier. A message having both \"deleted\"
+The attributes defined for matching tags are merged, with earlier
+attributes overriding later. A message having both \"deleted\"
 and \"unread\" tags with the above settings would have a green
 foreground and blue background."
   :type '(alist :key-type (string) :value-type (custom-face-edit))
index d97e56d91a121cf2ad650bb16d61fa44926c819a..3469aa3d6aadc67973efc8fd58589059cd875fb5 100644 (file)
@@ -40,4 +40,5 @@ download-corpus:
        wget -O ${TXZFILE} ${DEFAULT_URL}
 
 CLEAN := $(CLEAN) $(dir)/tmp.* $(dir)/log.*
-DISTCLEAN := $(dir)/corpus $(dir)/notmuch.cache.*
+DISTCLEAN := $(DISTCLEAN) $(dir)/corpus $(dir)/notmuch.cache.*
+DATACLEAN := $(DATACLEAN) $(TXZFILE)
index 97e0248787288e5c68039c7b48c5c5859f8c4fbd..4081cee6da18f55ade3aae312a7366169a196b53 100644 (file)
@@ -1,9 +1,11 @@
-test-results
-corpus.mail
-smtp-dummy
-symbol-test
 arg-test
+corpus.mail
+have-compact
+have-man
 hex-xcode
-random-corpus
 parse-time
+random-corpus
+smtp-dummy
+symbol-test
+test-results
 tmp.*
index 0572e784ee7389281320b056fd1da0c262991861..ff333a1d86f75e62a394e7fb1dac3c6c18b457f1 100644 (file)
@@ -11,4 +11,4 @@ test_databases := $(dir)/database-v1.tar.xz
 
 download-test-databases: ${test_databases}
 
-DISTCLEAN := $(DISTCLEAN) ${test_databases}
+DATACLEAN := $(DATACLEAN) ${test_databases}