[PATCH] debian: build notmuch-vim again

2013-06-02 Thread David Bremner
Felipe Contreras  writes:

> Signed-off-by: Felipe Contreras 
> ---
>  debian/control | 15 +++
>  1 file changed, 15 insertions(+)
>

Hi Felipe;

What about the bugs from the old plugin, are they fixed by the new one?

 http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=notmuch-vim;dist=unstable

d




[PATCH] contrib: pick: bugfix: use notmuch-show-mark-read-tags instead of unread

2013-06-02 Thread David Bremner
Mark Walters  writes:

> Previously pick removed the unread tag from its tag display: since the
> tag change is now customisable use the customised variable.
>
> This only affected the tags displayed, not the tags in the database as
> notmuch-show (in the view pane) did the actual tag changes.
> ---

Pushed, 

d


[PATCH] contrib: pick: bugfix. use notmuch-show-only-matching-messages rather than prefix

2013-06-02 Thread David Bremner
Mark Walters  writes:

> Previously pick set a prefix argument prior to calling show in the
> message pane to tell show to only show matching messages. This sets
> notmuch-show-only-matching-messages instead which is much cleaner and
> will work even if the user has configured show to default to showing
> only matching messages.

pushed.

d


[PATCH 3/3] build: pass CPPFLAGS to C and C++ compilers

2013-06-02 Thread David Bremner
david at tethera.net writes:

> From: David Bremner 
>
> This is used in particular by hardening flags.

I pushed all three. I assume someone will let me know if I broke the
build system for them...

d


[PATCH 4/4] debian: update .gitignore

2013-06-02 Thread David Bremner
david at tethera.net writes:

> From: David Bremner 
>
> Several packages have been added or renamed, but their build detritus
> not yet ignored.

Pushed the non-bindings patches in the series. I'll wait for comment
from go/python people on the other two.

d


[PATCH] emacs: remove hardcoded defaults values from docstrings

2013-06-02 Thread David Bremner
Mark Walters  writes:

> both of these LGTM +1.
>
> Note there are still some (an?) occurrences of this: eg
> notmuch-search-archive-thread, and there is one in pick. But these might
> as well go in anyway.

pushed both,

d


[PATCH] emacs: replace setq + let with let*

2013-06-02 Thread David Bremner
Mark Walters  writes:

