unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region
@ 2019-04-09 16:47 Pierre Neidhardt
  2019-04-09 16:47 ` [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree Pierre Neidhardt
  2019-05-07  9:35 ` [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region David Bremner
  0 siblings, 2 replies; 14+ messages in thread
From: Pierre Neidhardt @ 2019-04-09 16:47 UTC (permalink / raw)
  To: notmuch

---
 emacs/notmuch-lib.el |  9 +++++++++
 emacs/notmuch.el     | 17 ++++-------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 546ab6fd..7fc342a5 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -1008,6 +1008,15 @@ status."
 (defvar notmuch-show-process-crypto nil)
 (make-variable-buffer-local 'notmuch-show-process-crypto)
 
+(defun notmuch-interactive-region ()
+  "Return the bounds of the current interactive region.
+
+This returns (BEG END), where BEG and END are the bounds of the
+region if the region is active, or both `point' otherwise."
+  (if (region-active-p)
+      (list (region-beginning) (region-end))
+    (list (point) (point))))
+
 (provide 'notmuch-lib)
 
 ;; Local Variables:
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 804e78ab..773d1206 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -557,20 +557,11 @@ thread."
 	(setq output (append output (notmuch-search-get-tags pos)))))
     output))
 
-(defun notmuch-search-interactive-region ()
-  "Return the bounds of the current interactive region.
-
-This returns (BEG END), where BEG and END are the bounds of the
-region if the region is active, or both `point' otherwise."
-  (if (region-active-p)
-      (list (region-beginning) (region-end))
-    (list (point) (point))))
-
 (defun notmuch-search-interactive-tag-changes (&optional initial-input)
   "Prompt for tag changes for the current thread or region.
 
 Returns (TAG-CHANGES REGION-BEGIN REGION-END)."
-  (let* ((region (notmuch-search-interactive-region))
+  (let* ((region (notmuch-interactive-region))
 	 (beg (first region)) (end (second region))
 	 (prompt (if (= beg end) "Tag thread" "Tag region")))
     (cons (notmuch-read-tag-changes
@@ -590,8 +581,8 @@ is inactive this applies to the thread at point.
 If ONLY-MATCHED is non-nil, only tag matched messages."
   (interactive (notmuch-search-interactive-tag-changes))
   (unless (and beg end)
-    (setq beg (car (notmuch-search-interactive-region))
-	  end (cadr (notmuch-search-interactive-region))))
+    (setq beg (car (notmuch-interactive-region))
+	  end (cadr (notmuch-interactive-region))))
   (let ((search-string (notmuch-search-find-stable-query-region
 			beg end only-matched)))
     (notmuch-tag search-string tag-changes)
@@ -627,7 +618,7 @@ messages will be \"unarchived\" (i.e. the tag changes in
 `notmuch-archive-tags' will be reversed).
 
 This function advances the next thread when finished."
-  (interactive (cons current-prefix-arg (notmuch-search-interactive-region)))
+  (interactive (cons current-prefix-arg (notmuch-interactive-region)))
   (when notmuch-archive-tags
     (notmuch-search-tag
      (notmuch-tag-change-list notmuch-archive-tags unarchive) beg end))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree
  2019-04-09 16:47 [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region Pierre Neidhardt
@ 2019-04-09 16:47 ` Pierre Neidhardt
  2019-05-08 11:00   ` David Bremner
  2019-05-07  9:35 ` [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region David Bremner
  1 sibling, 1 reply; 14+ messages in thread
From: Pierre Neidhardt @ 2019-04-09 16:47 UTC (permalink / raw)
  To: notmuch

---
 emacs/notmuch-tree.el | 101 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 86 insertions(+), 15 deletions(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index c00315e8..ff471c19 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -297,13 +297,15 @@ FUNC."
     map))
 (fset 'notmuch-tree-mode-map notmuch-tree-mode-map)
 
-(defun notmuch-tree-get-message-properties ()
+(defun notmuch-tree-get-message-properties (&optional pos)
   "Return the properties of the current message as a plist.
 
 Some useful entries are:
 :headers - Property list containing the headers :Date, :Subject, :From, etc.
 :tags - Tags for this message"
+  (setq pos (or pos (point)))
   (save-excursion
+    (goto-char pos)
     (beginning-of-line)
     (get-text-property (point) :notmuch-message-properties)))
 
@@ -332,6 +334,13 @@ Some useful entries are:
   "Return the tags of the current message."
   (notmuch-tree-get-prop :tags))
 
+(defun notmuch-tree-get-tags-region (beg end)
+  (let (output)
+    (notmuch-tree-foreach-result beg end
+      (lambda (pos)
+	(setq output (append output (notmuch-tree-get-tags)))))
+    output))
+
 (defun notmuch-tree-get-message-id (&optional bare)
   "Return the message id of the current message."
   (let ((id (notmuch-tree-get-prop :id)))
@@ -387,24 +396,86 @@ NOT change the database."
 	  (when (string= tree-msg-id (notmuch-show-get-message-id))
 	    (notmuch-show-update-tags new-tags)))))))
 
-(defun notmuch-tree-tag (tag-changes)
+(defun notmuch-tree-result-beginning (&optional pos)
+  "Return the point at the beginning of the message at POS (or point).
+
+If there is no thread at POS (or point), returns nil."
+  (when (notmuch-tree-get-message-properties pos)
+    ;; We pass 1+point because previous-single-property-change starts
+    ;; searching one before the position we give it.
+    (previous-single-property-change (1+ (or pos (point)))
+				     :notmuch-message-properties nil (point-min))))
+
+(defun notmuch-tree-result-end (&optional pos)
+  "Return the point at the end of the message at POS (or point).
+
+The returned point will be just after the newline character that
+ends the result line.  If there is no thread at POS (or point),
+returns nil"
+  (when (notmuch-tree-get-message-properties pos)
+    (next-single-property-change (or pos (point)) :notmuch-message-properties
+				 nil (point-max))))
+
+(defun notmuch-tree-foreach-result (beg end fn)
+  "Invoke FN for each result between BEG and END.
+
+FN should take one argument.  It will be applied to the
+character position of the beginning of each result that overlaps
+the region between points BEG and END.  As a special case, if (=
+BEG END), FN will be applied to the result containing point
+BEG."
+
+  (lexical-let ((pos (notmuch-tree-result-beginning beg))
+		;; End must be a marker in case fn changes the
+		;; text.
+		(end (copy-marker end))
+		;; Make sure we examine at least one result, even if
+		;; (= beg end).
+		(first t))
+    ;; We have to be careful if the region extends beyond the results.
+    ;; In this case, pos could be null or there could be no result at
+    ;; pos.
+    (while (and pos (or (< pos end) first))
+      (when (notmuch-tree-get-message-properties pos)
+	(funcall fn pos))
+      (setq pos (notmuch-tree-result-end pos)
+	    first nil))))
+(put 'notmuch-tree-foreach-result 'lisp-indent-function 2)
+
+(defun notmuch-tree-interactive-tag-changes (&optional initial-input)
+  "Prompt for tag changes for the current message or region.
+
+Returns (TAG-CHANGES REGION-BEGIN REGION-END)."
+  (let* ((region (notmuch-interactive-region))
+	 (beg (first region)) (end (second region))
+	 (prompt (if (= beg end) "Tag message" "Tag region")))
+    (cons (notmuch-read-tag-changes
+	   (notmuch-tree-get-tags-region beg end) prompt initial-input)
+	  region)))
+
+(defun notmuch-tree-tag (tag-changes &optional beg end)
   "Change tags for the current message"
-  (interactive
-   (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message")))
-  (notmuch-tag (notmuch-tree-get-message-id) tag-changes)
-  (notmuch-tree-tag-update-display tag-changes))
-
-(defun notmuch-tree-add-tag (tag-changes)
+  (interactive (notmuch-tree-interactive-tag-changes))
+  (unless (and beg end)
+    (setq beg (car (notmuch-interactive-region))
+          end (cadr (notmuch-interactive-region))))
+  (notmuch-tree-foreach-result beg end
+    (lambda (pos)
+      (save-mark-and-excursion
+        (goto-char pos)
+	(notmuch-tag (notmuch-tree-get-message-id)
+                     tag-changes)
+	(notmuch-tree-tag-update-display tag-changes)))))
+
+(defun notmuch-tree-add-tag (tag-changes &optional beg end)
   "Same as `notmuch-tree-tag' but sets initial input to '+'."
-  (interactive
-   (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message" "+")))
-  (notmuch-tree-tag tag-changes))
+  (interactive (notmuch-tree-interactive-tag-changes "+"))
+  (notmuch-tree-tag tag-changes beg end))
 
-(defun notmuch-tree-remove-tag (tag-changes)
+(defun notmuch-tree-remove-tag (tag-changes &optional beg end)
   "Same as `notmuch-tree-tag' but sets initial input to '-'."
-  (interactive
-   (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message" "-")))
-  (notmuch-tree-tag tag-changes))
+  (interactive (notmuch-tree-interactive-tag-changes "-"))
+  (notmuch-tree-tag tag-changes beg end))
 
 (defun notmuch-tree-resume-message ()
   "Resume EDITING the current draft message."
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region
  2019-04-09 16:47 [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region Pierre Neidhardt
  2019-04-09 16:47 ` [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree Pierre Neidhardt
@ 2019-05-07  9:35 ` David Bremner
  2019-05-20 12:35   ` Leo Vivier
  1 sibling, 1 reply; 14+ messages in thread
From: David Bremner @ 2019-05-07  9:35 UTC (permalink / raw)
  To: Pierre Neidhardt, notmuch


pushed this one patch to master.

d

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree
  2019-04-09 16:47 ` [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree Pierre Neidhardt
@ 2019-05-08 11:00   ` David Bremner
  2019-05-14 10:40     ` Pierre Neidhardt
  0 siblings, 1 reply; 14+ messages in thread
From: David Bremner @ 2019-05-08 11:00 UTC (permalink / raw)
  To: Pierre Neidhardt, notmuch


Thanks for contributing to Notmuch. Some generic comments:

1) Please consider a more comprehensive commit message [1].  The "why"
   here is maybe obvious, but consider pointing out whether this makes
   it more consistent with other parts of the UI (or not). Also, a (bit
   more extended) of the changes is always helpful, both to help read
   the diff and to warn of any potential breaking changes.

2) Please update doc/notmuch-emacs.rst.  You can re-use docstrings; let
   me know if you need help doing that. We haven't been strict about
   this is in the past, but the emacs docs are really lagging.

3) We generally want at least one test for a new
   feature. test/T460-emacs-tree.sh has the existing tree related
   tests. Again, if you need help with the test suite, let us know.

4) Please use notmuch-tree-- as a prefix for new private symbols that
   users should not rely on. I'm not sure about which symbols that applies
   to here.

[1] https://notmuchmail.org/contributing/#index5h2

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> +(defun notmuch-tree-foreach-result (beg end fn)

> +  (lexical-let ((pos (notmuch-tree-result-beginning beg))

As an aside, I'm curious if we can profitably start to use
file level lexical-binding for parts of notmuch-emacs.

> +  (notmuch-tree-foreach-result beg end
> +    (lambda (pos)
> +      (save-mark-and-excursion

I did wonder if notmuch-tree-foreach-result should be a macro. I'm not
sure if the small gain in code compactness from just passing a "body" in
the style of notmuch-show--with-currently-shown-message is worth it.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree
  2019-05-08 11:00   ` David Bremner
@ 2019-05-14 10:40     ` Pierre Neidhardt
  2019-05-25 11:13       ` David Bremner
  0 siblings, 1 reply; 14+ messages in thread
From: Pierre Neidhardt @ 2019-05-14 10:40 UTC (permalink / raw)
  To: David Bremner, notmuch


[-- Attachment #1.1: Type: text/plain, Size: 2793 bytes --]

Hi!

Thanks for your review.  I've submitted and updated patch.

> Thanks for contributing to Notmuch. Some generic comments:
>
> 1) Please consider a more comprehensive commit message [1].  The "why"
>    here is maybe obvious, but consider pointing out whether this makes
>    it more consistent with other parts of the UI (or not). Also, a (bit
>    more extended) of the changes is always helpful, both to help read
>    the diff and to warn of any potential breaking changes.

Done.

> 2) Please update doc/notmuch-emacs.rst.  You can re-use docstrings; let
>    me know if you need help doing that. We haven't been strict about
>    this is in the past, but the emacs docs are really lagging.

I've documented +/-.

> 3) We generally want at least one test for a new
>    feature. test/T460-emacs-tree.sh has the existing tree related
>    tests. Again, if you need help with the test suite, let us know.

I've added a test, but I wasn't able to run it on Guix
(https://guix.info).  It fails like this:

--8<---------------cut here---------------start------------->8---
> guix environment notmuch -- /home/ambrevar/.local/share/emacs/site-lisp/notmuch/test/T460-emacs-tree.sh
guix environment: error: execlp: No such file or directory: "/home/ambrevar/.local/share/emacs/site-lisp/notmuch/test/T460-emacs-tree.sh"
--8<---------------cut here---------------end--------------->8---

> 4) Please use notmuch-tree-- as a prefix for new private symbols that
>    users should not rely on. I'm not sure about which symbols that applies
>    to here.

I've mirrored the implementation of search-mode.
There are indeed a few functions that are only used locally, but so are
they in notmuch.el, so I guess this should be part of another patch.

>> +(defun notmuch-tree-foreach-result (beg end fn)
>
>> +  (lexical-let ((pos (notmuch-tree-result-beginning beg))
>
> As an aside, I'm curious if we can profitably start to use
> file level lexical-binding for parts of notmuch-emacs.

Absolutely, lexical bindings are heavily recommended:

- It enforces better coding practice.
- It's more performent.
- It will spot bugs! :)

I believe this should be part of a different patch set though.

>> +  (notmuch-tree-foreach-result beg end
>> +    (lambda (pos)
>> +      (save-mark-and-excursion
>
> I did wonder if notmuch-tree-foreach-result should be a macro. I'm not
> sure if the small gain in code compactness from just passing a "body" in
> the style of notmuch-show--with-currently-shown-message is worth it.

A macro could work here, but this would only save typing "(lambda".
Functions are preferable to macros if they can fit the bill, and I think
it's the case here.

Cheers!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-emacs-Allow-tagging-regions-in-notmuch-tree.patch --]
[-- Type: text/x-patch, Size: 5920 bytes --]

From bb078dc42649a15c704185610ae15e566a161d7e Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Tue, 9 Apr 2019 18:37:48 +0200
Subject: [PATCH 2/4] emacs: Allow tagging regions in notmuch-tree

Primarily this allows the user to tag multiple emails at once.
This also enforces consistency with the search view.

The implementation mostly adapts the search-mode code to the
tree-mode.
---
 emacs/notmuch-tree.el | 101 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 86 insertions(+), 15 deletions(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index c00315e8..ff471c19 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -297,13 +297,15 @@ FUNC."
     map))
 (fset 'notmuch-tree-mode-map notmuch-tree-mode-map)
 
-(defun notmuch-tree-get-message-properties ()
+(defun notmuch-tree-get-message-properties (&optional pos)
   "Return the properties of the current message as a plist.
 
 Some useful entries are:
 :headers - Property list containing the headers :Date, :Subject, :From, etc.
 :tags - Tags for this message"
+  (setq pos (or pos (point)))
   (save-excursion
+    (goto-char pos)
     (beginning-of-line)
     (get-text-property (point) :notmuch-message-properties)))
 
@@ -332,6 +334,13 @@ Some useful entries are:
   "Return the tags of the current message."
   (notmuch-tree-get-prop :tags))
 
+(defun notmuch-tree-get-tags-region (beg end)
+  (let (output)
+    (notmuch-tree-foreach-result beg end
+      (lambda (pos)
+	(setq output (append output (notmuch-tree-get-tags)))))
+    output))
+
 (defun notmuch-tree-get-message-id (&optional bare)
   "Return the message id of the current message."
   (let ((id (notmuch-tree-get-prop :id)))
@@ -387,24 +396,86 @@ NOT change the database."
 	  (when (string= tree-msg-id (notmuch-show-get-message-id))
 	    (notmuch-show-update-tags new-tags)))))))
 
-(defun notmuch-tree-tag (tag-changes)
+(defun notmuch-tree-result-beginning (&optional pos)
+  "Return the point at the beginning of the message at POS (or point).
+
+If there is no thread at POS (or point), returns nil."
+  (when (notmuch-tree-get-message-properties pos)
+    ;; We pass 1+point because previous-single-property-change starts
+    ;; searching one before the position we give it.
+    (previous-single-property-change (1+ (or pos (point)))
+				     :notmuch-message-properties nil (point-min))))
+
+(defun notmuch-tree-result-end (&optional pos)
+  "Return the point at the end of the message at POS (or point).
+
+The returned point will be just after the newline character that
+ends the result line.  If there is no thread at POS (or point),
+returns nil"
+  (when (notmuch-tree-get-message-properties pos)
+    (next-single-property-change (or pos (point)) :notmuch-message-properties
+				 nil (point-max))))
+
+(defun notmuch-tree-foreach-result (beg end fn)
+  "Invoke FN for each result between BEG and END.
+
+FN should take one argument.  It will be applied to the
+character position of the beginning of each result that overlaps
+the region between points BEG and END.  As a special case, if (=
+BEG END), FN will be applied to the result containing point
+BEG."
+
+  (lexical-let ((pos (notmuch-tree-result-beginning beg))
+		;; End must be a marker in case fn changes the
+		;; text.
+		(end (copy-marker end))
+		;; Make sure we examine at least one result, even if
+		;; (= beg end).
+		(first t))
+    ;; We have to be careful if the region extends beyond the results.
+    ;; In this case, pos could be null or there could be no result at
+    ;; pos.
+    (while (and pos (or (< pos end) first))
+      (when (notmuch-tree-get-message-properties pos)
+	(funcall fn pos))
+      (setq pos (notmuch-tree-result-end pos)
+	    first nil))))
+(put 'notmuch-tree-foreach-result 'lisp-indent-function 2)
+
+(defun notmuch-tree-interactive-tag-changes (&optional initial-input)
+  "Prompt for tag changes for the current message or region.
+
+Returns (TAG-CHANGES REGION-BEGIN REGION-END)."
+  (let* ((region (notmuch-interactive-region))
+	 (beg (first region)) (end (second region))
+	 (prompt (if (= beg end) "Tag message" "Tag region")))
+    (cons (notmuch-read-tag-changes
+	   (notmuch-tree-get-tags-region beg end) prompt initial-input)
+	  region)))
+
+(defun notmuch-tree-tag (tag-changes &optional beg end)
   "Change tags for the current message"
-  (interactive
-   (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message")))
-  (notmuch-tag (notmuch-tree-get-message-id) tag-changes)
-  (notmuch-tree-tag-update-display tag-changes))
-
-(defun notmuch-tree-add-tag (tag-changes)
+  (interactive (notmuch-tree-interactive-tag-changes))
+  (unless (and beg end)
+    (setq beg (car (notmuch-interactive-region))
+          end (cadr (notmuch-interactive-region))))
+  (notmuch-tree-foreach-result beg end
+    (lambda (pos)
+      (save-mark-and-excursion
+        (goto-char pos)
+	(notmuch-tag (notmuch-tree-get-message-id)
+                     tag-changes)
+	(notmuch-tree-tag-update-display tag-changes)))))
+
+(defun notmuch-tree-add-tag (tag-changes &optional beg end)
   "Same as `notmuch-tree-tag' but sets initial input to '+'."
-  (interactive
-   (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message" "+")))
-  (notmuch-tree-tag tag-changes))
+  (interactive (notmuch-tree-interactive-tag-changes "+"))
+  (notmuch-tree-tag tag-changes beg end))
 
-(defun notmuch-tree-remove-tag (tag-changes)
+(defun notmuch-tree-remove-tag (tag-changes &optional beg end)
   "Same as `notmuch-tree-tag' but sets initial input to '-'."
-  (interactive
-   (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message" "-")))
-  (notmuch-tree-tag tag-changes))
+  (interactive (notmuch-tree-interactive-tag-changes "-"))
+  (notmuch-tree-tag tag-changes beg end))
 
 (defun notmuch-tree-resume-message ()
   "Resume EDITING the current draft message."
-- 
2.21.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0003-doc-emacs-document-tagging-bindings-for-notmuch-sear.patch --]
[-- Type: text/x-patch, Size: 975 bytes --]

From 55cb33079a49697d2713a27c4375a2e83ff1d184 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Tue, 14 May 2019 12:06:20 +0200
Subject: [PATCH 3/4] doc/emacs: document "+/-" tagging bindings for
 notmuch-search and notmuch-tree

---
 doc/notmuch-emacs.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst
index 1655e2f0..a9357350 100644
--- a/doc/notmuch-emacs.rst
+++ b/doc/notmuch-emacs.rst
@@ -162,6 +162,10 @@ menu of results that the user can explore further by pressing
 ``g`` ``=``
     Refresh the buffer
 
+``+,-``
+    Add or remove arbitrary tags from the current thread or the
+		threads in the region.
+
 ``?``
     Display full set of key bindings
 
@@ -302,6 +306,10 @@ tags.
 ``g`` ``=``
     Refresh the buffer
 
+``+,-``
+    Add or remove arbitrary tags from the current message or the
+		messages in the region.
+
 ``?``
     Display full set of key bindings
 
-- 
2.21.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0004-T460-emacs-tree-test-tagging-on-region-in-tree-view.patch --]
[-- Type: text/x-patch, Size: 2310 bytes --]

From b4e594a6f5ed452d025641ee9e3f45ca8c48c229 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Tue, 14 May 2019 12:29:33 +0200
Subject: [PATCH 4/4] T460-emacs-tree: test tagging on region in tree view

---
 test/T460-emacs-tree.sh | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/test/T460-emacs-tree.sh b/test/T460-emacs-tree.sh
index cb2c90b8..b68b905e 100755
--- a/test/T460-emacs-tree.sh
+++ b/test/T460-emacs-tree.sh
@@ -88,6 +88,45 @@ test_begin_subtest "Untag message in notmuch tree view (database)"
 output=$(notmuch search --output=messages 'tag:test_thread_tag')
 test_expect_equal "$output" ""
 
+test_begin_subtest "Tag region in notmuch tree view"
+test_emacs '(notmuch-tree "tag:inbox")
+	    (notmuch-test-wait)
+	    ;; move to test thread above so that we can reuse the test output.
+	    (forward-line 23)
+	    (set-mark-command)
+	    (forward-line 7)
+	    (notmuch-tree-tag (list "+test_thread_tag"))
+	    (test-output)
+	    (delete-other-windows)'
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox-thread-tagged OUTPUT
+
+test_begin_subtest "Tag region in notmuch tree view (database)"
+output=$(notmuch search --output=messages 'tag:test_thread_tag')
+test_expect_equal "$output" \
+"id:87ocn0qh6d.fsf@yoom.home.cworth.org
+id:20091118005040.GA25380@dottiness.seas.harvard.edu
+id:yunaayketfm.fsf@aiko.keithp.com
+id:87fx8can9z.fsf@vertex.dottedmag
+id:20091117203301.GV3165@dottiness.seas.harvard.edu
+id:87iqd9rn3l.fsf@vertex.dottedmag
+id:20091117190054.GU3165@dottiness.seas.harvard.edu"
+
+test_begin_subtest "Untag region in notmuch tree view"
+test_emacs '(notmuch-tree "tag:inbox")
+	    (notmuch-test-wait)
+	    ;; mark the same region as above
+	    (forward-line 23)
+	    (set-mark-command)
+	    (forward-line 7)
+	    (notmuch-tree-tag-thread (list "-test_thread_tag"))
+	    (test-output)
+	    (delete-other-windows)'
+test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT
+
+test_begin_subtest "Untag region in notmuch tree view (database)"
+output=$(notmuch search --output=messages 'tag:test_thread_tag')
+test_expect_equal "$output" ""
+
 test_begin_subtest "Navigation of notmuch-hello to search results"
 test_emacs '(notmuch-hello)
 	    (goto-char (point-min))
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region
  2019-05-07  9:35 ` [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region David Bremner
@ 2019-05-20 12:35   ` Leo Vivier
  2019-05-20 17:11     ` Tomi Ollila
  0 siblings, 1 reply; 14+ messages in thread
From: Leo Vivier @ 2019-05-20 12:35 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 617 bytes --]

Hello,

With the patch now in master, the documentation for Emacs (‘Tips and
Tricks for using Notmuch with Emacs’) needs to be updated:
https://notmuchmail.org/emacstips/#index5h2

‘notmuch-search-interactive-region’ is mentioned in the second block of
Elisp.

Also, could we mark the old function as obsolete?  Some of my commands
broke after pulling the changes, and that’s what led me to the doc in
the first place.

I’ve attached a quick patch for marking the old command as obsolete.  I
don't think the `emacstips' doc is in the repo, so I couldn't fix it.

Best,

-- 
Leo Vivier

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-make-old-function-obsolete.patch --]
[-- Type: text/x-patch, Size: 1101 bytes --]

From 5481c2fe61d9e776d15166bc46f8dfc6221bf975 Mon Sep 17 00:00:00 2001
From: Leo Vivier <leo.vivier+org@gmail.com>
Date: Mon, 20 May 2019 14:21:13 +0200
Subject: [PATCH] emacs: make old function obsolete

`notmuch-search-interactive-region' was moved to notmuch-lib.el in
f3cba19f882471a396a6b6175a709ccd1f6f34a0 and renamed to
`notmuch-interactive-region' without making the old function
obsolete, thereby breaking user-commands which made use of it.

This patch marks the function as obsolete and makes it an alias for
the new function.
---
 emacs/notmuch-lib.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 7fc342a5..96a1da90 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -1017,6 +1017,11 @@ region if the region is active, or both `point' otherwise."
       (list (region-beginning) (region-end))
     (list (point) (point))))
 
+(define-obsolete-function-alias
+    'notmuch-search-interactive-region
+    'notmuch-interactive-region
+  "notmuch 0.28.1")
+
 (provide 'notmuch-lib)
 
 ;; Local Variables:
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region
  2019-05-20 12:35   ` Leo Vivier
@ 2019-05-20 17:11     ` Tomi Ollila
  2019-05-22 14:56       ` Leo Vivier
  0 siblings, 1 reply; 14+ messages in thread
From: Tomi Ollila @ 2019-05-20 17:11 UTC (permalink / raw)
  To: Leo Vivier, notmuch

On Mon, May 20 2019, Leo Vivier wrote:

> Hello,
>
> With the patch now in master, the documentation for Emacs (‘Tips and
> Tricks for using Notmuch with Emacs’) needs to be updated:
> https://notmuchmail.org/emacstips/#index5h2
>
> ‘notmuch-search-interactive-region’ is mentioned in the second block of
> Elisp.
>
> Also, could we mark the old function as obsolete?  Some of my commands
> broke after pulling the changes, and that’s what led me to the doc in
> the first place.
>
> I’ve attached a quick patch for marking the old command as obsolete.  I
> don't think the `emacstips' doc is in the repo, so I couldn't fix it.

It is wiki -- look around the web page to see how to update.
>
> Best,
>
> -- 
> Leo Vivier
> From 5481c2fe61d9e776d15166bc46f8dfc6221bf975 Mon Sep 17 00:00:00 2001
> From: Leo Vivier <leo.vivier+org@gmail.com>
> Date: Mon, 20 May 2019 14:21:13 +0200
> Subject: [PATCH] emacs: make old function obsolete
>
> `notmuch-search-interactive-region' was moved to notmuch-lib.el in
> f3cba19f882471a396a6b6175a709ccd1f6f34a0 and renamed to
> `notmuch-interactive-region' without making the old function
> obsolete, thereby breaking user-commands which made use of it.
>
> This patch marks the function as obsolete and makes it an alias for

s/patch/commit/ -- it is no longer patch when applied!

it may be possible that db could amend this...

Tomi

> the new function.
> ---
>  emacs/notmuch-lib.el | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
> index 7fc342a5..96a1da90 100644
> --- a/emacs/notmuch-lib.el
> +++ b/emacs/notmuch-lib.el
> @@ -1017,6 +1017,11 @@ region if the region is active, or both `point' otherwise."
>        (list (region-beginning) (region-end))
>      (list (point) (point))))
>  
> +(define-obsolete-function-alias
> +    'notmuch-search-interactive-region
> +    'notmuch-interactive-region
> +  "notmuch 0.28.1")
> +
>  (provide 'notmuch-lib)
>  
>  ;; Local Variables:
> -- 
> 2.21.0
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region
  2019-05-20 17:11     ` Tomi Ollila
@ 2019-05-22 14:56       ` Leo Vivier
  2019-05-23 11:14         ` David Bremner
  0 siblings, 1 reply; 14+ messages in thread
From: Leo Vivier @ 2019-05-22 14:56 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

Hello,

Sorry for answering late.

On Mon, May 20 2019, Tomi Ollila wrote:

> It is wiki -- look around the web page to see how to update.

Thanks, I didn’t know it was wiki.  I’ve pushed the amendment.

[...]

> s/patch/commit/ -- it is no longer patch when applied!
> 
> it may be possible that db could amend this...

You’re right.  I’ve amended the commit message.

-- 
Leo Vivier


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-make-old-function-obsolete.patch --]
[-- Type: text/x-patch, Size: 1098 bytes --]

From f7b0390ee411dbeb8c2c6691f717675ab3a723c2 Mon Sep 17 00:00:00 2001
From: Leo Vivier <leo.vivier@gmail.com>
Date: Mon, 20 May 2019 14:21:13 +0200
Subject: [PATCH] emacs: make old function obsolete

`notmuch-search-interactive-region' was moved to notmuch-lib.el in
f3cba19f882471a396a6b6175a709ccd1f6f34a0 and renamed to
`notmuch-interactive-region' without making the old function
obsolete, thereby breaking user-commands which made use of it.

This commit marks the function as obsolete and makes it an alias for
the new function.
---
 emacs/notmuch-lib.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 7fc342a5..96a1da90 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -1017,6 +1017,11 @@ region if the region is active, or both `point' otherwise."
       (list (region-beginning) (region-end))
     (list (point) (point))))
 
+(define-obsolete-function-alias
+    'notmuch-search-interactive-region
+    'notmuch-interactive-region
+  "notmuch 0.28.1")
+
 (provide 'notmuch-lib)
 
 ;; Local Variables:
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region
  2019-05-22 14:56       ` Leo Vivier
@ 2019-05-23 11:14         ` David Bremner
  2019-05-23 11:19           ` Leo Vivier
  0 siblings, 1 reply; 14+ messages in thread
From: David Bremner @ 2019-05-23 11:14 UTC (permalink / raw)
  To: Leo Vivier, notmuch; +Cc: tomi.ollila

Leo Vivier <leo.vivier@gmail.com> writes:

> From f7b0390ee411dbeb8c2c6691f717675ab3a723c2 Mon Sep 17 00:00:00 2001
> From: Leo Vivier <leo.vivier@gmail.com>
> Date: Mon, 20 May 2019 14:21:13 +0200
> Subject: [PATCH] emacs: make old function obsolete

I would mention the actual function name in the subject.

>  
> +(define-obsolete-function-alias
> +    'notmuch-search-interactive-region
> +    'notmuch-interactive-region
> +  "notmuch 0.28.1")
> +

I think 0.28.1 should be 0.29, no?

d

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region
  2019-05-23 11:14         ` David Bremner
@ 2019-05-23 11:19           ` Leo Vivier
  2019-05-23 17:07             ` David Bremner
  0 siblings, 1 reply; 14+ messages in thread
From: Leo Vivier @ 2019-05-23 11:19 UTC (permalink / raw)
  To: David Bremner, notmuch; +Cc: tomi.ollila

[-- Attachment #1: Type: text/plain, Size: 393 bytes --]

Hello,

David Bremner <david@tethera.net> writes:

[...]

> I would mention the actual function name in the subject.

Done.  

> I think 0.28.1 should be 0.29, no?

Changed it to 0.29.  I wasn’t sure whether to use the version number or
the commit ID.

Best,

-- 
Leo Vivier
English Studies & General Linguistics
Master Student, English Department
Université Rennes 2

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-make-notmuch-search-interactive-region-obsolet.patch --]
[-- Type: text/x-patch, Size: 1117 bytes --]

From a74a1cf358a768d89b68698fd3eeea198bf92b0d Mon Sep 17 00:00:00 2001
From: Leo Vivier <leo.vivier@gmail.com>
Date: Mon, 20 May 2019 14:21:13 +0200
Subject: [PATCH] emacs: make notmuch-search-interactive-region obsolete

`notmuch-search-interactive-region' was moved to notmuch-lib.el in
f3cba19f882471a396a6b6175a709ccd1f6f34a0 and renamed to
`notmuch-interactive-region' without making the old function
obsolete, thereby breaking user-commands which made use of it.

This commit marks the function as obsolete and makes it an alias for
the new function.
---
 emacs/notmuch-lib.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 7fc342a5..8acad267 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -1017,6 +1017,11 @@ region if the region is active, or both `point' otherwise."
       (list (region-beginning) (region-end))
     (list (point) (point))))
 
+(define-obsolete-function-alias
+    'notmuch-search-interactive-region
+    'notmuch-interactive-region
+  "notmuch 0.29")
+
 (provide 'notmuch-lib)
 
 ;; Local Variables:
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region
  2019-05-23 11:19           ` Leo Vivier
@ 2019-05-23 17:07             ` David Bremner
  0 siblings, 0 replies; 14+ messages in thread
From: David Bremner @ 2019-05-23 17:07 UTC (permalink / raw)
  To: Leo Vivier, notmuch; +Cc: tomi.ollila

Leo Vivier <leo.vivier@gmail.com> writes:

> Hello,
>
> David Bremner <david@tethera.net> writes:
>
> [...]
>
>> I would mention the actual function name in the subject.
>
> Done.  
>
>> I think 0.28.1 should be 0.29, no?
>
> Changed it to 0.29.  I wasn’t sure whether to use the version number or
> the commit ID.

Thanks Leo, I've pushed that version to master.

d

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree
  2019-05-14 10:40     ` Pierre Neidhardt
@ 2019-05-25 11:13       ` David Bremner
  2019-05-25 11:41         ` Pierre Neidhardt
  0 siblings, 1 reply; 14+ messages in thread
From: David Bremner @ 2019-05-25 11:13 UTC (permalink / raw)
  To: Pierre Neidhardt, notmuch

Pierre Neidhardt <mail@ambrevar.xyz> writes:

Thanks for the updated patches.

>
>> 3) We generally want at least one test for a new
>>    feature. test/T460-emacs-tree.sh has the existing tree related
>>    tests. Again, if you need help with the test suite, let us know.
>
> I've added a test, but I wasn't able to run it on Guix
> (https://guix.info).  It fails like this:
>
> --8<---------------cut here---------------start------------->8---
>> guix environment notmuch -- /home/ambrevar/.local/share/emacs/site-lisp/notmuch/test/T460-emacs-tree.sh
> guix environment: error: execlp: No such file or directory: "/home/ambrevar/.local/share/emacs/site-lisp/notmuch/test/T460-emacs-tree.sh"
> --8<---------------cut here---------------end--------------->8---

I can't really help you with Guix, but I suggest setting up some
environment where you can run things in an interactive shell.

In particular that error seems to be claiming the test file doesn't
exist, which would be easy to debug in an interactive shell.

>
>> 4) Please use notmuch-tree-- as a prefix for new private symbols that
>>    users should not rely on. I'm not sure about which symbols that applies
>>    to here.
>
> I've mirrored the implementation of search-mode.
> There are indeed a few functions that are only used locally, but so are
> they in notmuch.el, so I guess this should be part of another patch.
>

For better or for worse, our standards are higher for new code. Since
(as you have just observed) minor style problems in existing code tend
to linger unfixed.

I assume you are not using git-send-email because it's difficult for
you; it's not that a big of a deal, although we do prefer series
generated git-send-email for reviewing.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree
  2019-05-25 11:13       ` David Bremner
@ 2019-05-25 11:41         ` Pierre Neidhardt
  2019-05-25 13:42           ` David Bremner
  0 siblings, 1 reply; 14+ messages in thread
From: Pierre Neidhardt @ 2019-05-25 11:41 UTC (permalink / raw)
  To: David Bremner, notmuch

[-- Attachment #1: Type: text/plain, Size: 1885 bytes --]

David Bremner <david@tethera.net> writes:

>> --8<---------------cut here---------------start------------->8---
>>> guix environment notmuch -- /home/ambrevar/.local/share/emacs/site-lisp/notmuch/test/T460-emacs-tree.sh
>> guix environment: error: execlp: No such file or directory: "/home/ambrevar/.local/share/emacs/site-lisp/notmuch/test/T460-emacs-tree.sh"
>> --8<---------------cut here---------------end--------------->8---
>
> I can't really help you with Guix, but I suggest setting up some
> environment where you can run things in an interactive shell.
>
> In particular that error seems to be claiming the test file doesn't
> exist, which would be easy to debug in an interactive shell.

Yup, that's what I did with "guix environment notmuch": it sets up a
build environment (and an interactive shell) for notmuch.  And I really
wonder why it can't find the file, it's there in the interactive shell.
It's possible that the error message is a red herring though, I'll look
into it.

> For better or for worse, our standards are higher for new code. Since
> (as you have just observed) minor style problems in existing code tend
> to linger unfixed.

So would you like me to patch the namespacing along with these changes
or leave it for another patch?

> I assume you are not using git-send-email because it's difficult for
> you; it's not that a big of a deal, although we do prefer series
> generated git-send-email for reviewing.

I'm using git-send-email on a regular basis, no problem with that.  (I
wonder why you would think it's difficult for me :p)

git-send-email comes with different workflows though, I'm not sure which
one Notmuch follows.  Do you prefer versioned patch series
(e.g. [PATCHv2], etc.) or patch updates sent with
"--in-reply-to=<message-id-of-the-last-email>"?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree
  2019-05-25 11:41         ` Pierre Neidhardt
@ 2019-05-25 13:42           ` David Bremner
  0 siblings, 0 replies; 14+ messages in thread
From: David Bremner @ 2019-05-25 13:42 UTC (permalink / raw)
  To: Pierre Neidhardt, notmuch

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> David Bremner <david@tethera.net> writes:
>
>>> --8<---------------cut here---------------start------------->8---
>>>> guix environment notmuch -- /home/ambrevar/.local/share/emacs/site-lisp/notmuch/test/T460-emacs-tree.sh
>>> guix environment: error: execlp: No such file or directory: "/home/ambrevar/.local/share/emacs/site-lisp/notmuch/test/T460-emacs-tree.sh"
>>> --8<---------------cut here---------------end--------------->8---
>>
>> I can't really help you with Guix, but I suggest setting up some
>> environment where you can run things in an interactive shell.
>>
>> In particular that error seems to be claiming the test file doesn't
>> exist, which would be easy to debug in an interactive shell.
>
> Yup, that's what I did with "guix environment notmuch": it sets up a
> build environment (and an interactive shell) for notmuch.  And I really
> wonder why it can't find the file, it's there in the interactive shell.
> It's possible that the error message is a red herring though, I'll look
> into it.

I case it helps, attached is the output from

% cd test && ./T460-emacs-tree.sh

Note that the tests do need to be run from that directory.

The two new tests that actually use emacs are failing with output:

*ERROR*: Wrong number of arguments: (1 . 1), 0

Running the tests interactively (just eval testl-lib.el first) suggests
that is output from set-mark-command (in emacs 26.1, it demands at least
one argument).


[-- Attachment #2: test.out --]
[-- Type: application/octet-stream, Size: 14869 bytes --]


T460-emacs-tree: Testing emacs tree view interface
 PASS   Basic notmuch-tree view in emacs
 PASS   Refreshed notmuch-tree view in emacs
 PASS   Tag message in notmuch tree view (display)
 PASS   Tag message in notmuch tree view (database)
 PASS   Untag message in notmuch tree view
 PASS   Untag message in notmuch tree view (database)
 PASS   Tag thread in notmuch tree view
 PASS   Tag message in notmuch tree view (database)
 PASS   Untag thread in notmuch tree view
 PASS   Untag message in notmuch tree view (database)
 FAIL   Tag region in notmuch tree view
	--- T460-emacs-tree.11.notmuch-tree-tag-inbox-thread-tagged	2019-05-25 13:21:49.729140808 +0000
	+++ T460-emacs-tree.11.OUTPUT	2019-05-25 13:21:49.733140808 +0000
	@@ -1,53 +0,0 @@
	-  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox unread)
	-  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox unread)
	-  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread)
	-  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search	instead of going into an infinite loop (attachment inbox unread)
	-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox unread)
	-  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox signed unread)
	-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox unread)
	-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox unread)
	-  2009-11-17  Jan Janak             ├─► ...                                               (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox unread)
	-  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox unread)
	-  2009-11-18  Carl Worth             ╰─► ...                                              (inbox unread)
	-  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove	inbox (and unread) tags (inbox unread)
	-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
	-  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox signed test_thread_tag unread)
	-  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox signed test_thread_tag unread)
	-  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox signed test_thread_tag unread)
	-  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox test_thread_tag unread)
	-  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox test_thread_tag unread)
	-  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox signed test_thread_tag unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox test_thread_tag unread)
	-  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message	headers (inbox unread)
	-  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++	file with gcc 4.4 (inbox unread)
	-  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
	-  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
	-  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
	-  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that	highlights URLs and uses word-wrap (inbox unread)
	-  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread)
	-  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox unread)
	-  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox unread)
	-  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox unread)
	-  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox unread)
	-  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox unread)
	-  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox unread)
	-  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool	subdirectories into tags (inbox unread)
	-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before	statting (inbox unread)
	-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread)
	-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++	libs. (inbox unread)
	-  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment inbox signed unread)
	-  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment inbox signed unread)
	-  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox unread)
	-  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment inbox unread)
	-  2009-11-17  Carl Worth            ╰─► ...                                               (inbox unread)
	-End of search results.
