Re: [PATCH v3 1/7] emacs/tree: return true if a thread was found in next-thread

2019-12-30 Thread David Edmondson
On Saturday, 2019-12-28 at 10:01:18 -05, William Casarin wrote:

> This will allow us to pop back to parent buffers when there are no
> more threads to jump to.
>
> Signed-off-by: William Casarin 

Reviewed-by: David Edmondson 

> ---
>  emacs/notmuch-tree.el | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
> index c00315e8..d262ba26 100644
> --- a/emacs/notmuch-tree.el
> +++ b/emacs/notmuch-tree.el
> @@ -620,10 +620,13 @@ message will be \"unarchived\", i.e. the tag changes in
>(notmuch-tree-thread-top))
>  
>  (defun notmuch-tree-next-thread ()
> +  "Get the next thread in the current tree. Returns t if a thread was
> +found or nil if not."
>(interactive)
>(forward-line 1)
>(while (not (or (notmuch-tree-get-prop :first) (eobp)))
> -(forward-line 1)))
> +(forward-line 1))
> +  (not (eobp)))
>  
>  (defun notmuch-tree-thread-mapcar (function)
>"Iterate through all messages in the current thread
> -- 
> 2.24.0

dme.
-- 
Why stay in college? Why go to night school?
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH v3 1/7] emacs/tree: return true if a thread was found in next-thread

2019-12-28 Thread William Casarin
This will allow us to pop back to parent buffers when there are no
more threads to jump to.

Signed-off-by: William Casarin 
---
 emacs/notmuch-tree.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index c00315e8..d262ba26 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -620,10 +620,13 @@ message will be \"unarchived\", i.e. the tag changes in
   (notmuch-tree-thread-top))
 
 (defun notmuch-tree-next-thread ()
+  "Get the next thread in the current tree. Returns t if a thread was
+found or nil if not."
   (interactive)
   (forward-line 1)
   (while (not (or (notmuch-tree-get-prop :first) (eobp)))
-(forward-line 1)))
+(forward-line 1))
+  (not (eobp)))
 
 (defun notmuch-tree-thread-mapcar (function)
   "Iterate through all messages in the current thread
-- 
2.24.0

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