>> -(setq search (notmuch-hello-trim search))
>> -(let ((history-delete-duplicates t))
>> +(let* ((search (notmuch-hello-trim search))
>> +   (history-delete-duplicates t))
>>(add-to-history 'notmuch-search-history search)))
>>(notmuch-search search notmuch-search-oldest-first nil nil
>
> These look good to me except I don't see why the above is a let* not a
> let?

I ended up dropping this hunk because I realized it introduced a bug;
the side-effect of the setq is needed outside the unless.

pushed the two patches (as amended) in this thread.

d





[PATCH] NEWS: key bindings for next/previous thread

2013-06-02 Thread David Bremner
Jani Nikula  writes:

> ---
>  NEWS |5 +
>  1 file changed, 5 insertions(+)

pushed,

d


[PATCH] NEWS: key bindings for next/previous thread

2013-06-02 Thread Jani Nikula
---
 NEWS |5 +
 1 file changed, 5 insertions(+)

diff --git a/NEWS b/NEWS
index 9237e5a..6f09cdb 100644
--- a/NEWS
+++ b/NEWS
@@ -99,6 +99,11 @@ No Emacs 22 support
   period of time. After being incomplete for roughly 2 years the code
   in question was now removed from this release.

+Key bindings for next/previous thread
+
+  Show view has new key bindings M-n and M-p to move to the next and
+  previous thread in the search results.
+
 Notmuch 0.15.2 (2013-02-17)
 ===

-- 
1.7.10.4



[PATCH] debian: build notmuch-vim again

2013-06-02 Thread Felipe Contreras
On Sun, Jun 2, 2013 at 8:14 PM, David Bremner  wrote:
> Felipe Contreras  writes:
>
>> Signed-off-by: Felipe Contreras 
>> ---
>>  debian/control | 15 +++
>>  1 file changed, 15 insertions(+)
>>
>
> Hi Felipe;
>
> What about the bugs from the old plugin, are they fixed by the new one?
>
>  
> http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=notmuch-vim;dist=unstable

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616692

Yeah.

We don't rely on any of that stuff.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636707

Yeah.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636709

That's a trivial enhancement, not really a bug.

-- 
Felipe Contreras


the future of notmuch-vim?

2013-06-02 Thread Felipe Contreras
On Fri, Apr 5, 2013 at 5:30 AM, Charlie Allom  wrote:
> If Felipe is interested in maintaining the Vim plugin, I vote it should
> be replaced with his Ruby version.

I've pushed the new vim plugin to the 'master' branch.

Cheers.

-- 
Felipe Contreras


[PATCH] debian: build notmuch-vim again

2013-06-02 Thread Felipe Contreras
Signed-off-by: Felipe Contreras 
---
 debian/control | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/debian/control b/debian/control
index 08071be..273a5a7 100644
--- a/debian/control
+++ b/debian/control
@@ -120,6 +120,21 @@ Description: thread-based email index, search and tagging 
(emacs interface)
  This package provides an emacs based mail user agent based on
  notmuch.

+Package: notmuch-vim
+Architecture: all
+Section: mail
+Breaks: notmuch (<<0.6~254~)
+Replaces: notmuch (<<0.6~254~)
+Depends: ${misc:Depends}, notmuch, vim-addon-manager
+Description: thread-based email index, search and tagging (vim interface)
+ Notmuch is a system for indexing, searching, reading, and tagging
+ large collections of email messages in maildir or mh format. It uses
+ the Xapian library to provide fast, full-text search with a very
+ convenient search syntax.
+ .
+ This package provides a vim based mail user agent based on
+ notmuch.
+
 Package: notmuch-mutt
 Architecture: all
 Depends:
-- 
1.8.3.358.g5a91d05



[PATCH] emacs: remove hardcoded defaults values from docstrings

2013-06-02 Thread Mark Walters

both of these LGTM +1.

Note there are still some (an?) occurrences of this: eg
notmuch-search-archive-thread, and there is one in pick. But these might
as well go in anyway.

Best wishes

Mark

 On Sun, 02 Jun 2013, david at tethera.net wrote:
> From: David Bremner 
>
> These functions refer to default values of variables, but it seems
> less confusing and less likely to get out of date to just allow the
> user to follow the help cross-reference links.
> ---
>  emacs/notmuch-show.el | 14 ++
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> another proposed change from our notmuch-pick discussions.
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 613e666..600e802 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1835,10 +1835,9 @@ search results instead."
>"Archive each message in thread.
>  
>  Archive each message currently shown by applying the tag changes
> -in `notmuch-archive-tags' to each (remove the \"inbox\" tag by
> -default). If a prefix argument is given, the messages will be
> -\"unarchived\", i.e. the tag changes in `notmuch-archive-tags'
> -will be reversed.
> +in `notmuch-archive-tags' to each. If a prefix argument is given,
> +the messages will be \"unarchived\", i.e. the tag changes in
> +`notmuch-archive-tags' will be reversed.
>  
>  Note: This command is safe from any race condition of new messages
>  being delivered to the same thread. It does not archive the
> @@ -1865,10 +1864,9 @@ buffer."
>"Archive the current message.
>  
>  Archive the current message by applying the tag changes in
> -`notmuch-archive-tags' to it (remove the \"inbox\" tag by
> -default). If a prefix argument is given, the message will be
> -\"unarchived\", i.e. the tag changes in `notmuch-archive-tags'
> -will be reversed."
> +`notmuch-archive-tags' to it. If a prefix argument is given, the
> +message will be \"unarchived\", i.e. the tag changes in
> +`notmuch-archive-tags' will be reversed."
>(interactive "P")
>(when notmuch-archive-tags
>  (apply 'notmuch-show-tag-message
> -- 
> 1.8.2.rc2
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: replace (funcall 'foo ...) with (foo ...)

2013-06-02 Thread Mark Walters

This looks good to me +1

Mark

On Sun, 02 Jun 2013, david at tethera.net wrote:
> From: David Bremner 
>
> I can't see any benefit to the funcall, and it looks like the result
> of cut-and-paste from some code that actually used a variable for the
> function to call.
> ---
>
> Mark and I were discussing some style issues in the context of pick,
> and it seems to me that some of the elisp style in the current code
> could be improved. I don't claim to be an elisp style expert by any
> stretch of the imagination. It would be great if some experts could
> add a section to devel/STYLE about elisp.
>
>
>  emacs/notmuch-message.el | 2 +-
>  emacs/notmuch-show.el| 6 +++---
>  emacs/notmuch.el | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el
> index 4dc4883..914bdd1 100644
> --- a/emacs/notmuch-message.el
> +++ b/emacs/notmuch-message.el
> @@ -40,7 +40,7 @@ the \"inbox\" and \"todo\" tags, you would set:
>;; get the in-reply-to header and parse it for the message id.
>(let ((rep (mail-header-parse-addresses (message-field-value 
> "In-Reply-To"
>  (when (and notmuch-message-replied-tags rep)
> -  (funcall 'notmuch-tag (notmuch-id-to-query (car (car rep)))
> +  (notmuch-tag (notmuch-id-to-query (car (car rep)))
>  (notmuch-tag-change-list notmuch-message-replied-tags)
>  
>  (add-hook 'message-send-hook 'notmuch-message-mark-replied)
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 613e666..18b4671 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1726,7 +1726,7 @@ TAG-CHANGES is a list of tag operations for 
> `notmuch-tag'."
>(let* ((current-tags (notmuch-show-get-tags))
>(new-tags (notmuch-update-tags current-tags tag-changes)))
>  (unless (equal current-tags new-tags)
> -  (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)
> +  (notmuch-tag (notmuch-show-get-message-id) tag-changes)
>(notmuch-show-set-tags new-tags
>  
>  (defun notmuch-show-tag ( tag-changes)
> @@ -1734,7 +1734,7 @@ TAG-CHANGES is a list of tag operations for 
> `notmuch-tag'."
>  
>  See `notmuch-tag' for information on the format of TAG-CHANGES."
>(interactive)
> -  (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-message-id) 
> tag-changes))
> +  (setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
>(let* ((current-tags (notmuch-show-get-tags))
>(new-tags (notmuch-update-tags current-tags tag-changes)))
>  (unless (equal current-tags new-tags)
> @@ -1745,7 +1745,7 @@ See `notmuch-tag' for information on the format of 
> TAG-CHANGES."
>  
>  See `notmuch-tag' for information on the format of TAG-CHANGES."
>(interactive)
> -  (setq tag-changes (funcall 'notmuch-tag 
> (notmuch-show-get-messages-ids-search) tag-changes))
> +  (setq tag-changes (notmuch-tag (notmuch-show-get-messages-ids-search) 
> tag-changes))
>(notmuch-show-mapc
> (lambda ()
>   (let* ((current-tags (notmuch-show-get-tags))
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index 5a8c957..af107e2 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -562,7 +562,7 @@ will be signaled."
>  (defun notmuch-search-tag-region (beg end  tag-changes)
>"Change tags for threads in the given region."
>(let ((search-string (notmuch-search-find-thread-id-region-search beg 
> end)))
> -(setq tag-changes (funcall 'notmuch-tag search-string tag-changes))
> +(setq tag-changes (notmuch-tag search-string tag-changes))
>  (notmuch-search-foreach-result beg end
>(lambda (pos)
>   (notmuch-search-set-tags
> @@ -576,7 +576,7 @@ See `notmuch-tag' for information on the format of 
> TAG-CHANGES."
>(interactive)
>(let* ((beg (if (region-active-p) (region-beginning) (point)))
>(end (if (region-active-p) (region-end) (point
> -(funcall 'notmuch-search-tag-region beg end tag-changes)))
> +(notmuch-search-tag-region beg end tag-changes)))
>  
>  (defun notmuch-search-add-tag ()
>"Same as `notmuch-search-tag' but sets initial input to '+'."
> -- 
> 1.8.2.rc2
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: replace setq + let with let*

2013-06-02 Thread Mark Walters

On Sun, 02 Jun 2013, david at tethera.net wrote:
> From: David Bremner 
>
> I found several places where a setq is immediately followed by a let
> or a let*. This seems to be the pessimal combination, with the
> implicit scope of the setq combined with the extra indentation of the let.
> I combined these cases into a single let* which I think is easier to read.
> In two places I turned a single clause let into a let*.
> ---
>  emacs/notmuch-hello.el | 4 ++--
>  emacs/notmuch-show.el  | 4 ++--
>  emacs/notmuch.el   | 5 ++---
>  3 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> index c1c6f4b..15e3614 100644
> --- a/emacs/notmuch-hello.el
> +++ b/emacs/notmuch-hello.el
> @@ -260,8 +260,8 @@ afterwards.")
>  (defun notmuch-hello-search ( search)
>(interactive)
>(unless (null search)
> -(setq search (notmuch-hello-trim search))
> -(let ((history-delete-duplicates t))
> +(let* ((search (notmuch-hello-trim search))
> +(history-delete-duplicates t))
>(add-to-history 'notmuch-search-history search)))
>(notmuch-search search notmuch-search-oldest-first nil nil

These look good to me except I don't see why the above is a let* not a
let?

Best wishes

Mark

> #'notmuch-hello-search-continuation))
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 18b4671..e8c8343 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1734,8 +1734,8 @@ TAG-CHANGES is a list of tag operations for 
> `notmuch-tag'."
>  
>  See `notmuch-tag' for information on the format of TAG-CHANGES."
>(interactive)
> -  (setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
> -  (let* ((current-tags (notmuch-show-get-tags))
> +  (let* ((tag-changes (notmuch-tag (notmuch-show-get-message-id) 
> tag-changes))
> +  (current-tags (notmuch-show-get-tags))
>(new-tags (notmuch-update-tags current-tags tag-changes)))
>  (unless (equal current-tags new-tags)
>(notmuch-show-set-tags new-tags
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index af107e2..edb5a1c 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -904,9 +904,8 @@ Other optional parameters are used as follows:
>target-line: The line number to move to if the target thread does not
> appear in the search results."
>(interactive)
> -  (if (null query)
> -  (setq query (notmuch-read-query "Notmuch search: ")))
> -  (let ((buffer (get-buffer-create (notmuch-search-buffer-title query
> +  (let* ((query (or query (notmuch-read-query "Notmuch search: ")))
> +  (buffer (get-buffer-create (notmuch-search-buffer-title query
>  (switch-to-buffer buffer)
>  (notmuch-search-mode)
>  ;; Don't track undo information for this buffer
> -- 
> 1.8.2.rc2
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] contrib: pick: bugfix. use notmuch-show-only-matching-messages rather than prefix

2013-06-02 Thread Tomi Ollila
On Sun, Jun 02 2013, Mark Walters  wrote:

> Previously pick set a prefix argument prior to calling show in the
> message pane to tell show to only show matching messages. This sets
> notmuch-show-only-matching-messages instead which is much cleaner and
> will work even if the user has configured show to default to showing
> only matching messages.
> ---

LGTM.

Tomi


>  contrib/notmuch-pick/notmuch-pick.el |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/notmuch-pick/notmuch-pick.el 
> b/contrib/notmuch-pick/notmuch-pick.el
> index 9079acf..2da43ea 100644
> --- a/contrib/notmuch-pick/notmuch-pick.el
> +++ b/contrib/notmuch-pick/notmuch-pick.el
> @@ -376,8 +376,8 @@ Does NOT change the database."
>   (split-window-vertically (/ (window-height) 4)))
>(with-selected-window notmuch-pick-message-window
>   ;; Since we are only displaying one message do not indent.
> - (let ((notmuch-show-indent-messages-width 0))
> -   (setq current-prefix-arg '(4))
> + (let ((notmuch-show-indent-messages-width 0)
> +   (notmuch-show-only-matching-messages t))
> (setq buffer (notmuch-show id nil nil nil
>;; We need the `let' as notmuch-pick-message-window is buffer local.
>(let ((window notmuch-pick-message-window))
> -- 
> 1.7.9.1
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: remove hardcoded defaults values from docstrings

2013-06-02 Thread Tomi Ollila
On Sun, Jun 02 2013, david at tethera.net wrote:

> From: David Bremner 
>
> These functions refer to default values of variables, but it seems
> less confusing and less likely to get out of date to just allow the
> user to follow the help cross-reference links.
> ---

LGTM.

Tomi


>  emacs/notmuch-show.el | 14 ++
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> another proposed change from our notmuch-pick discussions.
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 613e666..600e802 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1835,10 +1835,9 @@ search results instead."
>"Archive each message in thread.
>  
>  Archive each message currently shown by applying the tag changes
> -in `notmuch-archive-tags' to each (remove the \"inbox\" tag by
> -default). If a prefix argument is given, the messages will be
> -\"unarchived\", i.e. the tag changes in `notmuch-archive-tags'
> -will be reversed.
> +in `notmuch-archive-tags' to each. If a prefix argument is given,
> +the messages will be \"unarchived\", i.e. the tag changes in
> +`notmuch-archive-tags' will be reversed.
>  
>  Note: This command is safe from any race condition of new messages
>  being delivered to the same thread. It does not archive the
> @@ -1865,10 +1864,9 @@ buffer."
>"Archive the current message.
>  
>  Archive the current message by applying the tag changes in
> -`notmuch-archive-tags' to it (remove the \"inbox\" tag by
> -default). If a prefix argument is given, the message will be
> -\"unarchived\", i.e. the tag changes in `notmuch-archive-tags'
> -will be reversed."
> +`notmuch-archive-tags' to it. If a prefix argument is given, the
> +message will be \"unarchived\", i.e. the tag changes in
> +`notmuch-archive-tags' will be reversed."
>(interactive "P")
>(when notmuch-archive-tags
>  (apply 'notmuch-show-tag-message
> -- 
> 1.8.2.rc2
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: replace (funcall 'foo ...) with (foo ...)

2013-06-02 Thread Tomi Ollila
On Sun, Jun 02 2013, david at tethera.net wrote:

> From: David Bremner 
>
> I can't see any benefit to the funcall, and it looks like the result
> of cut-and-paste from some code that actually used a variable for the
> function to call.
> ---

Looks sensible to me.

Tomi


>
> Mark and I were discussing some style issues in the context of pick,
> and it seems to me that some of the elisp style in the current code
> could be improved. I don't claim to be an elisp style expert by any
> stretch of the imagination. It would be great if some experts could
> add a section to devel/STYLE about elisp.
>
>
>  emacs/notmuch-message.el | 2 +-
>  emacs/notmuch-show.el| 6 +++---
>  emacs/notmuch.el | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el
> index 4dc4883..914bdd1 100644
> --- a/emacs/notmuch-message.el
> +++ b/emacs/notmuch-message.el
> @@ -40,7 +40,7 @@ the \"inbox\" and \"todo\" tags, you would set:
>;; get the in-reply-to header and parse it for the message id.
>(let ((rep (mail-header-parse-addresses (message-field-value 
> "In-Reply-To"
>  (when (and notmuch-message-replied-tags rep)
> -  (funcall 'notmuch-tag (notmuch-id-to-query (car (car rep)))
> +  (notmuch-tag (notmuch-id-to-query (car (car rep)))
>  (notmuch-tag-change-list notmuch-message-replied-tags)
>  
>  (add-hook 'message-send-hook 'notmuch-message-mark-replied)
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 613e666..18b4671 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1726,7 +1726,7 @@ TAG-CHANGES is a list of tag operations for 
> `notmuch-tag'."
>(let* ((current-tags (notmuch-show-get-tags))
>(new-tags (notmuch-update-tags current-tags tag-changes)))
>  (unless (equal current-tags new-tags)
> -  (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)
> +  (notmuch-tag (notmuch-show-get-message-id) tag-changes)
>(notmuch-show-set-tags new-tags
>  
>  (defun notmuch-show-tag ( tag-changes)
> @@ -1734,7 +1734,7 @@ TAG-CHANGES is a list of tag operations for 
> `notmuch-tag'."
>  
>  See `notmuch-tag' for information on the format of TAG-CHANGES."
>(interactive)
> -  (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-message-id) 
> tag-changes))
> +  (setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
>(let* ((current-tags (notmuch-show-get-tags))
>(new-tags (notmuch-update-tags current-tags tag-changes)))
>  (unless (equal current-tags new-tags)
> @@ -1745,7 +1745,7 @@ See `notmuch-tag' for information on the format of 
> TAG-CHANGES."
>  
>  See `notmuch-tag' for information on the format of TAG-CHANGES."
>(interactive)
> -  (setq tag-changes (funcall 'notmuch-tag 
> (notmuch-show-get-messages-ids-search) tag-changes))
> +  (setq tag-changes (notmuch-tag (notmuch-show-get-messages-ids-search) 
> tag-changes))
>(notmuch-show-mapc
> (lambda ()
>   (let* ((current-tags (notmuch-show-get-tags))
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index 5a8c957..af107e2 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -562,7 +562,7 @@ will be signaled."
>  (defun notmuch-search-tag-region (beg end  tag-changes)
>"Change tags for threads in the given region."
>(let ((search-string (notmuch-search-find-thread-id-region-search beg 
> end)))
> -(setq tag-changes (funcall 'notmuch-tag search-string tag-changes))
> +(setq tag-changes (notmuch-tag search-string tag-changes))
>  (notmuch-search-foreach-result beg end
>(lambda (pos)
>   (notmuch-search-set-tags
> @@ -576,7 +576,7 @@ See `notmuch-tag' for information on the format of 
> TAG-CHANGES."
>(interactive)
>(let* ((beg (if (region-active-p) (region-beginning) (point)))
>(end (if (region-active-p) (region-end) (point
> -(funcall 'notmuch-search-tag-region beg end tag-changes)))
> +(notmuch-search-tag-region beg end tag-changes)))
>  
>  (defun notmuch-search-add-tag ()
>"Same as `notmuch-search-tag' but sets initial input to '+'."
> -- 
> 1.8.2.rc2
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] contrib: pick: bugfix: use notmuch-show-mark-read-tags instead of unread

2013-06-02 Thread Tomi Ollila
On Sun, Jun 02 2013, Mark Walters  wrote:

> Previously pick removed the unread tag from its tag display: since the
> tag change is now customisable use the customised variable.
>
> This only affected the tags displayed, not the tags in the database as
> notmuch-show (in the view pane) did the actual tag changes.
> ---
>
> Thanks to Tomi for pointing this out in
> id:m2r4mecofa.fsf at guru.guru-group.fi

LGTM :D

Tomi

>
> Best wishes
>
> Mark
>
>  contrib/notmuch-pick/notmuch-pick.el |3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/notmuch-pick/notmuch-pick.el 
> b/contrib/notmuch-pick/notmuch-pick.el
> index 128fabf..9079acf 100644
> --- a/contrib/notmuch-pick/notmuch-pick.el
> +++ b/contrib/notmuch-pick/notmuch-pick.el
> @@ -384,7 +384,8 @@ Does NOT change the database."
>   (with-current-buffer buffer
> (setq notmuch-pick-message-window window)
> (add-hook 'kill-buffer-hook 'notmuch-pick-message-window-kill-hook)))
> -  (notmuch-pick-tag-update-display (list "-unread"))
> +  (when notmuch-show-mark-read-tags
> + (notmuch-pick-tag-update-display notmuch-show-mark-read-tags))
>(setq notmuch-pick-message-buffer buffer
>  
>  (defun notmuch-pick-show-message-out ()
> -- 
> 1.7.9.1
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] contrib: pick: use the sexp parser

2013-06-02 Thread Mark Walters

Tomi Ollila  writes:

> These trivial changes look good -- is sexp already supported in show ?

At the moment sexp is not supported in show (despite that using
synchronous command so it is much easier). I posted a (not good) at
id:1354975891-24663-1-git-send-email-markwalters1009 at gmail.com and in
Austin's reply he suggested a much better way of doing is. But I never posted a
corrected version (perhaps I was waiting for the error handling stuff to
clear?).

Best wishes

Mark

>
> Tomi
>
>>
>>  contrib/notmuch-pick/notmuch-pick.el |5 ++---
>>  1 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/contrib/notmuch-pick/notmuch-pick.el 
>> b/contrib/notmuch-pick/notmuch-pick.el
>> index 128fabf..33905d6 100644
>> --- a/contrib/notmuch-pick/notmuch-pick.el
>> +++ b/contrib/notmuch-pick/notmuch-pick.el
>> @@ -773,8 +773,7 @@ Complete list of currently available key bindings:
>>  (save-excursion
>>(goto-char (point-max))
>>(insert string))
>> -(notmuch-json-parse-partial-list 'notmuch-pick-insert-forest-thread
>> - 'notmuch-pick-show-error
>> +(notmuch-sexp-parse-partial-list 'notmuch-pick-insert-forest-thread
>>   results-buf)
>>  
>>  (defun notmuch-pick-worker (basic-query  query-context target 
>> buffer)
>> @@ -796,7 +795,7 @@ Complete list of currently available key bindings:
>>  (if notmuch-pick-asynchronous-parser
>>  (let ((proc (start-process
>>   "notmuch-pick" buffer
>> - notmuch-command "show" "--body=false" "--format=json"
>> + notmuch-command "show" "--body=false" "--format=sexp"
>>   message-arg search-args))
>>;; Use a scratch buffer to accumulate partial output.
>>;; This buffer will be killed by the sentinel, which
>> -- 
>> 1.7.9.1
>>
>> ___
>> notmuch mailing list
>> notmuch at notmuchmail.org
>> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: replace setq + let with let*

2013-06-02 Thread da...@tethera.net
From: David Bremner 

I found several places where a setq is immediately followed by a let
or a let*. This seems to be the pessimal combination, with the
implicit scope of the setq combined with the extra indentation of the let.
I combined these cases into a single let* which I think is easier to read.
In two places I turned a single clause let into a let*.
---
 emacs/notmuch-hello.el | 4 ++--
 emacs/notmuch-show.el  | 4 ++--
 emacs/notmuch.el   | 5 ++---
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index c1c6f4b..15e3614 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -260,8 +260,8 @@ afterwards.")
 (defun notmuch-hello-search ( search)
   (interactive)
   (unless (null search)
-(setq search (notmuch-hello-trim search))
-(let ((history-delete-duplicates t))
+(let* ((search (notmuch-hello-trim search))
+  (history-delete-duplicates t))
   (add-to-history 'notmuch-search-history search)))
   (notmuch-search search notmuch-search-oldest-first nil nil
  #'notmuch-hello-search-continuation))
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 18b4671..e8c8343 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1734,8 +1734,8 @@ TAG-CHANGES is a list of tag operations for 
`notmuch-tag'."

 See `notmuch-tag' for information on the format of TAG-CHANGES."
   (interactive)
-  (setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
-  (let* ((current-tags (notmuch-show-get-tags))
+  (let* ((tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
+(current-tags (notmuch-show-get-tags))
 (new-tags (notmuch-update-tags current-tags tag-changes)))
 (unless (equal current-tags new-tags)
   (notmuch-show-set-tags new-tags
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index af107e2..edb5a1c 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -904,9 +904,8 @@ Other optional parameters are used as follows:
   target-line: The line number to move to if the target thread does not
appear in the search results."
   (interactive)
-  (if (null query)
-  (setq query (notmuch-read-query "Notmuch search: ")))
-  (let ((buffer (get-buffer-create (notmuch-search-buffer-title query
+  (let* ((query (or query (notmuch-read-query "Notmuch search: ")))
+(buffer (get-buffer-create (notmuch-search-buffer-title query
 (switch-to-buffer buffer)
 (notmuch-search-mode)
 ;; Don't track undo information for this buffer
-- 
1.8.2.rc2



[PATCH] emacs: add `notmuch-archive-tags' cross references in docstrings

2013-06-02 Thread da...@tethera.net
From: David Bremner 

Several function docstrings refer to behaviour in docstrings that is
really controlled by notmuch-archive-tags. Add cross references, and
replace hardcoding.
---
 emacs/notmuch-show.el |  4 ++--
 emacs/notmuch.el  | 27 ---
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 600e802..c281f05 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1529,8 +1529,8 @@ 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
+archives the entire current thread, (apply changes in
+`notmuch-archive-tags'), kills the buffer, and displays the next
 thread from the search from which this thread was originally
 shown."
   (interactive)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 5a8c957..e78334d 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -386,17 +386,22 @@ number of matched messages and total messages in the 
thread,
 participants in the thread, a representative subject line, and
 any tags).

-Pressing \\[notmuch-search-show-thread] on any line displays that thread. The 
'\\[notmuch-search-add-tag]' and '\\[notmuch-search-remove-tag]'
-keys can be used to add or remove tags from a thread. The 
'\\[notmuch-search-archive-thread]' key
-is a convenience for archiving a thread (removing the \"inbox\"
-tag). The '\\[notmuch-search-tag-all]' key can be used to add and/or remove 
tags from all
-messages (as opposed to threads) that match the current query.  Use with 
caution, as this
-will also tag matching messages that arrived *after* constructing the buffer.
-
-Other useful commands are '\\[notmuch-search-filter]' for filtering the 
current search
-based on an additional query string, '\\[notmuch-search-filter-by-tag]' for 
filtering to include
-only messages with a given tag, and '\\[notmuch-search]' to execute a new, 
global
-search.
+Pressing \\[notmuch-search-show-thread] on any line displays that
+thread. The '\\[notmuch-search-add-tag]' and
+'\\[notmuch-search-remove-tag]' keys can be used to add or remove
+tags from a thread. The '\\[notmuch-search-archive-thread]' key
+is a convenience for archiving a thread (applying changes in
+`notmuch-archive-tags'). The '\\[notmuch-search-tag-all]' key can
+be used to add and/or remove tags from all messages (as opposed
+to threads) that match the current query.  Use with caution, as
+this will also tag matching messages that arrived *after*
+constructing the buffer.
+
+Other useful commands are '\\[notmuch-search-filter]' for
+filtering the current search based on an additional query string,
+'\\[notmuch-search-filter-by-tag]' for filtering to include only
+messages with a given tag, and '\\[notmuch-search]' to execute a
+new, global search.

 Complete list of currently available key bindings:

-- 
1.8.2.rc2



[PATCH] emacs: remove hardcoded defaults values from docstrings

2013-06-02 Thread da...@tethera.net
From: David Bremner 

These functions refer to default values of variables, but it seems
less confusing and less likely to get out of date to just allow the
user to follow the help cross-reference links.
---
 emacs/notmuch-show.el | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

another proposed change from our notmuch-pick discussions.

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 613e666..600e802 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1835,10 +1835,9 @@ search results instead."
   "Archive each message in thread.

 Archive each message currently shown by applying the tag changes
-in `notmuch-archive-tags' to each (remove the \"inbox\" tag by
-default). If a prefix argument is given, the messages will be
-\"unarchived\", i.e. the tag changes in `notmuch-archive-tags'
-will be reversed.
+in `notmuch-archive-tags' to each. If a prefix argument is given,
+the messages will be \"unarchived\", i.e. the tag changes in
+`notmuch-archive-tags' will be reversed.

 Note: This command is safe from any race condition of new messages
 being delivered to the same thread. It does not archive the
@@ -1865,10 +1864,9 @@ buffer."
   "Archive the current message.

 Archive the current message by applying the tag changes in
-`notmuch-archive-tags' to it (remove the \"inbox\" tag by
-default). If a prefix argument is given, the message will be
-\"unarchived\", i.e. the tag changes in `notmuch-archive-tags'
-will be reversed."
+`notmuch-archive-tags' to it. If a prefix argument is given, the
+message will be \"unarchived\", i.e. the tag changes in
+`notmuch-archive-tags' will be reversed."
   (interactive "P")
   (when notmuch-archive-tags
 (apply 'notmuch-show-tag-message
-- 
1.8.2.rc2



[PATCH 4/4] debian: update .gitignore

2013-06-02 Thread da...@tethera.net
From: David Bremner 

Several packages have been added or renamed, but their build detritus
not yet ignored.
---
 debian/.gitignore | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/.gitignore b/debian/.gitignore
index 9f09f22..31aa2bb 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -1,10 +1,12 @@
 tmp/
 libnotmuch-dev/
-libnotmuch2/
+libnotmuch*/
 notmuch-emacs/
-notmuch-vim/
 notmuch/
-python-notmuch/
+notmuch-mutt/
+notmuch-ruby/
+python*-notmuch/
 *.debhelper
 *.debhelper.log
 *.substvars
+files
-- 
1.8.2.rc2



[PATCH 3/4] bindings/go: ignore downloaded source from github.com

2013-06-02 Thread da...@tethera.net
From: David Bremner 

Start a .gitignore for go bindings.
---
 bindings/go/.gitignore | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 bindings/go/.gitignore

diff --git a/bindings/go/.gitignore b/bindings/go/.gitignore
new file mode 100644
index 000..a2670c1
--- /dev/null
+++ b/bindings/go/.gitignore
@@ -0,0 +1 @@
+src/github.com/
-- 
1.8.2.rc2



[PATCH 2/4] emacs: update .gitignore

2013-06-02 Thread da...@tethera.net
From: David Bremner 

Start a seperate .gitignore for emacs stuff, move .elc rule there.
---
 .gitignore   | 1 -
 emacs/.gitignore | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 emacs/.gitignore

diff --git a/.gitignore b/.gitignore
index d428290..ef4f074 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,5 +12,4 @@ libnotmuch*.dylib
 *.[ao]
 *~
 .*.swp
-*.elc
 releases
diff --git a/emacs/.gitignore b/emacs/.gitignore
new file mode 100644
index 000..5421301
--- /dev/null
+++ b/emacs/.gitignore
@@ -0,0 +1,2 @@
+.eldeps*
+*.elc
-- 
1.8.2.rc2



[PATCH 1/4] bindings/python: ignore build subdirectory.

2013-06-02 Thread da...@tethera.net
From: David Bremner 

Update .gitignore to make git status less noisy
---
 bindings/python/.gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bindings/python/.gitignore b/bindings/python/.gitignore
index 1fbea8a..da0732e 100644
--- a/bindings/python/.gitignore
+++ b/bindings/python/.gitignore
@@ -1,3 +1,4 @@
 *.py[co]
 /docs/build
 /docs/html
+build/
-- 
1.8.2.rc2



[PATCH] emacs: replace (funcall 'foo ...) with (foo ...)

2013-06-02 Thread da...@tethera.net
From: David Bremner 

I can't see any benefit to the funcall, and it looks like the result
of cut-and-paste from some code that actually used a variable for the
function to call.
---

Mark and I were discussing some style issues in the context of pick,
and it seems to me that some of the elisp style in the current code
could be improved. I don't claim to be an elisp style expert by any
stretch of the imagination. It would be great if some experts could
add a section to devel/STYLE about elisp.


 emacs/notmuch-message.el | 2 +-
 emacs/notmuch-show.el| 6 +++---
 emacs/notmuch.el | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el
index 4dc4883..914bdd1 100644
--- a/emacs/notmuch-message.el
+++ b/emacs/notmuch-message.el
@@ -40,7 +40,7 @@ the \"inbox\" and \"todo\" tags, you would set:
   ;; get the in-reply-to header and parse it for the message id.
   (let ((rep (mail-header-parse-addresses (message-field-value 
"In-Reply-To"
 (when (and notmuch-message-replied-tags rep)
-  (funcall 'notmuch-tag (notmuch-id-to-query (car (car rep)))
+  (notmuch-tag (notmuch-id-to-query (car (car rep)))
   (notmuch-tag-change-list notmuch-message-replied-tags)

 (add-hook 'message-send-hook 'notmuch-message-mark-replied)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 613e666..18b4671 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1726,7 +1726,7 @@ TAG-CHANGES is a list of tag operations for 
`notmuch-tag'."
   (let* ((current-tags (notmuch-show-get-tags))
 (new-tags (notmuch-update-tags current-tags tag-changes)))
 (unless (equal current-tags new-tags)
-  (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)
+  (notmuch-tag (notmuch-show-get-message-id) tag-changes)
   (notmuch-show-set-tags new-tags

 (defun notmuch-show-tag ( tag-changes)
@@ -1734,7 +1734,7 @@ TAG-CHANGES is a list of tag operations for 
`notmuch-tag'."

 See `notmuch-tag' for information on the format of TAG-CHANGES."
   (interactive)
-  (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-message-id) 
tag-changes))
+  (setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
   (let* ((current-tags (notmuch-show-get-tags))
 (new-tags (notmuch-update-tags current-tags tag-changes)))
 (unless (equal current-tags new-tags)
@@ -1745,7 +1745,7 @@ See `notmuch-tag' for information on the format of 
TAG-CHANGES."

 See `notmuch-tag' for information on the format of TAG-CHANGES."
   (interactive)
-  (setq tag-changes (funcall 'notmuch-tag 
(notmuch-show-get-messages-ids-search) tag-changes))
+  (setq tag-changes (notmuch-tag (notmuch-show-get-messages-ids-search) 
tag-changes))
   (notmuch-show-mapc
(lambda ()
  (let* ((current-tags (notmuch-show-get-tags))
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 5a8c957..af107e2 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -562,7 +562,7 @@ will be signaled."
 (defun notmuch-search-tag-region (beg end  tag-changes)
   "Change tags for threads in the given region."
   (let ((search-string (notmuch-search-find-thread-id-region-search beg end)))
-(setq tag-changes (funcall 'notmuch-tag search-string tag-changes))
+(setq tag-changes (notmuch-tag search-string tag-changes))
 (notmuch-search-foreach-result beg end
   (lambda (pos)
(notmuch-search-set-tags
@@ -576,7 +576,7 @@ See `notmuch-tag' for information on the format of 
TAG-CHANGES."
   (interactive)
   (let* ((beg (if (region-active-p) (region-beginning) (point)))
 (end (if (region-active-p) (region-end) (point
-(funcall 'notmuch-search-tag-region beg end tag-changes)))
+(notmuch-search-tag-region beg end tag-changes)))

 (defun notmuch-search-add-tag ()
   "Same as `notmuch-search-tag' but sets initial input to '+'."
-- 
1.8.2.rc2



[PATCH v3 0/6] Make Emacs search use sexp format

2013-06-02 Thread Jameson Graef Rollins
On Sat, Jun 01 2013, David Bremner  wrote:
> Austin Clements  writes:
>
>> This is v3 of id:1369934016-22308-1-git-send-email-amdragon at mit.edu.
>> This tweaks the shell invocation as suggested by Tomi and fixes two
>> comment typos pointed out by Mark.  It also adds a NEWS patch.  I'm
>> going to go ahead and mark this ready because of Tomi's and Mark's
>> reviews of v2.
>
> The first 5 I pushed. The NEWS patch has a conflict.

I'm very happy to see the long-coming sexp handling working here.  Good
work, folks, particularly to Austin for getting the awesome asynchronous
processing stuff working.  Searches are now definitely noticeably
faster.

I am, however, seeing a couple of issues that we might want to address.

* Killing a search buffer that is still in the process of being filled
  causes errors to be thrown.  I'm seeing both of the following
  intermittently:

[Sun Jun  2 08:26:40 2013]
notmuch exited with status killed
command: notmuch search --format\=sexp --format-version\=1 --sort\=newest-first 
to\:jrollins
exit signal: killed

[Sun Jun  2 08:32:26 2013]
notmuch exited with status hangup
command: notmuch search --format\=sexp --format-version\=1 --sort\=newest-first 
to\:jrollins
exit signal: hangup

  This is somewhat understandable, as the notmuch binary exits with an
  error if it hasn't finished dumping the output, but given how common
  this particular scenario is I think we should try to avoid throwing
  errors in this circumstance.  I wonder if we shouldn't just modify the
  binary to not return non-zero if it was manually killed while
  processing the output, or at least special-case the particular error
  caused by manually killing the search.

* The next thing I'm seeing is this:

Opening input file: no such file or directory, /home/jrollins/tmp/nmerr5390CAY

  I'm not exactly sure what causes this error, but it looks to me like
  the temporary error file was removed before we were finished with it.

* Finally, something happened that caused *12,000* of the following lines
  to be sent to the *Notmuch errors* buffer:

A Xapian exception occurred performing query: The revision being read has been 
discarded - you should call Xapian::Database::reopen() and retry the operation

  Again, this was related to killing a search buffer that was still
  being filled. I'm pretty sure the database was not modified during
  this process.

Let me know if I can help provide any more info.

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/20130602/045a493f/attachment.pgp>


[PATCH] contrib: pick: use the sexp parser

2013-06-02 Thread David Bremner
Mark Walters  writes:

> This just converts notmuch-pick to use the sexp parser.
> ---

Pushed.

d


[PATCH 0/8] packaging: fedora: general updates

2013-06-02 Thread David Bremner
Felipe Contreras  writes:

> On Sat, May 25, 2013 at 7:41 AM, David Bremner  wrote:
>
>> At this point we wait for somebody (else) with Fedora expertise to
>> review the patches.
>
> Like who? I though the reason these were never updated is that there
> wasn't anybody else.

Hmm. Somehow I missed Tomi's review. Anyway, pushed now.

d


[PATCH 1/8] packaging: fedora: update

2013-06-02 Thread David Bremner
Felipe Contreras  writes:
>  Name:   notmuch
> -Version:0.4
> +Version:0.15.2
>  Release:1%{?dist}
>  Summary:Not much of an email program

It might be good in the future do some kind of automated update of the
version. The python bindings version is currently updaded by a sed hack
in the target update-versions.

d


[PATCH] contrib: pick: use the sexp parser

2013-06-02 Thread Tomi Ollila
On Sat, Jun 01 2013, Mark Walters  wrote:

> This just converts notmuch-pick to use the sexp parser.
> ---

These trivial changes look good -- is sexp already supported in show ?

Tomi

>
>  contrib/notmuch-pick/notmuch-pick.el |5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/contrib/notmuch-pick/notmuch-pick.el 
> b/contrib/notmuch-pick/notmuch-pick.el
> index 128fabf..33905d6 100644
> --- a/contrib/notmuch-pick/notmuch-pick.el
> +++ b/contrib/notmuch-pick/notmuch-pick.el
> @@ -773,8 +773,7 @@ Complete list of currently available key bindings:
>  (save-excursion
>(goto-char (point-max))
>(insert string))
> - (notmuch-json-parse-partial-list 'notmuch-pick-insert-forest-thread
> -  'notmuch-pick-show-error
> + (notmuch-sexp-parse-partial-list 'notmuch-pick-insert-forest-thread
>results-buf)
>  
>  (defun notmuch-pick-worker (basic-query  query-context target 
> buffer)
> @@ -796,7 +795,7 @@ Complete list of currently available key bindings:
>  (if notmuch-pick-asynchronous-parser
>   (let ((proc (start-process
>"notmuch-pick" buffer
> -  notmuch-command "show" "--body=false" "--format=json"
> +  notmuch-command "show" "--body=false" "--format=sexp"
>message-arg search-args))
> ;; Use a scratch buffer to accumulate partial output.
>;; This buffer will be killed by the sentinel, which
> -- 
> 1.7.9.1
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/8] packaging: fedora: update

2013-06-02 Thread David Bremner
Felipe Contreras felipe.contre...@gmail.com writes:
  Name:   notmuch
 -Version:0.4
 +Version:0.15.2
  Release:1%{?dist}
  Summary:Not much of an email program

It might be good in the future do some kind of automated update of the
version. The python bindings version is currently updaded by a sed hack
in the target update-versions.

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


Re: [PATCH 0/8] packaging: fedora: general updates

2013-06-02 Thread David Bremner
Felipe Contreras felipe.contre...@gmail.com writes:

 On Sat, May 25, 2013 at 7:41 AM, David Bremner da...@tethera.net wrote:

 At this point we wait for somebody (else) with Fedora expertise to
 review the patches.

 Like who? I though the reason these were never updated is that there
 wasn't anybody else.

Hmm. Somehow I missed Tomi's review. Anyway, pushed now.

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


Re: [PATCH] contrib: pick: use the sexp parser

2013-06-02 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes:

 This just converts notmuch-pick to use the sexp parser.
 ---

Pushed.

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


[PATCH] emacs: replace (funcall 'foo ...) with (foo ...)

2013-06-02 Thread david
From: David Bremner brem...@debian.org

I can't see any benefit to the funcall, and it looks like the result
of cut-and-paste from some code that actually used a variable for the
function to call.
---

Mark and I were discussing some style issues in the context of pick,
and it seems to me that some of the elisp style in the current code
could be improved. I don't claim to be an elisp style expert by any
stretch of the imagination. It would be great if some experts could
add a section to devel/STYLE about elisp.


 emacs/notmuch-message.el | 2 +-
 emacs/notmuch-show.el| 6 +++---
 emacs/notmuch.el | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el
index 4dc4883..914bdd1 100644
--- a/emacs/notmuch-message.el
+++ b/emacs/notmuch-message.el
@@ -40,7 +40,7 @@ the \inbox\ and \todo\ tags, you would set:
   ;; get the in-reply-to header and parse it for the message id.
   (let ((rep (mail-header-parse-addresses (message-field-value 
In-Reply-To
 (when (and notmuch-message-replied-tags rep)
-  (funcall 'notmuch-tag (notmuch-id-to-query (car (car rep)))
+  (notmuch-tag (notmuch-id-to-query (car (car rep)))
   (notmuch-tag-change-list notmuch-message-replied-tags)
 
 (add-hook 'message-send-hook 'notmuch-message-mark-replied)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 613e666..18b4671 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1726,7 +1726,7 @@ TAG-CHANGES is a list of tag operations for 
`notmuch-tag'.
   (let* ((current-tags (notmuch-show-get-tags))
 (new-tags (notmuch-update-tags current-tags tag-changes)))
 (unless (equal current-tags new-tags)
-  (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)
+  (notmuch-tag (notmuch-show-get-message-id) tag-changes)
   (notmuch-show-set-tags new-tags
 
 (defun notmuch-show-tag (optional tag-changes)
@@ -1734,7 +1734,7 @@ TAG-CHANGES is a list of tag operations for 
`notmuch-tag'.
 
 See `notmuch-tag' for information on the format of TAG-CHANGES.
   (interactive)
-  (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-message-id) 
tag-changes))
+  (setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
   (let* ((current-tags (notmuch-show-get-tags))
 (new-tags (notmuch-update-tags current-tags tag-changes)))
 (unless (equal current-tags new-tags)
@@ -1745,7 +1745,7 @@ See `notmuch-tag' for information on the format of 
TAG-CHANGES.
 
 See `notmuch-tag' for information on the format of TAG-CHANGES.
   (interactive)
-  (setq tag-changes (funcall 'notmuch-tag 
(notmuch-show-get-messages-ids-search) tag-changes))
+  (setq tag-changes (notmuch-tag (notmuch-show-get-messages-ids-search) 
tag-changes))
   (notmuch-show-mapc
(lambda ()
  (let* ((current-tags (notmuch-show-get-tags))
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 5a8c957..af107e2 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -562,7 +562,7 @@ will be signaled.
 (defun notmuch-search-tag-region (beg end optional tag-changes)
   Change tags for threads in the given region.
   (let ((search-string (notmuch-search-find-thread-id-region-search beg end)))
-(setq tag-changes (funcall 'notmuch-tag search-string tag-changes))
+(setq tag-changes (notmuch-tag search-string tag-changes))
 (notmuch-search-foreach-result beg end
   (lambda (pos)
(notmuch-search-set-tags
@@ -576,7 +576,7 @@ See `notmuch-tag' for information on the format of 
TAG-CHANGES.
   (interactive)
   (let* ((beg (if (region-active-p) (region-beginning) (point)))
 (end (if (region-active-p) (region-end) (point
-(funcall 'notmuch-search-tag-region beg end tag-changes)))
+(notmuch-search-tag-region beg end tag-changes)))
 
 (defun notmuch-search-add-tag ()
   Same as `notmuch-search-tag' but sets initial input to '+'.
-- 
1.8.2.rc2

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


Re: [PATCH] contrib: pick: bugfix: use notmuch-show-mark-read-tags instead of unread

2013-06-02 Thread Tomi Ollila
On Sun, Jun 02 2013, Mark Walters markwalters1...@gmail.com wrote:

 Previously pick removed the unread tag from its tag display: since the
 tag change is now customisable use the customised variable.

 This only affected the tags displayed, not the tags in the database as
 notmuch-show (in the view pane) did the actual tag changes.
 ---

 Thanks to Tomi for pointing this out in
 id:m2r4mecofa@guru.guru-group.fi

LGTM :D

Tomi


 Best wishes

 Mark

  contrib/notmuch-pick/notmuch-pick.el |3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

 diff --git a/contrib/notmuch-pick/notmuch-pick.el 
 b/contrib/notmuch-pick/notmuch-pick.el
 index 128fabf..9079acf 100644
 --- a/contrib/notmuch-pick/notmuch-pick.el
 +++ b/contrib/notmuch-pick/notmuch-pick.el
 @@ -384,7 +384,8 @@ Does NOT change the database.
   (with-current-buffer buffer
 (setq notmuch-pick-message-window window)
 (add-hook 'kill-buffer-hook 'notmuch-pick-message-window-kill-hook)))
 -  (notmuch-pick-tag-update-display (list -unread))
 +  (when notmuch-show-mark-read-tags
 + (notmuch-pick-tag-update-display notmuch-show-mark-read-tags))
(setq notmuch-pick-message-buffer buffer
  
  (defun notmuch-pick-show-message-out ()
 -- 
 1.7.9.1

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


[PATCH 4/4] debian: update .gitignore

2013-06-02 Thread david
From: David Bremner brem...@debian.org

Several packages have been added or renamed, but their build detritus
not yet ignored.
---
 debian/.gitignore | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/.gitignore b/debian/.gitignore
index 9f09f22..31aa2bb 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -1,10 +1,12 @@
 tmp/
 libnotmuch-dev/
-libnotmuch2/
+libnotmuch*/
 notmuch-emacs/
-notmuch-vim/
 notmuch/
-python-notmuch/
+notmuch-mutt/
+notmuch-ruby/
+python*-notmuch/
 *.debhelper
 *.debhelper.log
 *.substvars
+files
-- 
1.8.2.rc2

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


[PATCH 2/4] emacs: update .gitignore

2013-06-02 Thread david
From: David Bremner brem...@debian.org

Start a seperate .gitignore for emacs stuff, move .elc rule there.
---
 .gitignore   | 1 -
 emacs/.gitignore | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 emacs/.gitignore

diff --git a/.gitignore b/.gitignore
index d428290..ef4f074 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,5 +12,4 @@ libnotmuch*.dylib
 *.[ao]
 *~
 .*.swp
-*.elc
 releases
diff --git a/emacs/.gitignore b/emacs/.gitignore
new file mode 100644
index 000..5421301
--- /dev/null
+++ b/emacs/.gitignore
@@ -0,0 +1,2 @@
+.eldeps*
+*.elc
-- 
1.8.2.rc2

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


[PATCH 3/4] bindings/go: ignore downloaded source from github.com

2013-06-02 Thread david
From: David Bremner brem...@debian.org

Start a .gitignore for go bindings.
---
 bindings/go/.gitignore | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 bindings/go/.gitignore

diff --git a/bindings/go/.gitignore b/bindings/go/.gitignore
new file mode 100644
index 000..a2670c1
--- /dev/null
+++ b/bindings/go/.gitignore
@@ -0,0 +1 @@
+src/github.com/
-- 
1.8.2.rc2

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


[PATCH] emacs: remove hardcoded defaults values from docstrings

2013-06-02 Thread david
From: David Bremner brem...@debian.org

These functions refer to default values of variables, but it seems
less confusing and less likely to get out of date to just allow the
user to follow the help cross-reference links.
---
 emacs/notmuch-show.el | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

another proposed change from our notmuch-pick discussions.

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 613e666..600e802 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1835,10 +1835,9 @@ search results instead.
   Archive each message in thread.
 
 Archive each message currently shown by applying the tag changes
-in `notmuch-archive-tags' to each (remove the \inbox\ tag by
-default). If a prefix argument is given, the messages will be
-\unarchived\, i.e. the tag changes in `notmuch-archive-tags'
-will be reversed.
+in `notmuch-archive-tags' to each. If a prefix argument is given,
+the messages will be \unarchived\, i.e. the tag changes in
+`notmuch-archive-tags' will be reversed.
 
 Note: This command is safe from any race condition of new messages
 being delivered to the same thread. It does not archive the
@@ -1865,10 +1864,9 @@ buffer.
   Archive the current message.
 
 Archive the current message by applying the tag changes in
-`notmuch-archive-tags' to it (remove the \inbox\ tag by
-default). If a prefix argument is given, the message will be
-\unarchived\, i.e. the tag changes in `notmuch-archive-tags'
-will be reversed.
+`notmuch-archive-tags' to it. If a prefix argument is given, the
+message will be \unarchived\, i.e. the tag changes in
+`notmuch-archive-tags' will be reversed.
   (interactive P)
   (when notmuch-archive-tags
 (apply 'notmuch-show-tag-message
-- 
1.8.2.rc2

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


[PATCH] emacs: add `notmuch-archive-tags' cross references in docstrings

2013-06-02 Thread david
From: David Bremner brem...@debian.org

Several function docstrings refer to behaviour in docstrings that is
really controlled by notmuch-archive-tags. Add cross references, and
replace hardcoding.
---
 emacs/notmuch-show.el |  4 ++--
 emacs/notmuch.el  | 27 ---
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 600e802..c281f05 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1529,8 +1529,8 @@ 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
+archives the entire current thread, (apply changes in
+`notmuch-archive-tags'), kills the buffer, and displays the next
 thread from the search from which this thread was originally
 shown.
   (interactive)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 5a8c957..e78334d 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -386,17 +386,22 @@ number of matched messages and total messages in the 
thread,
 participants in the thread, a representative subject line, and
 any tags).
 
-Pressing \\[notmuch-search-show-thread] on any line displays that thread. The 
'\\[notmuch-search-add-tag]' and '\\[notmuch-search-remove-tag]'
-keys can be used to add or remove tags from a thread. The 
'\\[notmuch-search-archive-thread]' key
-is a convenience for archiving a thread (removing the \inbox\
-tag). The '\\[notmuch-search-tag-all]' key can be used to add and/or remove 
tags from all
-messages (as opposed to threads) that match the current query.  Use with 
caution, as this
-will also tag matching messages that arrived *after* constructing the buffer.
-
-Other useful commands are '\\[notmuch-search-filter]' for filtering the 
current search
-based on an additional query string, '\\[notmuch-search-filter-by-tag]' for 
filtering to include
-only messages with a given tag, and '\\[notmuch-search]' to execute a new, 
global
-search.
+Pressing \\[notmuch-search-show-thread] on any line displays that
+thread. The '\\[notmuch-search-add-tag]' and
+'\\[notmuch-search-remove-tag]' keys can be used to add or remove
+tags from a thread. The '\\[notmuch-search-archive-thread]' key
+is a convenience for archiving a thread (applying changes in
+`notmuch-archive-tags'). The '\\[notmuch-search-tag-all]' key can
+be used to add and/or remove tags from all messages (as opposed
+to threads) that match the current query.  Use with caution, as
+this will also tag matching messages that arrived *after*
+constructing the buffer.
+
+Other useful commands are '\\[notmuch-search-filter]' for
+filtering the current search based on an additional query string,
+'\\[notmuch-search-filter-by-tag]' for filtering to include only
+messages with a given tag, and '\\[notmuch-search]' to execute a
+new, global search.
 
 Complete list of currently available key bindings:
 
-- 
1.8.2.rc2

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


Re: [PATCH] emacs: replace (funcall 'foo ...) with (foo ...)

2013-06-02 Thread Tomi Ollila
On Sun, Jun 02 2013, da...@tethera.net wrote:

 From: David Bremner brem...@debian.org

 I can't see any benefit to the funcall, and it looks like the result
 of cut-and-paste from some code that actually used a variable for the
 function to call.
 ---

Looks sensible to me.

Tomi



 Mark and I were discussing some style issues in the context of pick,
 and it seems to me that some of the elisp style in the current code
 could be improved. I don't claim to be an elisp style expert by any
 stretch of the imagination. It would be great if some experts could
 add a section to devel/STYLE about elisp.


  emacs/notmuch-message.el | 2 +-
  emacs/notmuch-show.el| 6 +++---
  emacs/notmuch.el | 4 ++--
  3 files changed, 6 insertions(+), 6 deletions(-)

 diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el
 index 4dc4883..914bdd1 100644
 --- a/emacs/notmuch-message.el
 +++ b/emacs/notmuch-message.el
 @@ -40,7 +40,7 @@ the \inbox\ and \todo\ tags, you would set:
;; get the in-reply-to header and parse it for the message id.
(let ((rep (mail-header-parse-addresses (message-field-value 
 In-Reply-To
  (when (and notmuch-message-replied-tags rep)
 -  (funcall 'notmuch-tag (notmuch-id-to-query (car (car rep)))
 +  (notmuch-tag (notmuch-id-to-query (car (car rep)))
  (notmuch-tag-change-list notmuch-message-replied-tags)
  
  (add-hook 'message-send-hook 'notmuch-message-mark-replied)
 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
 index 613e666..18b4671 100644
 --- a/emacs/notmuch-show.el
 +++ b/emacs/notmuch-show.el
 @@ -1726,7 +1726,7 @@ TAG-CHANGES is a list of tag operations for 
 `notmuch-tag'.
(let* ((current-tags (notmuch-show-get-tags))
(new-tags (notmuch-update-tags current-tags tag-changes)))
  (unless (equal current-tags new-tags)
 -  (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)
 +  (notmuch-tag (notmuch-show-get-message-id) tag-changes)
(notmuch-show-set-tags new-tags
  
  (defun notmuch-show-tag (optional tag-changes)
 @@ -1734,7 +1734,7 @@ TAG-CHANGES is a list of tag operations for 
 `notmuch-tag'.
  
  See `notmuch-tag' for information on the format of TAG-CHANGES.
(interactive)
 -  (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-message-id) 
 tag-changes))
 +  (setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
(let* ((current-tags (notmuch-show-get-tags))
(new-tags (notmuch-update-tags current-tags tag-changes)))
  (unless (equal current-tags new-tags)
 @@ -1745,7 +1745,7 @@ See `notmuch-tag' for information on the format of 
 TAG-CHANGES.
  
  See `notmuch-tag' for information on the format of TAG-CHANGES.
(interactive)
 -  (setq tag-changes (funcall 'notmuch-tag 
 (notmuch-show-get-messages-ids-search) tag-changes))
 +  (setq tag-changes (notmuch-tag (notmuch-show-get-messages-ids-search) 
 tag-changes))
(notmuch-show-mapc
 (lambda ()
   (let* ((current-tags (notmuch-show-get-tags))
 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
 index 5a8c957..af107e2 100644
 --- a/emacs/notmuch.el
 +++ b/emacs/notmuch.el
 @@ -562,7 +562,7 @@ will be signaled.
  (defun notmuch-search-tag-region (beg end optional tag-changes)
Change tags for threads in the given region.
(let ((search-string (notmuch-search-find-thread-id-region-search beg 
 end)))
 -(setq tag-changes (funcall 'notmuch-tag search-string tag-changes))
 +(setq tag-changes (notmuch-tag search-string tag-changes))
  (notmuch-search-foreach-result beg end
(lambda (pos)
   (notmuch-search-set-tags
 @@ -576,7 +576,7 @@ See `notmuch-tag' for information on the format of 
 TAG-CHANGES.
(interactive)
(let* ((beg (if (region-active-p) (region-beginning) (point)))
(end (if (region-active-p) (region-end) (point
 -(funcall 'notmuch-search-tag-region beg end tag-changes)))
 +(notmuch-search-tag-region beg end tag-changes)))
  
  (defun notmuch-search-add-tag ()
Same as `notmuch-search-tag' but sets initial input to '+'.
 -- 
 1.8.2.rc2

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


Re: [PATCH] contrib: pick: bugfix. use notmuch-show-only-matching-messages rather than prefix

2013-06-02 Thread Tomi Ollila
On Sun, Jun 02 2013, Mark Walters markwalters1...@gmail.com wrote:

 Previously pick set a prefix argument prior to calling show in the
 message pane to tell show to only show matching messages. This sets
 notmuch-show-only-matching-messages instead which is much cleaner and
 will work even if the user has configured show to default to showing
 only matching messages.
 ---

LGTM.

Tomi


  contrib/notmuch-pick/notmuch-pick.el |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

 diff --git a/contrib/notmuch-pick/notmuch-pick.el 
 b/contrib/notmuch-pick/notmuch-pick.el
 index 9079acf..2da43ea 100644
 --- a/contrib/notmuch-pick/notmuch-pick.el
 +++ b/contrib/notmuch-pick/notmuch-pick.el
 @@ -376,8 +376,8 @@ Does NOT change the database.
   (split-window-vertically (/ (window-height) 4)))
(with-selected-window notmuch-pick-message-window
   ;; Since we are only displaying one message do not indent.
 - (let ((notmuch-show-indent-messages-width 0))
 -   (setq current-prefix-arg '(4))
 + (let ((notmuch-show-indent-messages-width 0)
 +   (notmuch-show-only-matching-messages t))
 (setq buffer (notmuch-show id nil nil nil
;; We need the `let' as notmuch-pick-message-window is buffer local.
(let ((window notmuch-pick-message-window))
 -- 
 1.7.9.1

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


[PATCH] emacs: replace setq + let with let*

2013-06-02 Thread david
From: David Bremner brem...@debian.org

I found several places where a setq is immediately followed by a let
or a let*. This seems to be the pessimal combination, with the
implicit scope of the setq combined with the extra indentation of the let.
I combined these cases into a single let* which I think is easier to read.
In two places I turned a single clause let into a let*.
---
 emacs/notmuch-hello.el | 4 ++--
 emacs/notmuch-show.el  | 4 ++--
 emacs/notmuch.el   | 5 ++---
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index c1c6f4b..15e3614 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -260,8 +260,8 @@ afterwards.)
 (defun notmuch-hello-search (optional search)
   (interactive)
   (unless (null search)
-(setq search (notmuch-hello-trim search))
-(let ((history-delete-duplicates t))
+(let* ((search (notmuch-hello-trim search))
+  (history-delete-duplicates t))
   (add-to-history 'notmuch-search-history search)))
   (notmuch-search search notmuch-search-oldest-first nil nil
  #'notmuch-hello-search-continuation))
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 18b4671..e8c8343 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1734,8 +1734,8 @@ TAG-CHANGES is a list of tag operations for 
`notmuch-tag'.
 
 See `notmuch-tag' for information on the format of TAG-CHANGES.
   (interactive)
-  (setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
-  (let* ((current-tags (notmuch-show-get-tags))
+  (let* ((tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
+(current-tags (notmuch-show-get-tags))
 (new-tags (notmuch-update-tags current-tags tag-changes)))
 (unless (equal current-tags new-tags)
   (notmuch-show-set-tags new-tags
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index af107e2..edb5a1c 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -904,9 +904,8 @@ Other optional parameters are used as follows:
   target-line: The line number to move to if the target thread does not
appear in the search results.
   (interactive)
-  (if (null query)
-  (setq query (notmuch-read-query Notmuch search: )))
-  (let ((buffer (get-buffer-create (notmuch-search-buffer-title query
+  (let* ((query (or query (notmuch-read-query Notmuch search: )))
+(buffer (get-buffer-create (notmuch-search-buffer-title query
 (switch-to-buffer buffer)
 (notmuch-search-mode)
 ;; Don't track undo information for this buffer
-- 
1.8.2.rc2

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


Re: [PATCH v3 0/6] Make Emacs search use sexp format

2013-06-02 Thread Jameson Graef Rollins
On Sat, Jun 01 2013, David Bremner da...@tethera.net wrote:
 Austin Clements amdra...@mit.edu writes:

 This is v3 of id:1369934016-22308-1-git-send-email-amdra...@mit.edu.
 This tweaks the shell invocation as suggested by Tomi and fixes two
 comment typos pointed out by Mark.  It also adds a NEWS patch.  I'm
 going to go ahead and mark this ready because of Tomi's and Mark's
 reviews of v2.

 The first 5 I pushed. The NEWS patch has a conflict.

I'm very happy to see the long-coming sexp handling working here.  Good
work, folks, particularly to Austin for getting the awesome asynchronous
processing stuff working.  Searches are now definitely noticeably
faster.

I am, however, seeing a couple of issues that we might want to address.

* Killing a search buffer that is still in the process of being filled
  causes errors to be thrown.  I'm seeing both of the following
  intermittently:

[Sun Jun  2 08:26:40 2013]
notmuch exited with status killed
command: notmuch search --format\=sexp --format-version\=1 --sort\=newest-first 
to\:jrollins
exit signal: killed

[Sun Jun  2 08:32:26 2013]
notmuch exited with status hangup
command: notmuch search --format\=sexp --format-version\=1 --sort\=newest-first 
to\:jrollins
exit signal: hangup

  This is somewhat understandable, as the notmuch binary exits with an
  error if it hasn't finished dumping the output, but given how common
  this particular scenario is I think we should try to avoid throwing
  errors in this circumstance.  I wonder if we shouldn't just modify the
  binary to not return non-zero if it was manually killed while
  processing the output, or at least special-case the particular error
  caused by manually killing the search.

* The next thing I'm seeing is this:

Opening input file: no such file or directory, /home/jrollins/tmp/nmerr5390CAY

  I'm not exactly sure what causes this error, but it looks to me like
  the temporary error file was removed before we were finished with it.

* Finally, something happened that caused *12,000* of the following lines
  to be sent to the *Notmuch errors* buffer:

A Xapian exception occurred performing query: The revision being read has been 
discarded - you should call Xapian::Database::reopen() and retry the operation

  Again, this was related to killing a search buffer that was still
  being filled. I'm pretty sure the database was not modified during
  this process.

Let me know if I can help provide any more info.

jamie.


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


Re: [PATCH] emacs: replace setq + let with let*

2013-06-02 Thread Mark Walters

On Sun, 02 Jun 2013, da...@tethera.net wrote:
 From: David Bremner brem...@debian.org

 I found several places where a setq is immediately followed by a let
 or a let*. This seems to be the pessimal combination, with the
 implicit scope of the setq combined with the extra indentation of the let.
 I combined these cases into a single let* which I think is easier to read.
 In two places I turned a single clause let into a let*.
 ---
  emacs/notmuch-hello.el | 4 ++--
  emacs/notmuch-show.el  | 4 ++--
  emacs/notmuch.el   | 5 ++---
  3 files changed, 6 insertions(+), 7 deletions(-)

 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
 index c1c6f4b..15e3614 100644
 --- a/emacs/notmuch-hello.el
 +++ b/emacs/notmuch-hello.el
 @@ -260,8 +260,8 @@ afterwards.)
  (defun notmuch-hello-search (optional search)
(interactive)
(unless (null search)
 -(setq search (notmuch-hello-trim search))
 -(let ((history-delete-duplicates t))
 +(let* ((search (notmuch-hello-trim search))
 +(history-delete-duplicates t))
(add-to-history 'notmuch-search-history search)))
(notmuch-search search notmuch-search-oldest-first nil nil

These look good to me except I don't see why the above is a let* not a
let?

Best wishes

Mark

 #'notmuch-hello-search-continuation))
 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
 index 18b4671..e8c8343 100644
 --- a/emacs/notmuch-show.el
 +++ b/emacs/notmuch-show.el
 @@ -1734,8 +1734,8 @@ TAG-CHANGES is a list of tag operations for 
 `notmuch-tag'.
  
  See `notmuch-tag' for information on the format of TAG-CHANGES.
(interactive)
 -  (setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
 -  (let* ((current-tags (notmuch-show-get-tags))
 +  (let* ((tag-changes (notmuch-tag (notmuch-show-get-message-id) 
 tag-changes))
 +  (current-tags (notmuch-show-get-tags))
(new-tags (notmuch-update-tags current-tags tag-changes)))
  (unless (equal current-tags new-tags)
(notmuch-show-set-tags new-tags
 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
 index af107e2..edb5a1c 100644
 --- a/emacs/notmuch.el
 +++ b/emacs/notmuch.el
 @@ -904,9 +904,8 @@ Other optional parameters are used as follows:
target-line: The line number to move to if the target thread does not
 appear in the search results.
(interactive)
 -  (if (null query)
 -  (setq query (notmuch-read-query Notmuch search: )))
 -  (let ((buffer (get-buffer-create (notmuch-search-buffer-title query
 +  (let* ((query (or query (notmuch-read-query Notmuch search: )))
 +  (buffer (get-buffer-create (notmuch-search-buffer-title query
  (switch-to-buffer buffer)
  (notmuch-search-mode)
  ;; Don't track undo information for this buffer
 -- 
 1.8.2.rc2

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


[PATCH] NEWS: key bindings for next/previous thread

2013-06-02 Thread Jani Nikula
---
 NEWS |5 +
 1 file changed, 5 insertions(+)

diff --git a/NEWS b/NEWS
index 9237e5a..6f09cdb 100644
--- a/NEWS
+++ b/NEWS
@@ -99,6 +99,11 @@ No Emacs 22 support
   period of time. After being incomplete for roughly 2 years the code
   in question was now removed from this release.
 
+Key bindings for next/previous thread
+
+  Show view has new key bindings M-n and M-p to move to the next and
+  previous thread in the search results.
+
 Notmuch 0.15.2 (2013-02-17)
 ===
 
-- 
1.7.10.4

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


Re: [PATCH] NEWS: key bindings for next/previous thread

2013-06-02 Thread David Bremner
Jani Nikula j...@nikula.org writes:

 ---
  NEWS |5 +
  1 file changed, 5 insertions(+)

pushed,

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


Re: [PATCH] emacs: replace setq + let with let*

2013-06-02 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes:

 -(setq search (notmuch-hello-trim search))
 -(let ((history-delete-duplicates t))
 +(let* ((search (notmuch-hello-trim search))
 +   (history-delete-duplicates t))
(add-to-history 'notmuch-search-history search)))
(notmuch-search search notmuch-search-oldest-first nil nil

 These look good to me except I don't see why the above is a let* not a
 let?

I ended up dropping this hunk because I realized it introduced a bug;
the side-effect of the setq is needed outside the unless.

pushed the two patches (as amended) in this thread.

d



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


Re: [PATCH] emacs: remove hardcoded defaults values from docstrings

2013-06-02 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes:

 both of these LGTM +1.

 Note there are still some (an?) occurrences of this: eg
 notmuch-search-archive-thread, and there is one in pick. But these might
 as well go in anyway.

pushed both,

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


Re: [PATCH 4/4] debian: update .gitignore

2013-06-02 Thread David Bremner
da...@tethera.net writes:

 From: David Bremner brem...@debian.org

 Several packages have been added or renamed, but their build detritus
 not yet ignored.

Pushed the non-bindings patches in the series. I'll wait for comment
from go/python people on the other two.

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


Re: [PATCH 3/3] build: pass CPPFLAGS to C and C++ compilers

2013-06-02 Thread David Bremner
da...@tethera.net writes:

 From: David Bremner brem...@debian.org

 This is used in particular by hardening flags.

I pushed all three. I assume someone will let me know if I broke the
build system for them...

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


Re: [PATCH] contrib: pick: bugfix. use notmuch-show-only-matching-messages rather than prefix

2013-06-02 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes:

 Previously pick set a prefix argument prior to calling show in the
 message pane to tell show to only show matching messages. This sets
 notmuch-show-only-matching-messages instead which is much cleaner and
 will work even if the user has configured show to default to showing
 only matching messages.

pushed.

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


Re: [PATCH] contrib: pick: bugfix: use notmuch-show-mark-read-tags instead of unread

2013-06-02 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes:

 Previously pick removed the unread tag from its tag display: since the
 tag change is now customisable use the customised variable.

 This only affected the tags displayed, not the tags in the database as
 notmuch-show (in the view pane) did the actual tag changes.
 ---

Pushed, 

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


[PATCH] debian: build notmuch-vim again

2013-06-02 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 debian/control | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/debian/control b/debian/control
index 08071be..273a5a7 100644
--- a/debian/control
+++ b/debian/control
@@ -120,6 +120,21 @@ Description: thread-based email index, search and tagging 
(emacs interface)
  This package provides an emacs based mail user agent based on
  notmuch.
 
+Package: notmuch-vim
+Architecture: all
+Section: mail
+Breaks: notmuch (0.6~254~)
+Replaces: notmuch (0.6~254~)
+Depends: ${misc:Depends}, notmuch, vim-addon-manager
+Description: thread-based email index, search and tagging (vim interface)
+ Notmuch is a system for indexing, searching, reading, and tagging
+ large collections of email messages in maildir or mh format. It uses
+ the Xapian library to provide fast, full-text search with a very
+ convenient search syntax.
+ .
+ This package provides a vim based mail user agent based on
+ notmuch.
+
 Package: notmuch-mutt
 Architecture: all
 Depends:
-- 
1.8.3.358.g5a91d05

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


Re: the future of notmuch-vim?

2013-06-02 Thread Felipe Contreras
On Fri, Apr 5, 2013 at 5:30 AM, Charlie Allom char...@mediasp.com wrote:
 If Felipe is interested in maintaining the Vim plugin, I vote it should
 be replaced with his Ruby version.

I've pushed the new vim plugin to the 'master' branch.

Cheers.

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


New notmuch vim plugin pushed to master

2013-06-02 Thread Felipe Contreras
Hi,

The old plugin has been deprecated and moving to contrib. The new
plugin has much better support and should replace it for all intents
and purposes.

I've pushed the changes and hopefully the packages will be updated accordingly.

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


Re: [PATCH] debian: build notmuch-vim again

2013-06-02 Thread David Bremner
Felipe Contreras felipe.contre...@gmail.com writes:

 Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
 ---
  debian/control | 15 +++
  1 file changed, 15 insertions(+)


Hi Felipe;

What about the bugs from the old plugin, are they fixed by the new one?

 http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=notmuch-vim;dist=unstable

d


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


Re: [PATCH] debian: build notmuch-vim again

2013-06-02 Thread Felipe Contreras
On Sun, Jun 2, 2013 at 8:14 PM, David Bremner brem...@debian.org wrote:
 Felipe Contreras felipe.contre...@gmail.com writes:

 Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
 ---
  debian/control | 15 +++
  1 file changed, 15 insertions(+)


 Hi Felipe;

 What about the bugs from the old plugin, are they fixed by the new one?

  
 http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=notmuch-vim;dist=unstable

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616692

Yeah.

We don't rely on any of that stuff.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636707

Yeah.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636709

That's a trivial enhancement, not really a bug.

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