*ERROR*: Wrong number of arguments: (1 . 1), 0
 FAIL   Tag region in notmuch tree view (database)
	--- T460-emacs-tree.12.expected	2019-05-25 13:21:49.741140808 +0000
	+++ T460-emacs-tree.12.output	2019-05-25 13:21:49.741140808 +0000
	@@ -1,7 +1 @@
	-id:87ocn0qh6d.fsf@yoom.home.cworth.org
	-id:20091118005040.GA25380@dottiness.seas.harvard.edu
	-id:yunaayketfm.fsf@aiko.keithp.com
	-id:87fx8can9z.fsf@vertex.dottedmag
	-id:20091117203301.GV3165@dottiness.seas.harvard.edu
	-id:87iqd9rn3l.fsf@vertex.dottedmag
	-id:20091117190054.GU3165@dottiness.seas.harvard.edu
	+
 FAIL   Untag region in notmuch tree view
	--- T460-emacs-tree.13.notmuch-tree-tag-inbox	2019-05-25 13:21:49.865140809 +0000
	+++ T460-emacs-tree.13.OUTPUT	2019-05-25 13:21:49.865140809 +0000
	@@ -1,53 +0,0 @@
	-  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox unread)
	-  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox unread)
	-  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread)
	-  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search	instead of going into an infinite loop (attachment inbox unread)
	-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox unread)
	-  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox signed unread)
	-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox unread)
	-  2009-11-18  Keith Packard         ├─► ...                                               (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox unread)
	-  2009-11-17  Jan Janak             ├─► ...                                               (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox unread)
	-  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox unread)
	-  2009-11-18  Carl Worth             ╰─► ...                                              (inbox unread)
	-  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove	inbox (and unread) tags (inbox unread)
	-  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)
	-  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox signed unread)
	-  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox signed unread)
	-  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox signed unread)
	-  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox unread)
	-  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox unread)
	-  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox signed unread)
	-  2009-11-18  Carl Worth            ╰─► ...                                               (inbox unread)
	-  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message	headers (inbox unread)
	-  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++	file with gcc 4.4 (inbox unread)
	-  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox unread)
	-  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox unread)
	-  2009-11-18  Carl Worth              ╰─► ...                                             (inbox unread)
	-  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that	highlights URLs and uses word-wrap (inbox unread)
	-  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread)
	-  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox unread)
	-  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox unread)
	-  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox unread)
	-  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox unread)
	-  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox unread)
	-  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox unread)
	-  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool	subdirectories into tags (inbox unread)
	-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before	statting (inbox unread)
	-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread)
	-  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++	libs. (inbox unread)
	-  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment inbox signed unread)
	-  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment inbox signed unread)
	-  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox unread)
	-  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment inbox unread)
	-  2009-11-17  Carl Worth            ╰─► ...                                               (inbox unread)
	-End of search results.
*ERROR*: Wrong number of arguments: (1 . 1), 0
 PASS   Untag region in notmuch tree view (database)
 PASS   Navigation of notmuch-hello to search results
 PASS   Tree view of a single thread (from search)
 PASS   Tree view of a single thread (from show)
 PASS   Message window of tree view
 PASS   Stash id
 PASS   Move to next matching message
 PASS   Move to next thread
 PASS   Move to previous thread
 PASS   Move to previous previous thread

[-- Attachment #3: Type: text/plain, Size: 1069 bytes --]


>
> So would you like me to patch the namespacing along with these changes
> or leave it for another patch?

I'd leave namespacing of existing code for a new series if you're
motivated to work on that. For your new code, I think it makes most
sense to have it in the patch that introduces the code.

>
>> I assume you are not using git-send-email because it's difficult for
>> you; it's not that a big of a deal, although we do prefer series
>> generated git-send-email for reviewing.
>
> I'm using git-send-email on a regular basis, no problem with that.  (I
> wonder why you would think it's difficult for me :p)

My mistake, I assume everyone read
https://notmuchmail.org/contributing/#index11h2 ;).

> git-send-email comes with different workflows though, I'm not sure which
> one Notmuch follows.  Do you prefer versioned patch series
> (e.g. [PATCHv2], etc.) or patch updates sent with
> "--in-reply-to=<message-id-of-the-last-email>"?

For series, probably the former. For single patches, or updates to the
single patches in the series, the latter.

Thanks!

d

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-05-25 13:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09 16:47 [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region Pierre Neidhardt
2019-04-09 16:47 ` [PATCH 2/2] emacs: Allow tagging regions in notmuch-tree Pierre Neidhardt
2019-05-08 11:00   ` David Bremner
2019-05-14 10:40     ` Pierre Neidhardt
2019-05-25 11:13       ` David Bremner
2019-05-25 11:41         ` Pierre Neidhardt
2019-05-25 13:42           ` David Bremner
2019-05-07  9:35 ` [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region David Bremner
2019-05-20 12:35   ` Leo Vivier
2019-05-20 17:11     ` Tomi Ollila
2019-05-22 14:56       ` Leo Vivier
2019-05-23 11:14         ` David Bremner
2019-05-23 11:19           ` Leo Vivier
2019-05-23 17:07             ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).