Added messages / total files count difference.
Hi I get this output: $ notmuch new --verbose Found 15559 total files (that's not much mail). Processed 15559 total files in 5m 53s (43 files/sec.). Added 15546 new messages to the database. $ find * -type f | wc 15559 15559 529027 How can I determine which 13 files were dropped. All of those 15559 files should be mails. I tried to check through mail files that have no 'Subject:' header but those were (at least one) indexed. Could it be about duplicate Message-ID: or something ? $ notmuch --version notmuch 0.7-7-g68e8560 Tomi
[PATCH] fix typo in Tags.__len__
On Wed, 3 Aug 2011 22:47:21 +0200, C?dric Cabessa wrote: > Here is a sample that trigger the bug : > """ > import notmuch > db = notmuch.Database() > query = db.create_query("tag:inbox") > > for m in query.search_messages(): > len(m.get_tags()) Thanks for the heads up. This has been fixed now in git. Sebastian -- 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/20110809/05ffb953/attachment.pgp>
xapian exceptions not caught in python bindings?
On Sat, 23 Jul 2011 14:36:02 +0100, Patrick Totzke wrote: > I hope the patch I send is correctly formated, I'm still fumbling with > git send-email and the --in-reply-to option. > Anyhow, forgive my language, of course I didn't mean to be condescending in > any > way by calling these prints garbage! It's just that it's highly unusual and > very > 'non-pythonic' that a module directly prints to stderr instead of raising > exceptions > and if you work directly with a curseslike interface on a terminal these > errormessages litter my screen. Hi, 1) I fixed the lack of throwing a NotmuchError when search_threads() failed. This was a bug. 2) Taking over stderr and capturing it in a temporary file whenever we create a query sounds incredibly hackish to me. It also potentially has side-effects that I cannot even judge (we might be using stderr for something completely different). IMHO, libnotmuch should be modified to not directly print to stderr but to provide a string with a detailed error message together with it's status value. This would be the proper way to deal with it, even if it means a bit more complexity in the notmuch binary. Sebastian -- 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/20110809/725228a6/attachment.pgp>
[PATCH] emacs: Tab completion for notmuch-search and notmuch-search-filter
On Fri, 05 Aug 2011 23:09:23 -0700, Jameson Graef Rollins wrote: > Hey, Daniel. I actually just ran into a little bug with this patch. > After applying this patch, if I try to scroll/search through my > mini-buffer history after a search I get the following error: > > previous-history-element: Wrong type argument: symbolp, "tag:signed" > > I get this error no matter what my search terms were. > > Unfortunately I've always found these error messages confusing, so I'm > not quite sure where it's coming from. I clearly has something to do > with how searches are now stored in the mini-buffer history (symbol > instead of string?). Turns out, I just used `read-from-minibuffer' incorrectly, here's an updated version. -- 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/20110809/c2beae2b/attachment.pgp>
[PATCH] emacs: Tab completion for notmuch-search and notmuch-search-filter
This patch adds completion with in the minibuffer for notmuch-search and notmuch-search-filter. --- emacs/notmuch.el | 37 +++-- 1 files changed, 35 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index f11ec24..bb7565c 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -72,6 +72,9 @@ For example: :type '(alist :key-type (string) :value-type (string)) :group 'notmuch) +(defvar notmuch-query-history nil + "Variable to store minibuffer history for notmuch queries") + (defun notmuch-select-tag-with-completion (prompt &rest search-terms) (let ((tag-list (with-output-to-string @@ -882,6 +885,36 @@ characters as well as `_.+-'. (concat "*notmuch-search-" query "*")) ))) +(defun notmuch-read-query (prompt) + "Read a notmuch-query from the minibuffer with completion. + +PROMPT is the string to prompt with." + (lexical-let + ((completions + (append (list "folder:" "thread:" "id:" "date:" "from:" "to:" + "subject:" "attachment:") + (mapcar (lambda (tag) + (concat "tag:" tag)) + (process-lines "notmuch" "search" "--output=tags" "*") +(let ((keymap (copy-keymap minibuffer-local-map)) + (minibuffer-completion-table + (completion-table-dynamic + (lambda (string) + ;; generate a list of possible completions for the current input + (cond + ;; this ugly regexp is used to get the last word of the input + ;; possibly preceded by a '(' + ((string-match "\\(^\\|.* (?\\)\\([^ ]*\\)$" string) + (mapcar (lambda (compl) + (concat (match-string-no-properties 1 string) compl)) + (all-completions (match-string-no-properties 2 string) +completions))) + (t (list string))) + ;; this was simpler than convincing completing-read to accept spaces: + (define-key keymap (kbd "") 'minibuffer-complete) + (read-from-minibuffer prompt nil keymap nil + 'notmuch-query-history nil nil + ;;;###autoload (defun notmuch-search (query &optional oldest-first target-thread target-line continuation) "Run \"notmuch search\" with the given query string and display results. @@ -893,7 +926,7 @@ The optional parameters are used as follows: current if it appears in the search results. target-line: The line number to move to if the target thread does not appear in the search results." - (interactive "sNotmuch search: ") + (interactive (list (notmuch-read-query "Notmuch search: "))) (let ((buffer (get-buffer-create (notmuch-search-buffer-title query (switch-to-buffer buffer) (notmuch-search-mode) @@ -991,7 +1024,7 @@ search." Runs a new search matching only messages that match both the current search results AND the additional query string provided." - (interactive "sFilter search: ") + (interactive (list (notmuch-read-query "Filter search: "))) (let ((grouped-query (if (string-match-p notmuch-search-disjunctive-regexp query) (concat "( " query " )") query))) -- 1.7.5.4
[PATCH] emacs: Tab completion for notmuch-search and notmuch-search-filter
On Tue, 09 Aug 2011 19:31:44 +0200, Daniel Schoepe wrote: > Turns out, I just used `read-from-minibuffer' incorrectly, here's an > updated version. Hey, Daniel. Thanks so much for the quick fix! This new patch seems to work great. Signed-off-by: Jameson Graef Rollins jamie.
Added messages / total files count difference.
Hi I get this output: $ notmuch new --verbose Found 15559 total files (that's not much mail). Processed 15559 total files in 5m 53s (43 files/sec.). Added 15546 new messages to the database. $ find * -type f | wc 15559 15559 529027 How can I determine which 13 files were dropped. All of those 15559 files should be mails. I tried to check through mail files that have no 'Subject:' header but those were (at least one) indexed. Could it be about duplicate Message-ID: or something ? $ notmuch --version notmuch 0.7-7-g68e8560 Tomi ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] fix typo in Tags.__len__
On Wed, 3 Aug 2011 22:47:21 +0200, Cédric Cabessa wrote: > Here is a sample that trigger the bug : > """ > import notmuch > db = notmuch.Database() > query = db.create_query("tag:inbox") > > for m in query.search_messages(): > len(m.get_tags()) Thanks for the heads up. This has been fixed now in git. Sebastian pgphVs7k50JSH.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: xapian exceptions not caught in python bindings?
On Sat, 23 Jul 2011 14:36:02 +0100, Patrick Totzke wrote: > I hope the patch I send is correctly formated, I'm still fumbling with > git send-email and the --in-reply-to option. > Anyhow, forgive my language, of course I didn't mean to be condescending in > any > way by calling these prints garbage! It's just that it's highly unusual and > very > 'non-pythonic' that a module directly prints to stderr instead of raising > exceptions > and if you work directly with a curseslike interface on a terminal these > errormessages litter my screen. Hi, 1) I fixed the lack of throwing a NotmuchError when search_threads() failed. This was a bug. 2) Taking over stderr and capturing it in a temporary file whenever we create a query sounds incredibly hackish to me. It also potentially has side-effects that I cannot even judge (we might be using stderr for something completely different). IMHO, libnotmuch should be modified to not directly print to stderr but to provide a string with a detailed error message together with it's status value. This would be the proper way to deal with it, even if it means a bit more complexity in the notmuch binary. Sebastian pgpQ4Dup3eKZi.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] emacs: Tab completion for notmuch-search and notmuch-search-filter
On Fri, 05 Aug 2011 23:09:23 -0700, Jameson Graef Rollins wrote: > Hey, Daniel. I actually just ran into a little bug with this patch. > After applying this patch, if I try to scroll/search through my > mini-buffer history after a search I get the following error: > > previous-history-element: Wrong type argument: symbolp, "tag:signed" > > I get this error no matter what my search terms were. > > Unfortunately I've always found these error messages confusing, so I'm > not quite sure where it's coming from. I clearly has something to do > with how searches are now stored in the mini-buffer history (symbol > instead of string?). Turns out, I just used `read-from-minibuffer' incorrectly, here's an updated version. pgpJKsQBe7uJ9.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] emacs: Tab completion for notmuch-search and notmuch-search-filter
This patch adds completion with in the minibuffer for notmuch-search and notmuch-search-filter. --- emacs/notmuch.el | 37 +++-- 1 files changed, 35 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index f11ec24..bb7565c 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -72,6 +72,9 @@ For example: :type '(alist :key-type (string) :value-type (string)) :group 'notmuch) +(defvar notmuch-query-history nil + "Variable to store minibuffer history for notmuch queries") + (defun notmuch-select-tag-with-completion (prompt &rest search-terms) (let ((tag-list (with-output-to-string @@ -882,6 +885,36 @@ characters as well as `_.+-'. (concat "*notmuch-search-" query "*")) ))) +(defun notmuch-read-query (prompt) + "Read a notmuch-query from the minibuffer with completion. + +PROMPT is the string to prompt with." + (lexical-let + ((completions + (append (list "folder:" "thread:" "id:" "date:" "from:" "to:" + "subject:" "attachment:") + (mapcar (lambda (tag) + (concat "tag:" tag)) + (process-lines "notmuch" "search" "--output=tags" "*") +(let ((keymap (copy-keymap minibuffer-local-map)) + (minibuffer-completion-table + (completion-table-dynamic + (lambda (string) + ;; generate a list of possible completions for the current input + (cond + ;; this ugly regexp is used to get the last word of the input + ;; possibly preceded by a '(' + ((string-match "\\(^\\|.* (?\\)\\([^ ]*\\)$" string) + (mapcar (lambda (compl) + (concat (match-string-no-properties 1 string) compl)) + (all-completions (match-string-no-properties 2 string) +completions))) + (t (list string))) + ;; this was simpler than convincing completing-read to accept spaces: + (define-key keymap (kbd "") 'minibuffer-complete) + (read-from-minibuffer prompt nil keymap nil + 'notmuch-query-history nil nil + ;;;###autoload (defun notmuch-search (query &optional oldest-first target-thread target-line continuation) "Run \"notmuch search\" with the given query string and display results. @@ -893,7 +926,7 @@ The optional parameters are used as follows: current if it appears in the search results. target-line: The line number to move to if the target thread does not appear in the search results." - (interactive "sNotmuch search: ") + (interactive (list (notmuch-read-query "Notmuch search: "))) (let ((buffer (get-buffer-create (notmuch-search-buffer-title query (switch-to-buffer buffer) (notmuch-search-mode) @@ -991,7 +1024,7 @@ search." Runs a new search matching only messages that match both the current search results AND the additional query string provided." - (interactive "sFilter search: ") + (interactive (list (notmuch-read-query "Filter search: "))) (let ((grouped-query (if (string-match-p notmuch-search-disjunctive-regexp query) (concat "( " query " )") query))) -- 1.7.5.4 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] emacs: Tab completion for notmuch-search and notmuch-search-filter
On Tue, 09 Aug 2011 19:31:44 +0200, Daniel Schoepe wrote: > Turns out, I just used `read-from-minibuffer' incorrectly, here's an > updated version. Hey, Daniel. Thanks so much for the quick fix! This new patch seems to work great. Signed-off-by: Jameson Graef Rollins jamie. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
not much reply multipart/mixed
Hello, When I reply to a given email, instead of quoting the original text, I see: === cut === On Tue, 9 Aug 2011 01:39:30 -0600, tivoli_supp...@ecurep.ibm.com wrote: Non-text part: multipart/mixed Non-text part: text/html === cut === This is with the latest git master version. Thanks -- Brian May ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch