* show-mode message/thread archiving improvements
@ 2012-01-17 18:05 Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Jameson Graef Rollins
` (2 more replies)
0 siblings, 3 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-17 18:05 UTC (permalink / raw)
To: Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]
I have reworked the show-mode message/thread archiving improvements from
two now-obsolete patch sets:
id:"1325975294-646-1-git-send-email-jrollins@finestructure.net"
id:"1325986015-22510-1-git-send-email-jrollins@finestructure.net"
All the "delete" stuff has been removed from this series, and I just
focus on improving the functions associated with message and thread
tagging, archiving, and navigation. I also incorporated some good
suggestions from Aaron Ecay to make things "lispier".
The first five patches should be non-controversial and just improve the
available functions without changing any visible behavior. Together
they make it much easier for users to create useful custom key bindings
to achieve custom tagging and navigation operations.
The last patch changes the default keybind for the 'a' key to archive
just the current message, and not the entire thread. In my opinion this
is a *much* more sensible binding for this key. I actually rebound to
this immediately after I started using notmuch long ago. It also adds a
new 'A' that performs the old function to archive the entire thread and
move on.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions
2012-01-17 18:05 show-mode message/thread archiving improvements Jameson Graef Rollins
@ 2012-01-17 18:05 ` Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
` (2 more replies)
2012-01-17 20:09 ` show-mode message/thread archiving improvements Aaron Ecay
2012-01-23 8:33 ` Jameson Graef Rollins
2 siblings, 3 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-17 18:05 UTC (permalink / raw)
To: Notmuch Mail
Brake up notmuch-show-archive-thread-internal into two new functions:
notmuch-show-tag-thread-internal: applies a tag to all messages in
thread. If option remove flag is t, tags will be removed instead of
added.
notmuch-show-next-thread: moves to the next thread in the search
result. If given a prefix, will show the next result, otherwise will
just move to it in the search view.
Two new interactive functions, notmuch-show-{add,remove}-tag-thread,
are also added. Together, these provide a better suit of thread
tagging and navigation tools.
The higher level thread archiving functions are modified to use these
new functions.
---
emacs/notmuch-show.el | 33 ++++++++++++++++++++++++++-------
1 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 03c1f6b..3625afd 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1421,12 +1421,29 @@ argument, hide all of the messages."
(interactive)
(backward-button 1))
-(defun notmuch-show-archive-thread-internal (show-next)
- ;; Remove the tag from the current set of messages.
+(defun notmuch-show-tag-thread-internal (tag &optional remove)
+ ;; Add tag to the current set of messages. If the remove switch is
+ ;; given, tags will be removed instead of added.
(goto-char (point-min))
- (loop do (notmuch-show-remove-tag "inbox")
- until (not (notmuch-show-goto-message-next)))
- ;; Move to the next item in the search results, if any.
+ (let ((tag-function 'notmuch-show-add-tag))
+ (if remove
+ (setq tag-function 'notmuch-show-remove-tag))
+ (loop do (funcall tag-function tag)
+ until (not (notmuch-show-goto-message-next)))))
+
+(defun notmuch-show-add-tag-thread (tag)
+ "Add tag to all messages in the current thread."
+ (interactive)
+ (notmuch-show-tag-thread-internal tag))
+
+(defun notmuch-show-remove-tag-thread (tag)
+ "Remove tag from all messages in the current thread."
+ (interactive)
+ (notmuch-show-tag-thread-internal tag t))
+
+(defun notmuch-show-next-thread (&optional show-next)
+ "Move to the next item in the search results, if any."
+ (interactive)
(let ((parent-buffer notmuch-show-parent-buffer))
(notmuch-kill-this-buffer)
(if parent-buffer
@@ -1448,12 +1465,14 @@ being delivered to the same thread. It does not archive the
entire thread, but only the messages shown in the current
buffer."
(interactive)
- (notmuch-show-archive-thread-internal t))
+ (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-next-thread t))
(defun notmuch-show-archive-thread-then-exit ()
"Archive each message in thread, then exit back to search results."
(interactive)
- (notmuch-show-archive-thread-internal nil))
+ (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-next-thread))
(defun notmuch-show-stash-cc ()
"Copy CC field of current message to kill-ring."
--
1.7.7.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread
2012-01-17 18:05 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Jameson Graef Rollins
@ 2012-01-17 18:05 ` Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
2012-01-18 8:08 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread David Edmondson
2012-01-17 20:10 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Aaron Ecay
2012-01-18 8:06 ` David Edmondson
2 siblings, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-17 18:05 UTC (permalink / raw)
To: Notmuch Mail
This function is now just for archiving the current thread. A new
function is created to archive-then-next. The 'a' key binding is
updated accordingly.
This will allow people to bind to the simple thread archiving function
without the extra navigation. The archive-thread function now also
takes a prefix to unarchive the current thread (ie. put the whole
thread back in the inbox).
---
emacs/notmuch-show.el | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 3625afd..ee9ef62 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -945,7 +945,7 @@ thread id. If a prefix is given, crypto processing is toggled."
(define-key map "-" 'notmuch-show-remove-tag)
(define-key map "+" 'notmuch-show-add-tag)
(define-key map "x" 'notmuch-show-archive-thread-then-exit)
- (define-key map "a" 'notmuch-show-archive-thread)
+ (define-key map "a" 'notmuch-show-archive-thread-then-next)
(define-key map "N" 'notmuch-show-next-message)
(define-key map "P" 'notmuch-show-previous-message)
(define-key map "n" 'notmuch-show-next-open-message)
@@ -1200,7 +1200,7 @@ thread from the search from which this thread was originally
shown."
(interactive)
(if (notmuch-show-advance)
- (notmuch-show-archive-thread)))
+ (notmuch-show-archive-thread-then-next)))
(defun notmuch-show-rewind ()
"Backup through the thread, (reverse scrolling compared to \\[notmuch-show-advance-and-archive]).
@@ -1453,8 +1453,12 @@ argument, hide all of the messages."
(if show-next
(notmuch-search-show-thread))))))
-(defun notmuch-show-archive-thread ()
- "Archive each message in thread, then show next thread from search.
+(defun notmuch-show-archive-thread (&optional unarchive)
+ "Archive each message in thread.
+
+If a prefix argument is given, the messages will be
+\"unarchived\" (ie. the \"inbox\" tag will be added instead of
+removed).
Archive each message currently shown by removing the \"inbox\"
tag from each. Then kill this buffer and show the next thread
@@ -1465,13 +1469,20 @@ being delivered to the same thread. It does not archive the
entire thread, but only the messages shown in the current
buffer."
(interactive)
- (notmuch-show-remove-tag-thread "inbox")
+ (if unarchive
+ (notmuch-show-add-tag-thread "inbox")
+ (notmuch-show-remove-tag-thread "inbox")))
+
+(defun notmuch-show-archive-thread-then-next ()
+ "Archive each message in thread, then show next thread from search."
+ (interactive)
+ (notmuch-show-archive-thread)
(notmuch-show-next-thread t))
(defun notmuch-show-archive-thread-then-exit ()
"Archive each message in thread, then exit back to search results."
(interactive)
- (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-archive-thread)
(notmuch-show-next-thread))
(defun notmuch-show-stash-cc ()
--
1.7.7.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 3/6] emacs: add message archiving functions
2012-01-17 18:05 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
@ 2012-01-17 18:05 ` Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
` (3 more replies)
2012-01-18 8:08 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread David Edmondson
1 sibling, 4 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-17 18:05 UTC (permalink / raw)
To: Notmuch Mail
This adds two new message archiving functions that parallel the thread
archiving functions: notmuch-show-archive-message{,-then-next}. The
former also takes a prefix argument to unarchive the message (ie. put
back in inbox).
---
emacs/notmuch-show.el | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index ee9ef62..207949c 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1485,6 +1485,23 @@ buffer."
(notmuch-show-archive-thread)
(notmuch-show-next-thread))
+(defun notmuch-show-archive-message (&optional unarchive)
+ "Archive the current message.
+
+If a prefix argument is given, the message will be
+\"unarchived\" (ie. the \"inbox\" tag will be added instead of
+removed)."
+ (interactive)
+ (if unarchive
+ (notmuch-show-add-tag "inbox")
+ (notmuch-show-remove-tag "inbox")))
+
+(defun notmuch-show-archive-message-then-next ()
+ "Archive the current message, then show next thread from search."
+ (interactive)
+ (notmuch-show-archive-message)
+ (notmuch-show-next-open-message))
+
(defun notmuch-show-stash-cc ()
"Copy CC field of current message to kill-ring."
(interactive)
--
1.7.7.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-17 18:05 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
@ 2012-01-17 18:05 ` Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
2012-01-18 8:12 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end David Edmondson
2012-01-17 18:43 ` [PATCH] emacs: fix archive thread/message function documentation Jameson Graef Rollins
` (2 subsequent siblings)
3 siblings, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-17 18:05 UTC (permalink / raw)
To: Notmuch Mail
This will allow for keybindings that achieve a smoother message
processing flow by reducing the number of key presses needed for most
common operations.
---
emacs/notmuch-show.el | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 207949c..6b2e6e9 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1270,17 +1270,23 @@ any effects from previous calls to
(notmuch-show-mark-read)
(notmuch-show-message-adjust))
-(defun notmuch-show-next-open-message ()
+(defun notmuch-show-next-open-message (&optional pop-at-end)
"Show the next message."
(interactive)
- (let (r)
+ (let ((r)
+ (parent-buffer notmuch-show-parent-buffer))
(while (and (setq r (notmuch-show-goto-message-next))
(not (notmuch-show-message-visible-p))))
(if r
(progn
(notmuch-show-mark-read)
(notmuch-show-message-adjust))
- (goto-char (point-max)))))
+ (if (and parent-buffer pop-at-end)
+ (progn
+ (kill-this-buffer)
+ (switch-to-buffer parent-buffer)
+ (forward-line 1))
+ (goto-char (point-max))))))
(defun notmuch-show-previous-open-message ()
"Show the previous message."
--
1.7.7.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function
2012-01-17 18:05 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
@ 2012-01-17 18:05 ` Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
2012-01-18 8:12 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end David Edmondson
1 sibling, 1 reply; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-17 18:05 UTC (permalink / raw)
To: Notmuch Mail
This provides a smoother message processing flow by reducing the
number of key presses needed for these common operations.
---
emacs/notmuch-show.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 6b2e6e9..21eadbe 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1506,7 +1506,7 @@ removed)."
"Archive the current message, then show next thread from search."
(interactive)
(notmuch-show-archive-message)
- (notmuch-show-next-open-message))
+ (notmuch-show-next-open-message t))
(defun notmuch-show-stash-cc ()
"Copy CC field of current message to kill-ring."
--
1.7.7.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving
2012-01-17 18:05 ` [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
@ 2012-01-17 18:05 ` Jameson Graef Rollins
2012-01-18 8:13 ` David Edmondson
0 siblings, 1 reply; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-17 18:05 UTC (permalink / raw)
To: Notmuch Mail
This changes the default key bindings for the 'a' key in notmuch-show
mode. Instead of archiving the entire thread, it now just archives
the current message, and then advance to the next open message
(archive-message-then-next). 'A' is now bound to the previous
archive-thread-then-next function.
---
emacs/notmuch-show.el | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 21eadbe..c488e6a 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -945,7 +945,8 @@ thread id. If a prefix is given, crypto processing is toggled."
(define-key map "-" 'notmuch-show-remove-tag)
(define-key map "+" 'notmuch-show-add-tag)
(define-key map "x" 'notmuch-show-archive-thread-then-exit)
- (define-key map "a" 'notmuch-show-archive-thread-then-next)
+ (define-key map "a" 'notmuch-show-archive-message-then-next)
+ (define-key map "A" 'notmuch-show-archive-thread-then-next)
(define-key map "N" 'notmuch-show-next-message)
(define-key map "P" 'notmuch-show-previous-message)
(define-key map "n" 'notmuch-show-next-open-message)
--
1.7.7.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-17 18:05 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
@ 2012-01-18 8:12 ` David Edmondson
2012-01-18 8:47 ` Jameson Graef Rollins
1 sibling, 1 reply; 84+ messages in thread
From: David Edmondson @ 2012-01-18 8:12 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
On Tue, 17 Jan 2012 10:05:29 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> -(defun notmuch-show-next-open-message ()
> +(defun notmuch-show-next-open-message (&optional pop-at-end)
> "Show the next message."
> (interactive)
> - (let (r)
> + (let ((r)
> + (parent-buffer notmuch-show-parent-buffer))
No need for brackets around `r'. Please put initialised local variables
before uninitialised.
> (while (and (setq r (notmuch-show-goto-message-next))
> (not (notmuch-show-message-visible-p))))
> (if r
> (progn
> (notmuch-show-mark-read)
> (notmuch-show-message-adjust))
> - (goto-char (point-max)))))
> + (if (and parent-buffer pop-at-end)
> + (progn
> + (kill-this-buffer)
> + (switch-to-buffer parent-buffer)
> + (forward-line 1))
> + (goto-char (point-max))))))
Can you explain in words how this is expected to behave please?
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-18 8:12 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end David Edmondson
@ 2012-01-18 8:47 ` Jameson Graef Rollins
2012-01-18 8:56 ` David Edmondson
0 siblings, 1 reply; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-18 8:47 UTC (permalink / raw)
To: David Edmondson, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]
On Wed, 18 Jan 2012 08:12:27 +0000, David Edmondson <dme@dme.org> wrote:
> No need for brackets around `r'. Please put initialised local variables
> before uninitialised.
Yeah, that's another comment of Aron's that I forgot to fix this time
around. Sorry about that.
> > (while (and (setq r (notmuch-show-goto-message-next))
> > (not (notmuch-show-message-visible-p))))
> > (if r
> > (progn
> > (notmuch-show-mark-read)
> > (notmuch-show-message-adjust))
> > - (goto-char (point-max)))))
> > + (if (and parent-buffer pop-at-end)
> > + (progn
> > + (kill-this-buffer)
> > + (switch-to-buffer parent-buffer)
> > + (forward-line 1))
> > + (goto-char (point-max))))))
>
> Can you explain in words how this is expected to behave please?
If there is not another message, but there is a parent buffer and the
pop-at-end variable is set, kill this buffer, go the parent, and move to
the next thread. Otherwise, go to the max point in the buffer.
Do you see a problem?
The one thing I do realize now is that the behavior might be slightly
strange if the parent buffer is itself a show buffer. In that case, the
forward-line part doesn't make any sense. It should check that the
parent is a search buffer first. It should also use the notmuch-search
function to jump to the next thread (notmuch-search-next-thread). The
notmuch-show-next-thread function could use the same improvements.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-18 8:47 ` Jameson Graef Rollins
@ 2012-01-18 8:56 ` David Edmondson
2012-01-18 18:53 ` Jameson Graef Rollins
0 siblings, 1 reply; 84+ messages in thread
From: David Edmondson @ 2012-01-18 8:56 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]
On Wed, 18 Jan 2012 00:47:11 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> > > (while (and (setq r (notmuch-show-goto-message-next))
> > > (not (notmuch-show-message-visible-p))))
> > > (if r
> > > (progn
> > > (notmuch-show-mark-read)
> > > (notmuch-show-message-adjust))
> > > - (goto-char (point-max)))))
> > > + (if (and parent-buffer pop-at-end)
> > > + (progn
> > > + (kill-this-buffer)
> > > + (switch-to-buffer parent-buffer)
> > > + (forward-line 1))
> > > + (goto-char (point-max))))))
> >
> > Can you explain in words how this is expected to behave please?
>
> Do you see a problem?
Not a problem, just trying to understand the behaviour (I have to revive
my advance/rewind patches at some point).
> If there is not another message, but there is a parent buffer and the
> pop-at-end variable is set, kill this buffer, go the parent, and move to
> the next thread. Otherwise, go to the max point in the buffer.
I'm used to the cursor going to the bottom of the thread to let me know
that I reached the end, then I hit 'space' and move on to the next
thread. Will that behaviour be retained with this patch? (Well,
including your other patch which seemed to set `pop-at-end'.)
It's one of those things that I have to try out to understand properly I
expect.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-18 8:56 ` David Edmondson
@ 2012-01-18 18:53 ` Jameson Graef Rollins
0 siblings, 0 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-18 18:53 UTC (permalink / raw)
To: David Edmondson, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 498 bytes --]
On Wed, 18 Jan 2012 08:56:26 +0000, David Edmondson <dme@dme.org> wrote:
> I'm used to the cursor going to the bottom of the thread to let me know
> that I reached the end, then I hit 'space' and move on to the next
> thread. Will that behaviour be retained with this patch? (Well,
> including your other patch which seemed to set `pop-at-end'.)
This doesn't change the default behavior of the 'n' key, if that's what
you're asking, so the behavior you're describing should work the same.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH] emacs: fix archive thread/message function documentation.
2012-01-17 18:05 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
@ 2012-01-17 18:43 ` Jameson Graef Rollins
2012-01-17 20:13 ` [PATCH 3/6] emacs: add message archiving functions Aaron Ecay
2012-01-18 8:09 ` David Edmondson
3 siblings, 0 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-17 18:43 UTC (permalink / raw)
To: Notmuch Mail
This removes an inaccuracy in the thread archiving function, and adds
a clarification to the message archiving function.
---
Late catch on some documentation inaccuracies. Apologies.
emacs/notmuch-show.el | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index c488e6a..c1d721e 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1463,13 +1463,10 @@ argument, hide all of the messages."
(defun notmuch-show-archive-thread (&optional unarchive)
"Archive each message in thread.
-If a prefix argument is given, the messages will be
-\"unarchived\" (ie. the \"inbox\" tag will be added instead of
-removed).
-
Archive each message currently shown by removing the \"inbox\"
-tag from each. Then kill this buffer and show the next thread
-from the search from which this thread was originally shown.
+tag from each. If a prefix argument is given, the messages will
+be \"unarchived\" (ie. the \"inbox\" tag will be added instead of
+removed).
Note: This command is safe from any race condition of new messages
being delivered to the same thread. It does not archive the
@@ -1493,7 +1490,7 @@ buffer."
(notmuch-show-next-thread))
(defun notmuch-show-archive-message (&optional unarchive)
- "Archive the current message.
+ "Archive the current message (remove \"inbox\" tag).
If a prefix argument is given, the message will be
\"unarchived\" (ie. the \"inbox\" tag will be added instead of
--
1.7.7.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH 3/6] emacs: add message archiving functions
2012-01-17 18:05 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
2012-01-17 18:43 ` [PATCH] emacs: fix archive thread/message function documentation Jameson Graef Rollins
@ 2012-01-17 20:13 ` Aaron Ecay
2012-01-17 20:18 ` Jameson Graef Rollins
2012-01-18 8:09 ` David Edmondson
3 siblings, 1 reply; 84+ messages in thread
From: Aaron Ecay @ 2012-01-17 20:13 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
On Tue, 17 Jan 2012 10:05:28 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> This adds two new message archiving functions that parallel the thread
> archiving functions: notmuch-show-archive-message{,-then-next}. The
> former also takes a prefix argument to unarchive the message (ie. put
> back in inbox).
> ---
> emacs/notmuch-show.el | 17 +++++++++++++++++
> 1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index ee9ef62..207949c 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1485,6 +1485,23 @@ buffer."
> (notmuch-show-archive-thread)
> (notmuch-show-next-thread))
>
> +(defun notmuch-show-archive-message (&optional unarchive)
> + "Archive the current message.
> +
> +If a prefix argument is given, the message will be
> +\"unarchived\" (ie. the \"inbox\" tag will be added instead of
> +removed)."
> + (interactive)
If this function uses the prefix arg, its interactive call should be
“(interactive "P")”. This applies equally to the -thread variant in
patch 2/6, but I made the comment here because that diff doesn’t show
the function contiguously.
--
Aaron Ecay
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 3/6] emacs: add message archiving functions
2012-01-17 18:05 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
` (2 preceding siblings ...)
2012-01-17 20:13 ` [PATCH 3/6] emacs: add message archiving functions Aaron Ecay
@ 2012-01-18 8:09 ` David Edmondson
3 siblings, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-18 8:09 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 4 bytes --]
+1.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread
2012-01-17 18:05 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
@ 2012-01-18 8:08 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-18 8:08 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 4 bytes --]
+1.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions
2012-01-17 18:05 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
@ 2012-01-17 20:10 ` Aaron Ecay
2012-01-17 20:17 ` Jameson Graef Rollins
2012-01-18 8:06 ` David Edmondson
2 siblings, 1 reply; 84+ messages in thread
From: Aaron Ecay @ 2012-01-17 20:10 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
On Tue, 17 Jan 2012 10:05:26 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> Brake up notmuch-show-archive-thread-internal into two new functions:
>
> notmuch-show-tag-thread-internal: applies a tag to all messages in
> thread. If option remove flag is t, tags will be removed instead of
> added.
>
> notmuch-show-next-thread: moves to the next thread in the search
> result. If given a prefix, will show the next result, otherwise will
> just move to it in the search view.
>
> Two new interactive functions, notmuch-show-{add,remove}-tag-thread,
> are also added. Together, these provide a better suit of thread
> tagging and navigation tools.
>
> The higher level thread archiving functions are modified to use these
> new functions.
> ---
> emacs/notmuch-show.el | 33 ++++++++++++++++++++++++++-------
> 1 files changed, 26 insertions(+), 7 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 03c1f6b..3625afd 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1421,12 +1421,29 @@ argument, hide all of the messages."
> (interactive)
> (backward-button 1))
>
> -(defun notmuch-show-archive-thread-internal (show-next)
> - ;; Remove the tag from the current set of messages.
> +(defun notmuch-show-tag-thread-internal (tag &optional remove)
> + ;; Add tag to the current set of messages. If the remove switch is
> + ;; given, tags will be removed instead of added.
This should be a docstring instead of a comment. (This applies equally
to the old version....)
--
Aaron Ecay
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions
2012-01-17 20:10 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Aaron Ecay
@ 2012-01-17 20:17 ` Jameson Graef Rollins
2012-01-17 20:57 ` Aaron Ecay
2012-01-18 8:14 ` David Edmondson
0 siblings, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-17 20:17 UTC (permalink / raw)
To: Aaron Ecay, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
On Tue, 17 Jan 2012 15:10:40 -0500, Aaron Ecay <aaronecay@gmail.com> wrote:
> This should be a docstring instead of a comment. (This applies equally
> to the old version....)
We're not currently in the habit of adding doc strings for
non-interactive programs. Do we need to go down that route?
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions
2012-01-17 20:17 ` Jameson Graef Rollins
@ 2012-01-17 20:57 ` Aaron Ecay
2012-01-18 8:14 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: Aaron Ecay @ 2012-01-17 20:57 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
On Tue, 17 Jan 2012 12:17:54 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
>
> We're not currently in the habit of adding doc strings for
> non-interactive programs. Do we need to go down that route?
It is handy for developers, since the usual documentation facilities
(describe-function, apropos, ...) will then work for that function too.
Emacs documentation recommends(-ish) this:
,----[ Elisp manual Section D.6 ]
| An internal variable or subroutine of a Lisp program might as well
| have a documentation string. In earlier Emacs versions, you could
| save space by using a comment instead of a documentation string,
| but that is no longer the case--documentation strings now take up
| very little space in a running Emacs.
`----
--
Aaron Ecay
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions
2012-01-17 20:17 ` Jameson Graef Rollins
2012-01-17 20:57 ` Aaron Ecay
@ 2012-01-18 8:14 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-18 8:14 UTC (permalink / raw)
To: Jameson Graef Rollins, Aaron Ecay, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 479 bytes --]
On Tue, 17 Jan 2012 12:17:54 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Tue, 17 Jan 2012 15:10:40 -0500, Aaron Ecay <aaronecay@gmail.com> wrote:
> > This should be a docstring instead of a comment. (This applies equally
> > to the old version....)
>
> We're not currently in the habit of adding doc strings for
> non-interactive programs. Do we need to go down that route?
They are nice to have, especially if we already have the comment.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions
2012-01-17 18:05 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
2012-01-17 20:10 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Aaron Ecay
@ 2012-01-18 8:06 ` David Edmondson
2 siblings, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-18 8:06 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
Very happy with the overall ideas.
On Tue, 17 Jan 2012 10:05:26 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> -(defun notmuch-show-archive-thread-internal (show-next)
> - ;; Remove the tag from the current set of messages.
> +(defun notmuch-show-tag-thread-internal (tag &optional remove)
> + ;; Add tag to the current set of messages. If the remove switch is
> + ;; given, tags will be removed instead of added.
> (goto-char (point-min))
> - (loop do (notmuch-show-remove-tag "inbox")
> - until (not (notmuch-show-goto-message-next)))
> - ;; Move to the next item in the search results, if any.
> + (let ((tag-function 'notmuch-show-add-tag))
> + (if remove
> + (setq tag-function 'notmuch-show-remove-tag))
This seems odd. How about:
(let ((tag-function (if remove 'notmuch-show-remove-tag 'notmuch-show-add-tag)))
...
> + (loop do (funcall tag-function tag)
> + until (not (notmuch-show-goto-message-next)))))
Otherwise good.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: show-mode message/thread archiving improvements
2012-01-17 18:05 show-mode message/thread archiving improvements Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Jameson Graef Rollins
@ 2012-01-17 20:09 ` Aaron Ecay
2012-01-23 8:33 ` Jameson Graef Rollins
2 siblings, 0 replies; 84+ messages in thread
From: Aaron Ecay @ 2012-01-17 20:09 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
+1 on this series from me. (Minor comments on a couple of the patches
to follow.)
--
Aaron Ecay
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: show-mode message/thread archiving improvements
2012-01-17 18:05 show-mode message/thread archiving improvements Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Jameson Graef Rollins
2012-01-17 20:09 ` show-mode message/thread archiving improvements Aaron Ecay
@ 2012-01-23 8:33 ` Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
2012-01-25 0:06 ` Jameson Graef Rollins
2 siblings, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-23 8:33 UTC (permalink / raw)
To: Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 479 bytes --]
v2 of this series to follow, based on some good feedback from David and
Aaron.
Reminder:
> The last patch changes the default keybind for the 'a' key to archive
> just the current message, and not the entire thread. In my opinion this
> is a *much* more sensible binding for this key. I actually rebound to
> this immediately after I started using notmuch long ago. It also adds a
> new 'A' that performs the old function to archive the entire thread and
> move on.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions
2012-01-23 8:33 ` Jameson Graef Rollins
@ 2012-01-23 8:34 ` Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
2012-01-23 11:00 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions David Edmondson
2012-01-25 0:06 ` Jameson Graef Rollins
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-23 8:34 UTC (permalink / raw)
To: Notmuch Mail
Brake up notmuch-show-archive-thread-internal into two new functions:
notmuch-show-tag-thread-internal: applies a tag to all messages in
thread. If option remove flag is t, tags will be removed instead of
added.
notmuch-show-next-thread: moves to the next thread in the search
result. If given a prefix, will show the next result, otherwise will
just move to it in the search view.
Two new interactive functions, notmuch-show-{add,remove}-tag-thread,
are also added. Together, these provide a better suit of thread
tagging and navigation tools.
The higher level thread archiving functions are modified to use these
new function.
---
emacs/notmuch-show.el | 35 ++++++++++++++++++++++++++++-------
1 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index e6a5b31..9638f35 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1524,12 +1524,31 @@ argument, hide all of the messages."
(interactive)
(backward-button 1))
-(defun notmuch-show-archive-thread-internal (show-next)
- ;; Remove the tag from the current set of messages.
+(defun notmuch-show-tag-thread-internal (tag &optional remove)
+ "Add tag to the current set of messages.
+
+If the remove switch is given, tags will be removed instead of
+added."
(goto-char (point-min))
- (loop do (notmuch-show-remove-tag "inbox")
- until (not (notmuch-show-goto-message-next)))
- ;; Move to the next item in the search results, if any.
+ (let ((tag-function (if remove
+ 'notmuch-show-remove-tag
+ 'notmuch-show-add-tag)))
+ (loop do (funcall tag-function tag)
+ until (not (notmuch-show-goto-message-next)))))
+
+(defun notmuch-show-add-tag-thread (tag)
+ "Add tag to all messages in the current thread."
+ (interactive)
+ (notmuch-show-tag-thread-internal tag))
+
+(defun notmuch-show-remove-tag-thread (tag)
+ "Remove tag from all messages in the current thread."
+ (interactive)
+ (notmuch-show-tag-thread-internal tag t))
+
+(defun notmuch-show-next-thread (&optional show-next)
+ "Move to the next item in the search results, if any."
+ (interactive "P")
(let ((parent-buffer notmuch-show-parent-buffer))
(notmuch-kill-this-buffer)
(if parent-buffer
@@ -1551,12 +1570,14 @@ being delivered to the same thread. It does not archive the
entire thread, but only the messages shown in the current
buffer."
(interactive)
- (notmuch-show-archive-thread-internal t))
+ (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-next-thread t))
(defun notmuch-show-archive-thread-then-exit ()
"Archive each message in thread, then exit back to search results."
(interactive)
- (notmuch-show-archive-thread-internal nil))
+ (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-next-thread))
(defun notmuch-show-stash-cc ()
"Copy CC field of current message to kill-ring."
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread
2012-01-23 8:34 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
@ 2012-01-23 8:34 ` Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
2012-01-23 11:01 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread David Edmondson
2012-01-23 11:00 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions David Edmondson
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-23 8:34 UTC (permalink / raw)
To: Notmuch Mail
This function is now just for archiving the current thread. A new
function is created to archive-then-next. The 'a' key binding is
updated accordingly.
This will allow people to bind to the simple thread archiving function
without the extra navigation. The archive-thread function now also
takes a prefix to unarchive the current thread (ie. put the whole
thread back in the inbox).
---
emacs/notmuch-show.el | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 9638f35..21a655a 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1043,7 +1043,7 @@ thread id. If a prefix is given, crypto processing is toggled."
(define-key map "-" 'notmuch-show-remove-tag)
(define-key map "+" 'notmuch-show-add-tag)
(define-key map "x" 'notmuch-show-archive-thread-then-exit)
- (define-key map "a" 'notmuch-show-archive-thread)
+ (define-key map "a" 'notmuch-show-archive-thread-then-next)
(define-key map "N" 'notmuch-show-next-message)
(define-key map "P" 'notmuch-show-previous-message)
(define-key map "n" 'notmuch-show-next-open-message)
@@ -1303,7 +1303,7 @@ thread from the search from which this thread was originally
shown."
(interactive)
(if (notmuch-show-advance)
- (notmuch-show-archive-thread)))
+ (notmuch-show-archive-thread-then-next)))
(defun notmuch-show-rewind ()
"Backup through the thread, (reverse scrolling compared to \\[notmuch-show-advance-and-archive]).
@@ -1558,8 +1558,12 @@ added."
(if show-next
(notmuch-search-show-thread))))))
-(defun notmuch-show-archive-thread ()
- "Archive each message in thread, then show next thread from search.
+(defun notmuch-show-archive-thread (&optional unarchive)
+ "Archive each message in thread.
+
+If a prefix argument is given, the messages will be
+\"unarchived\" (ie. the \"inbox\" tag will be added instead of
+removed).
Archive each message currently shown by removing the \"inbox\"
tag from each. Then kill this buffer and show the next thread
@@ -1569,14 +1573,21 @@ Note: This command is safe from any race condition of new messages
being delivered to the same thread. It does not archive the
entire thread, but only the messages shown in the current
buffer."
+ (interactive "P")
+ (if unarchive
+ (notmuch-show-add-tag-thread "inbox")
+ (notmuch-show-remove-tag-thread "inbox")))
+
+(defun notmuch-show-archive-thread-then-next ()
+ "Archive each message in thread, then show next thread from search."
(interactive)
- (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-archive-thread)
(notmuch-show-next-thread t))
(defun notmuch-show-archive-thread-then-exit ()
"Archive each message in thread, then exit back to search results."
(interactive)
- (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-archive-thread)
(notmuch-show-next-thread))
(defun notmuch-show-stash-cc ()
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 3/6] emacs: add message archiving functions
2012-01-23 8:34 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
@ 2012-01-23 8:34 ` Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
` (2 more replies)
2012-01-23 11:01 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread David Edmondson
1 sibling, 3 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-23 8:34 UTC (permalink / raw)
To: Notmuch Mail
This adds two new message archiving functions that parallel the thread
archiving functions: notmuch-show-archive-message{,-then-next}. The
former also takes a prefix argument to unarchive the message (ie. put
back in inbox).
---
emacs/notmuch-show.el | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 21a655a..fcd2878 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1590,6 +1590,23 @@ buffer."
(notmuch-show-archive-thread)
(notmuch-show-next-thread))
+(defun notmuch-show-archive-message (&optional unarchive)
+ "Archive the current message.
+
+If a prefix argument is given, the message will be
+\"unarchived\" (ie. the \"inbox\" tag will be added instead of
+removed)."
+ (interactive "P")
+ (if unarchive
+ (notmuch-show-add-tag "inbox")
+ (notmuch-show-remove-tag "inbox")))
+
+(defun notmuch-show-archive-message-then-next ()
+ "Archive the current message, then show next thread from search."
+ (interactive)
+ (notmuch-show-archive-message)
+ (notmuch-show-next-open-message))
+
(defun notmuch-show-stash-cc ()
"Copy CC field of current message to kill-ring."
(interactive)
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-23 8:34 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
@ 2012-01-23 8:34 ` Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
2012-01-23 11:02 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end David Edmondson
2012-01-23 11:01 ` [PATCH 3/6] emacs: add message archiving functions David Edmondson
2012-01-24 18:44 ` Tomi Ollila
2 siblings, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-23 8:34 UTC (permalink / raw)
To: Notmuch Mail
This will allow for keybindings that achieve a smoother message
processing flow by reducing the number of key presses needed for most
common operations.
---
emacs/notmuch-show.el | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index fcd2878..fe7ec6a 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1373,17 +1373,23 @@ any effects from previous calls to
(notmuch-show-mark-read)
(notmuch-show-message-adjust))
-(defun notmuch-show-next-open-message ()
+(defun notmuch-show-next-open-message (&optional pop-at-end)
"Show the next message."
- (interactive)
- (let (r)
+ (interactive "P")
+ (let ((parent-buffer notmuch-show-parent-buffer)
+ (r))
(while (and (setq r (notmuch-show-goto-message-next))
(not (notmuch-show-message-visible-p))))
(if r
(progn
(notmuch-show-mark-read)
(notmuch-show-message-adjust))
- (goto-char (point-max)))))
+ (if (and parent-buffer pop-at-end)
+ (progn
+ (kill-this-buffer)
+ (switch-to-buffer parent-buffer)
+ (notmuch-search-next-message))
+ (goto-char (point-max))))))
(defun notmuch-show-previous-open-message ()
"Show the previous message."
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function
2012-01-23 8:34 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
@ 2012-01-23 8:34 ` Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
2012-01-23 11:02 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end David Edmondson
1 sibling, 1 reply; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-23 8:34 UTC (permalink / raw)
To: Notmuch Mail
This provides a smoother message processing flow by reducing the
number of key presses needed for these common operations.
---
emacs/notmuch-show.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index fe7ec6a..8c71d03 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1611,7 +1611,7 @@ removed)."
"Archive the current message, then show next thread from search."
(interactive)
(notmuch-show-archive-message)
- (notmuch-show-next-open-message))
+ (notmuch-show-next-open-message t))
(defun notmuch-show-stash-cc ()
"Copy CC field of current message to kill-ring."
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving
2012-01-23 8:34 ` [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
@ 2012-01-23 8:34 ` Jameson Graef Rollins
2012-01-23 11:14 ` David Edmondson
` (2 more replies)
0 siblings, 3 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-23 8:34 UTC (permalink / raw)
To: Notmuch Mail
This changes the default key bindings for the 'a' key in notmuch-show
mode. Instead of archiving the entire thread, it now just archives
the current message, and then advance to the next open message
(archive-message-then-next). 'A' is now bound to the previous
archive-thread-then-next function.
---
emacs/notmuch-show.el | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 8c71d03..29d9d92 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1043,7 +1043,8 @@ thread id. If a prefix is given, crypto processing is toggled."
(define-key map "-" 'notmuch-show-remove-tag)
(define-key map "+" 'notmuch-show-add-tag)
(define-key map "x" 'notmuch-show-archive-thread-then-exit)
- (define-key map "a" 'notmuch-show-archive-thread-then-next)
+ (define-key map "a" 'notmuch-show-archive-message-then-next)
+ (define-key map "A" 'notmuch-show-archive-thread-then-next)
(define-key map "N" 'notmuch-show-next-message)
(define-key map "P" 'notmuch-show-previous-message)
(define-key map "n" 'notmuch-show-next-open-message)
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving
2012-01-23 8:34 ` [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
@ 2012-01-23 11:14 ` David Edmondson
2012-01-23 21:03 ` Xavier Maillard
2012-01-24 18:50 ` Tomi Ollila
2 siblings, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-23 11:14 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 4 bytes --]
+1.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving
2012-01-23 8:34 ` [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
2012-01-23 11:14 ` David Edmondson
@ 2012-01-23 21:03 ` Xavier Maillard
2012-01-24 18:50 ` Tomi Ollila
2 siblings, 0 replies; 84+ messages in thread
From: Xavier Maillard @ 2012-01-23 21:03 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
This is also +1 for me.
/Xavier
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving
2012-01-23 8:34 ` [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
2012-01-23 11:14 ` David Edmondson
2012-01-23 21:03 ` Xavier Maillard
@ 2012-01-24 18:50 ` Tomi Ollila
2 siblings, 0 replies; 84+ messages in thread
From: Tomi Ollila @ 2012-01-24 18:50 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
On Mon, 23 Jan 2012 00:34:25 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> This changes the default key bindings for the 'a' key in notmuch-show
> mode. Instead of archiving the entire thread, it now just archives
> the current message, and then advance to the next open message
> (archive-message-then-next). 'A' is now bound to the previous
> archive-thread-then-next function.
> ---
+1 for the whole thread. If that one docstring is wrong I'd rather see
this patchset first pushed and then just do one-line trivial patch to
fix that issue -- less work to everyone.
Tomi
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-23 8:34 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
@ 2012-01-23 11:02 ` David Edmondson
2012-01-23 17:39 ` Jameson Graef Rollins
1 sibling, 1 reply; 84+ messages in thread
From: David Edmondson @ 2012-01-23 11:02 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
On Mon, 23 Jan 2012 00:34:23 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> -(defun notmuch-show-next-open-message ()
> +(defun notmuch-show-next-open-message (&optional pop-at-end)
> "Show the next message."
> - (interactive)
> - (let (r)
> + (interactive "P")
> + (let ((parent-buffer notmuch-show-parent-buffer)
> + (r))
Extra brackets around 'r' are unnecessary. Otherwise, +1.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-23 11:02 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end David Edmondson
@ 2012-01-23 17:39 ` Jameson Graef Rollins
2012-01-23 17:55 ` David Edmondson
0 siblings, 1 reply; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-23 17:39 UTC (permalink / raw)
To: David Edmondson, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 619 bytes --]
On Mon, 23 Jan 2012 11:02:04 +0000, David Edmondson <dme@dme.org> wrote:
> On Mon, 23 Jan 2012 00:34:23 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> > -(defun notmuch-show-next-open-message ()
> > +(defun notmuch-show-next-open-message (&optional pop-at-end)
> > "Show the next message."
> > - (interactive)
> > - (let (r)
> > + (interactive "P")
> > + (let ((parent-buffer notmuch-show-parent-buffer)
> > + (r))
>
> Extra brackets around 'r' are unnecessary. Otherwise, +1.
This seems minor enough that I'm not going to resend, but noted for next
time. Thanks.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-23 17:39 ` Jameson Graef Rollins
@ 2012-01-23 17:55 ` David Edmondson
2012-01-23 18:51 ` Jameson Graef Rollins
0 siblings, 1 reply; 84+ messages in thread
From: David Edmondson @ 2012-01-23 17:55 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
On Mon, 23 Jan 2012 09:39:30 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Mon, 23 Jan 2012 11:02:04 +0000, David Edmondson <dme@dme.org> wrote:
> > On Mon, 23 Jan 2012 00:34:23 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> > > -(defun notmuch-show-next-open-message ()
> > > +(defun notmuch-show-next-open-message (&optional pop-at-end)
> > > "Show the next message."
> > > - (interactive)
> > > - (let (r)
> > > + (interactive "P")
> > > + (let ((parent-buffer notmuch-show-parent-buffer)
> > > + (r))
> >
> > Extra brackets around 'r' are unnecessary. Otherwise, +1.
>
> This seems minor enough that I'm not going to resend, but noted for next
> time. Thanks.
On that basis, I hope no-one will complain if I fix them as a 'drive by'
during another change...
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end
2012-01-23 17:55 ` David Edmondson
@ 2012-01-23 18:51 ` Jameson Graef Rollins
0 siblings, 0 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-23 18:51 UTC (permalink / raw)
To: David Edmondson, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 647 bytes --]
On Mon, 23 Jan 2012 17:55:14 +0000, David Edmondson <dme@dme.org> wrote:
> On that basis, I hope no-one will complain if I fix them as a 'drive by'
> during another change...
Hrm. I don't think that follows. Unless the patch is already touching
that code, I would really prefer we continue to enforce that unrelated
changes go into separate patches.
There are plenty of other places in the code where we do use parens
around uninitialized variables. If you really want to remove them I
would prefer to see a patch to fixes them all at once. Doesn't seem
worth it to me, but everyone seems to be on an uncrustify kick recently,
so...
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 3/6] emacs: add message archiving functions
2012-01-23 8:34 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
@ 2012-01-23 11:01 ` David Edmondson
2012-01-24 18:44 ` Tomi Ollila
2 siblings, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-23 11:01 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 4 bytes --]
+1.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 3/6] emacs: add message archiving functions
2012-01-23 8:34 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
2012-01-23 11:01 ` [PATCH 3/6] emacs: add message archiving functions David Edmondson
@ 2012-01-24 18:44 ` Tomi Ollila
2 siblings, 0 replies; 84+ messages in thread
From: Tomi Ollila @ 2012-01-24 18:44 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
On Mon, 23 Jan 2012 00:34:22 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> This adds two new message archiving functions that parallel the thread
> archiving functions: notmuch-show-archive-message{,-then-next}. The
> former also takes a prefix argument to unarchive the message (ie. put
> back in inbox).
> ---
LGTM, except...
> +(defun notmuch-show-archive-message-then-next ()
> + "Archive the current message, then show next thread from search."
> + (interactive)
> + (notmuch-show-archive-message)
> + (notmuch-show-next-open-message))
> +
It goes to next open message but docstring says show nexr thread from search.
Tomi
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread
2012-01-23 8:34 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
@ 2012-01-23 11:01 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-23 11:01 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 4 bytes --]
+1.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions
2012-01-23 8:34 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
@ 2012-01-23 11:00 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-23 11:00 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
On Mon, 23 Jan 2012 00:34:20 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> Brake up notmuch-show-archive-thread-internal into two new functions:
"Break", otherwise +1.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
2012-01-23 8:33 ` Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
@ 2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode Jameson Graef Rollins
2012-01-31 3:28 ` David Bremner
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-25 0:06 UTC (permalink / raw)
To: Notmuch Mail
Final v3 rework of this patch series:
* reworked pop-at-end patch to be much simpler (which also happens to
get around other issues with this patch that dme had)
* added pop-at-end function to both show-next-...message functions
* fixed call to search-next-thread in show-next-thread function
* added patch at beginning to fix search thread navigation in show
mode
* add patch at end to fix doc string
* Fix doc string
jamie.
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode
2012-01-25 0:06 ` Jameson Graef Rollins
@ 2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
2012-01-25 10:53 ` [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode David Edmondson
2012-01-31 3:28 ` David Bremner
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-25 0:06 UTC (permalink / raw)
To: Notmuch Mail
We should always use the dedicated search mode navigation functions,
in case navigation mechanics change down the line.
---
emacs/notmuch-show.el | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index e6a5b31..a0045fc 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -39,6 +39,7 @@
(declare-function notmuch-call-notmuch-process "notmuch" (&rest args))
(declare-function notmuch-fontify-headers "notmuch" nil)
(declare-function notmuch-select-tag-with-completion "notmuch" (prompt &rest search-terms))
+(declare-function notmuch-search-next-thread "notmuch" nil)
(declare-function notmuch-search-show-thread "notmuch" nil)
(defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")
@@ -1535,7 +1536,7 @@ argument, hide all of the messages."
(if parent-buffer
(progn
(switch-to-buffer parent-buffer)
- (forward-line)
+ (notmuch-search-next-thread)
(if show-next
(notmuch-search-show-thread))))))
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions
2012-01-25 0:06 ` [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode Jameson Graef Rollins
@ 2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
2012-01-25 10:47 ` [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions David Edmondson
2012-01-25 10:53 ` [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode David Edmondson
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-25 0:06 UTC (permalink / raw)
To: Notmuch Mail
Brake up notmuch-show-archive-thread-internal into two new functions:
notmuch-show-tag-thread-internal: applies a tag to all messages in
thread. If option remove flag is t, tags will be removed instead of
added.
notmuch-show-next-thread: moves to the next thread in the search
result. If given a prefix, will show the next result, otherwise will
just move to it in the search view.
Two new interactive functions, notmuch-show-{add,remove}-tag-thread,
are also added. Together, these provide a better suit of thread
tagging and navigation tools.
The higher level thread archiving functions are modified to use these
new function.
---
emacs/notmuch-show.el | 46 +++++++++++++++++++++++++++++++++-------------
1 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index a0045fc..fb908b0 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1525,20 +1525,38 @@ argument, hide all of the messages."
(interactive)
(backward-button 1))
-(defun notmuch-show-archive-thread-internal (show-next)
- ;; Remove the tag from the current set of messages.
+(defun notmuch-show-tag-thread-internal (tag &optional remove)
+ "Add tag to the current set of messages.
+
+If the remove switch is given, tags will be removed instead of
+added."
(goto-char (point-min))
- (loop do (notmuch-show-remove-tag "inbox")
- until (not (notmuch-show-goto-message-next)))
- ;; Move to the next item in the search results, if any.
+ (let ((tag-function (if remove
+ 'notmuch-show-remove-tag
+ 'notmuch-show-add-tag)))
+ (loop do (funcall tag-function tag)
+ until (not (notmuch-show-goto-message-next)))))
+
+(defun notmuch-show-add-tag-thread (tag)
+ "Add tag to all messages in the current thread."
+ (interactive)
+ (notmuch-show-tag-thread-internal tag))
+
+(defun notmuch-show-remove-tag-thread (tag)
+ "Remove tag from all messages in the current thread."
+ (interactive)
+ (notmuch-show-tag-thread-internal tag t))
+
+(defun notmuch-show-next-thread (&optional show-next)
+ "Move to the next item in the search results, if any."
+ (interactive "P")
(let ((parent-buffer notmuch-show-parent-buffer))
(notmuch-kill-this-buffer)
- (if parent-buffer
- (progn
- (switch-to-buffer parent-buffer)
- (notmuch-search-next-thread)
- (if show-next
- (notmuch-search-show-thread))))))
+ (when parent-buffer
+ (switch-to-buffer parent-buffer)
+ (notmuch-search-next-thread)
+ (if show-next
+ (notmuch-search-show-thread)))))
(defun notmuch-show-archive-thread ()
"Archive each message in thread, then show next thread from search.
@@ -1552,12 +1570,14 @@ being delivered to the same thread. It does not archive the
entire thread, but only the messages shown in the current
buffer."
(interactive)
- (notmuch-show-archive-thread-internal t))
+ (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-next-thread t))
(defun notmuch-show-archive-thread-then-exit ()
"Archive each message in thread, then exit back to search results."
(interactive)
- (notmuch-show-archive-thread-internal nil))
+ (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-next-thread))
(defun notmuch-show-stash-cc ()
"Copy CC field of current message to kill-ring."
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread
2012-01-25 0:06 ` [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
@ 2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 4/8] emacs: add message archiving functions Jameson Graef Rollins
2012-01-25 10:49 ` [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread David Edmondson
2012-01-25 10:47 ` [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions David Edmondson
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-25 0:06 UTC (permalink / raw)
To: Notmuch Mail
This function is now just for archiving the current thread. A new
function is created to archive-then-next. The 'a' key binding is
updated accordingly.
This will allow people to bind to the simple thread archiving function
without the extra navigation. The archive-thread function now also
takes a prefix to unarchive the current thread (ie. put the whole
thread back in the inbox).
---
emacs/notmuch-show.el | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index fb908b0..071e662 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1044,7 +1044,7 @@ thread id. If a prefix is given, crypto processing is toggled."
(define-key map "-" 'notmuch-show-remove-tag)
(define-key map "+" 'notmuch-show-add-tag)
(define-key map "x" 'notmuch-show-archive-thread-then-exit)
- (define-key map "a" 'notmuch-show-archive-thread)
+ (define-key map "a" 'notmuch-show-archive-thread-then-next)
(define-key map "N" 'notmuch-show-next-message)
(define-key map "P" 'notmuch-show-previous-message)
(define-key map "n" 'notmuch-show-next-open-message)
@@ -1304,7 +1304,7 @@ thread from the search from which this thread was originally
shown."
(interactive)
(if (notmuch-show-advance)
- (notmuch-show-archive-thread)))
+ (notmuch-show-archive-thread-then-next)))
(defun notmuch-show-rewind ()
"Backup through the thread, (reverse scrolling compared to \\[notmuch-show-advance-and-archive]).
@@ -1558,8 +1558,12 @@ added."
(if show-next
(notmuch-search-show-thread)))))
-(defun notmuch-show-archive-thread ()
- "Archive each message in thread, then show next thread from search.
+(defun notmuch-show-archive-thread (&optional unarchive)
+ "Archive each message in thread.
+
+If a prefix argument is given, the messages will be
+\"unarchived\" (ie. the \"inbox\" tag will be added instead of
+removed).
Archive each message currently shown by removing the \"inbox\"
tag from each. Then kill this buffer and show the next thread
@@ -1569,14 +1573,21 @@ Note: This command is safe from any race condition of new messages
being delivered to the same thread. It does not archive the
entire thread, but only the messages shown in the current
buffer."
+ (interactive "P")
+ (if unarchive
+ (notmuch-show-add-tag-thread "inbox")
+ (notmuch-show-remove-tag-thread "inbox")))
+
+(defun notmuch-show-archive-thread-then-next ()
+ "Archive each message in thread, then show next thread from search."
(interactive)
- (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-archive-thread)
(notmuch-show-next-thread t))
(defun notmuch-show-archive-thread-then-exit ()
"Archive each message in thread, then exit back to search results."
(interactive)
- (notmuch-show-remove-tag-thread "inbox")
+ (notmuch-show-archive-thread)
(notmuch-show-next-thread))
(defun notmuch-show-stash-cc ()
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH v3 4/8] emacs: add message archiving functions
2012-01-25 0:06 ` [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
@ 2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end Jameson Graef Rollins
2012-01-25 10:50 ` [PATCH v3 4/8] emacs: add message archiving functions David Edmondson
2012-01-25 10:49 ` [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread David Edmondson
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-25 0:06 UTC (permalink / raw)
To: Notmuch Mail
This adds two new message archiving functions that parallel the thread
archiving functions: notmuch-show-archive-message{,-then-next}. The
former also takes a prefix argument to unarchive the message (ie. put
back in inbox).
---
emacs/notmuch-show.el | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 071e662..0dc594b 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1590,6 +1590,23 @@ buffer."
(notmuch-show-archive-thread)
(notmuch-show-next-thread))
+(defun notmuch-show-archive-message (&optional unarchive)
+ "Archive the current message.
+
+If a prefix argument is given, the message will be
+\"unarchived\" (ie. the \"inbox\" tag will be added instead of
+removed)."
+ (interactive "P")
+ (if unarchive
+ (notmuch-show-add-tag "inbox")
+ (notmuch-show-remove-tag "inbox")))
+
+(defun notmuch-show-archive-message-then-next ()
+ "Archive the current message, then show the next open message in the current thread."
+ (interactive)
+ (notmuch-show-archive-message)
+ (notmuch-show-next-open-message))
+
(defun notmuch-show-stash-cc ()
"Copy CC field of current message to kill-ring."
(interactive)
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end
2012-01-25 0:06 ` [PATCH v3 4/8] emacs: add message archiving functions Jameson Graef Rollins
@ 2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
2012-01-25 10:51 ` [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end David Edmondson
2012-01-25 10:50 ` [PATCH v3 4/8] emacs: add message archiving functions David Edmondson
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-25 0:06 UTC (permalink / raw)
To: Notmuch Mail
This will allow for keybindings that achieve a smoother message
processing flow by reducing the number of key presses needed for most
common operations.
---
emacs/notmuch-show.el | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 0dc594b..8837402 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1358,14 +1358,19 @@ any effects from previous calls to
(with-current-notmuch-show-message
(notmuch-mua-new-forward-message prompt-for-sender)))
-(defun notmuch-show-next-message ()
- "Show the next message."
- (interactive)
+(defun notmuch-show-next-message (&optional pop-at-end)
+ "Show the next message.
+
+If a prefix argument is given and this is the last message in the
+thread, navigate to the next thread in the parent search buffer."
+ (interactive "P")
(if (notmuch-show-goto-message-next)
(progn
(notmuch-show-mark-read)
(notmuch-show-message-adjust))
- (goto-char (point-max))))
+ (if pop-at-end
+ (notmuch-show-next-thread)
+ (goto-char (point-max)))))
(defun notmuch-show-previous-message ()
"Show the previous message."
@@ -1374,9 +1379,13 @@ any effects from previous calls to
(notmuch-show-mark-read)
(notmuch-show-message-adjust))
-(defun notmuch-show-next-open-message ()
- "Show the next message."
- (interactive)
+(defun notmuch-show-next-open-message (&optional pop-at-end)
+ "Show the next open message.
+
+If a prefix argument is given and this is the last open message
+in the thread, navigate to the next thread in the parent search
+buffer."
+ (interactive "P")
(let (r)
(while (and (setq r (notmuch-show-goto-message-next))
(not (notmuch-show-message-visible-p))))
@@ -1384,7 +1393,9 @@ any effects from previous calls to
(progn
(notmuch-show-mark-read)
(notmuch-show-message-adjust))
- (goto-char (point-max)))))
+ (if pop-at-end
+ (notmuch-show-next-thread)
+ (goto-char (point-max))))))
(defun notmuch-show-previous-open-message ()
"Show the previous message."
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function
2012-01-25 0:06 ` [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end Jameson Graef Rollins
@ 2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 7/8] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
2012-01-25 10:52 ` [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function David Edmondson
2012-01-25 10:51 ` [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end David Edmondson
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-25 0:06 UTC (permalink / raw)
To: Notmuch Mail
This provides a smoother message processing flow by reducing the
number of key presses needed for these common operations.
---
emacs/notmuch-show.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 8837402..b309b5b 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1616,7 +1616,7 @@ removed)."
"Archive the current message, then show the next open message in the current thread."
(interactive)
(notmuch-show-archive-message)
- (notmuch-show-next-open-message))
+ (notmuch-show-next-open-message t))
(defun notmuch-show-stash-cc ()
"Copy CC field of current message to kill-ring."
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH v3 7/8] emacs: modify the default show-mode key bindings for archiving
2012-01-25 0:06 ` [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
@ 2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 8/8] emacs: fix show-previous-message doc string Jameson Graef Rollins
2012-01-25 10:53 ` [PATCH v3 7/8] emacs: modify the default show-mode key bindings for archiving David Edmondson
2012-01-25 10:52 ` [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function David Edmondson
1 sibling, 2 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2012-01-25 0:06 UTC (permalink / raw)
To: Notmuch Mail
This changes the default key bindings for the 'a' key in notmuch-show
mode. Instead of archiving the entire thread, it now just archives
the current message, and then advance to the next open message
(archive-message-then-next). 'A' is now bound to the previous
archive-thread-then-next function.
---
emacs/notmuch-show.el | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index b309b5b..4de552d 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1044,7 +1044,8 @@ thread id. If a prefix is given, crypto processing is toggled."
(define-key map "-" 'notmuch-show-remove-tag)
(define-key map "+" 'notmuch-show-add-tag)
(define-key map "x" 'notmuch-show-archive-thread-then-exit)
- (define-key map "a" 'notmuch-show-archive-thread-then-next)
+ (define-key map "a" 'notmuch-show-archive-message-then-next)
+ (define-key map "A" 'notmuch-show-archive-thread-then-next)
(define-key map "N" 'notmuch-show-next-message)
(define-key map "P" 'notmuch-show-previous-message)
(define-key map "n" 'notmuch-show-next-open-message)
--
1.7.8.3
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function
2012-01-25 0:06 ` [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 7/8] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
@ 2012-01-25 10:52 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-25 10:52 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 6 bytes --]
Fine.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end
2012-01-25 0:06 ` [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
@ 2012-01-25 10:51 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-25 10:51 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 6 bytes --]
Fine.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH v3 4/8] emacs: add message archiving functions
2012-01-25 0:06 ` [PATCH v3 4/8] emacs: add message archiving functions Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end Jameson Graef Rollins
@ 2012-01-25 10:50 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-25 10:50 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]
On Tue, 24 Jan 2012 16:06:19 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> This adds two new message archiving functions that parallel the thread
> archiving functions: notmuch-show-archive-message{,-then-next}. The
> former also takes a prefix argument to unarchive the message (ie. put
> back in inbox).
> ---
> emacs/notmuch-show.el | 17 +++++++++++++++++
> 1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 071e662..0dc594b 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1590,6 +1590,23 @@ buffer."
> (notmuch-show-archive-thread)
> (notmuch-show-next-thread))
>
> +(defun notmuch-show-archive-message (&optional unarchive)
> + "Archive the current message.
> +
> +If a prefix argument is given, the message will be
> +\"unarchived\" (ie. the \"inbox\" tag will be added instead of
> +removed)."
Same comments as for the previous patch - just reference "inbox"
directly.
> + (interactive "P")
> + (if unarchive
> + (notmuch-show-add-tag "inbox")
> + (notmuch-show-remove-tag "inbox")))
> +
> +(defun notmuch-show-archive-message-then-next ()
> + "Archive the current message, then show the next open message in the current thread."
> + (interactive)
> + (notmuch-show-archive-message)
> + (notmuch-show-next-open-message))
> +
> (defun notmuch-show-stash-cc ()
> "Copy CC field of current message to kill-ring."
> (interactive)
> --
> 1.7.8.3
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread
2012-01-25 0:06 ` [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 4/8] emacs: add message archiving functions Jameson Graef Rollins
@ 2012-01-25 10:49 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-25 10:49 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 3655 bytes --]
On Tue, 24 Jan 2012 16:06:18 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> This function is now just for archiving the current thread. A new
> function is created to archive-then-next. The 'a' key binding is
> updated accordingly.
>
> This will allow people to bind to the simple thread archiving function
> without the extra navigation. The archive-thread function now also
> takes a prefix to unarchive the current thread (ie. put the whole
> thread back in the inbox).
> ---
> emacs/notmuch-show.el | 23 +++++++++++++++++------
> 1 files changed, 17 insertions(+), 6 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index fb908b0..071e662 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1044,7 +1044,7 @@ thread id. If a prefix is given, crypto processing is toggled."
> (define-key map "-" 'notmuch-show-remove-tag)
> (define-key map "+" 'notmuch-show-add-tag)
> (define-key map "x" 'notmuch-show-archive-thread-then-exit)
> - (define-key map "a" 'notmuch-show-archive-thread)
> + (define-key map "a" 'notmuch-show-archive-thread-then-next)
> (define-key map "N" 'notmuch-show-next-message)
> (define-key map "P" 'notmuch-show-previous-message)
> (define-key map "n" 'notmuch-show-next-open-message)
> @@ -1304,7 +1304,7 @@ thread from the search from which this thread was originally
> shown."
> (interactive)
> (if (notmuch-show-advance)
> - (notmuch-show-archive-thread)))
> + (notmuch-show-archive-thread-then-next)))
>
> (defun notmuch-show-rewind ()
> "Backup through the thread, (reverse scrolling compared to \\[notmuch-show-advance-and-archive]).
> @@ -1558,8 +1558,12 @@ added."
> (if show-next
> (notmuch-search-show-thread)))))
>
> -(defun notmuch-show-archive-thread ()
> - "Archive each message in thread, then show next thread from search.
> +(defun notmuch-show-archive-thread (&optional unarchive)
> + "Archive each message in thread.
> +
> +If a prefix argument is given, the messages will be
> +\"unarchived\" (ie. the \"inbox\" tag will be added instead of
> +removed).
It's clearer to reference "inbox" directly:
Remove the "inbox" tag from the messages currently shown.
If a prefix argument is given the "inbox" tag will be added rather
than removed.
>
> Archive each message currently shown by removing the \"inbox\"
> tag from each. Then kill this buffer and show the next thread
> @@ -1569,14 +1573,21 @@ Note: This command is safe from any race condition of new messages
> being delivered to the same thread. It does not archive the
> entire thread, but only the messages shown in the current
> buffer."
> + (interactive "P")
> + (if unarchive
> + (notmuch-show-add-tag-thread "inbox")
> + (notmuch-show-remove-tag-thread "inbox")))
> +
> +(defun notmuch-show-archive-thread-then-next ()
> + "Archive each message in thread, then show next thread from search."
> (interactive)
> - (notmuch-show-remove-tag-thread "inbox")
> + (notmuch-show-archive-thread)
> (notmuch-show-next-thread t))
>
> (defun notmuch-show-archive-thread-then-exit ()
> "Archive each message in thread, then exit back to search results."
> (interactive)
> - (notmuch-show-remove-tag-thread "inbox")
> + (notmuch-show-archive-thread)
> (notmuch-show-next-thread))
>
> (defun notmuch-show-stash-cc ()
> --
> 1.7.8.3
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions
2012-01-25 0:06 ` [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
@ 2012-01-25 10:47 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-25 10:47 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 4063 bytes --]
On Tue, 24 Jan 2012 16:06:17 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> notmuch-show-tag-thread-internal: applies a tag to all messages in
> thread. If option remove flag is t, tags will be removed instead of
> added.
If it's non-nil, but yes.
> notmuch-show-next-thread: moves to the next thread in the search
> result. If given a prefix, will show the next result, otherwise will
> just move to it in the search view.
>
> Two new interactive functions, notmuch-show-{add,remove}-tag-thread,
> are also added. Together, these provide a better suit of thread
> tagging and navigation tools.
>
> The higher level thread archiving functions are modified to use these
> new function.
> ---
> emacs/notmuch-show.el | 46 +++++++++++++++++++++++++++++++++-------------
> 1 files changed, 33 insertions(+), 13 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index a0045fc..fb908b0 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1525,20 +1525,38 @@ argument, hide all of the messages."
> (interactive)
> (backward-button 1))
>
> -(defun notmuch-show-archive-thread-internal (show-next)
> - ;; Remove the tag from the current set of messages.
> +(defun notmuch-show-tag-thread-internal (tag &optional remove)
> + "Add tag to the current set of messages.
"Add TAG to all messages in the current buffer."
> +
> +If the remove switch is given, tags will be removed instead of
> +added."
"If the REMOVE argument is non-nil, ..."
> (goto-char (point-min))
> - (loop do (notmuch-show-remove-tag "inbox")
> - until (not (notmuch-show-goto-message-next)))
> - ;; Move to the next item in the search results, if any.
> + (let ((tag-function (if remove
> + 'notmuch-show-remove-tag
> + 'notmuch-show-add-tag)))
> + (loop do (funcall tag-function tag)
> + until (not (notmuch-show-goto-message-next)))))
I wonder if we shouldn't have a macro for "do something to all messages
in the current buffer" that could be used more widely.
> +
> +(defun notmuch-show-add-tag-thread (tag)
> + "Add tag to all messages in the current thread."
> + (interactive)
> + (notmuch-show-tag-thread-internal tag))
> +
> +(defun notmuch-show-remove-tag-thread (tag)
> + "Remove tag from all messages in the current thread."
> + (interactive)
> + (notmuch-show-tag-thread-internal tag t))
> +
> +(defun notmuch-show-next-thread (&optional show-next)
> + "Move to the next item in the search results, if any."
Describe the meaning of SHOW-NEXT.
> + (interactive "P")
> (let ((parent-buffer notmuch-show-parent-buffer))
> (notmuch-kill-this-buffer)
> - (if parent-buffer
> - (progn
> - (switch-to-buffer parent-buffer)
> - (notmuch-search-next-thread)
> - (if show-next
> - (notmuch-search-show-thread))))))
> + (when parent-buffer
> + (switch-to-buffer parent-buffer)
> + (notmuch-search-next-thread)
> + (if show-next
> + (notmuch-search-show-thread)))))
>
> (defun notmuch-show-archive-thread ()
> "Archive each message in thread, then show next thread from search.
> @@ -1552,12 +1570,14 @@ being delivered to the same thread. It does not archive the
> entire thread, but only the messages shown in the current
> buffer."
> (interactive)
> - (notmuch-show-archive-thread-internal t))
> + (notmuch-show-remove-tag-thread "inbox")
> + (notmuch-show-next-thread t))
>
> (defun notmuch-show-archive-thread-then-exit ()
> "Archive each message in thread, then exit back to search results."
> (interactive)
> - (notmuch-show-archive-thread-internal nil))
> + (notmuch-show-remove-tag-thread "inbox")
> + (notmuch-show-next-thread))
>
> (defun notmuch-show-stash-cc ()
> "Copy CC field of current message to kill-ring."
> --
> 1.7.8.3
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode
2012-01-25 0:06 ` [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
@ 2012-01-25 10:53 ` David Edmondson
1 sibling, 0 replies; 84+ messages in thread
From: David Edmondson @ 2012-01-25 10:53 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
[-- Attachment #1: Type: text/plain, Size: 6 bytes --]
Fine.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode Jameson Graef Rollins
@ 2012-01-31 3:28 ` David Bremner
1 sibling, 0 replies; 84+ messages in thread
From: David Bremner @ 2012-01-31 3:28 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
On Tue, 24 Jan 2012 16:06:15 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> Final v3 rework of this patch series:
>
pushed.
d
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
@ 2018-02-01 20:53 Matthew Lear
2018-02-03 22:38 ` Jani Nikula
0 siblings, 1 reply; 84+ messages in thread
From: Matthew Lear @ 2018-02-01 20:53 UTC (permalink / raw)
To: notmuch, matt
From: Matthew Lear <matt@bubblegen.co.uk>
To: notmuch@notmuchmail.org
Cc: Matthew Lear <matt@bubblegen.co.uk>
Subject: [PATCH] Update date search syntax.
Date: Thu, 1 Feb 2018 20:52:18 +0000
Message-Id: <20180201205218.4368-1-matt@bubblegen.co.uk>
X-Mailer: git-send-email 2.14.1
If searching using the date prefix and timestamps, each timestamp
is required to be prefixed with an @
Legacy syntax of <initial-timestamp>..<final-timestamp> without the
date prefix is still honoured, only without the @ specifiers.
---
doc/man7/notmuch-search-terms.rst | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst
index 6d2bf62a..b6e7079a 100644
--- a/doc/man7/notmuch-search-terms.rst
+++ b/doc/man7/notmuch-search-terms.rst
@@ -124,10 +124,13 @@ date:<since>..<until> or date:<date>
The time range can also be specified using timestamps with a
syntax of:
- <initial-timestamp>..<final-timestamp>
+ @<initial-timestamp>..@<final-timestamp>
Each timestamp is a number representing the number of seconds
- since 1970-01-01 00:00:00 UTC.
+ since 1970-01-01 00:00:00 UTC. A date range search using
+ timestamps is also permitted without using the date prefix and
+ @ specifiers, although this is considered legacy and pre-dates
+ the date prefix.
lastmod:<initial-revision>..<final-revision>
The **lastmod:** prefix can be used to restrict the result by the
--
2.14.1
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re:
2018-02-01 20:53 Matthew Lear
@ 2018-02-03 22:38 ` Jani Nikula
0 siblings, 0 replies; 84+ messages in thread
From: Jani Nikula @ 2018-02-03 22:38 UTC (permalink / raw)
To: Matthew Lear, notmuch, matt
On Thu, 01 Feb 2018, Matthew Lear <matt@bubblegen.co.uk> wrote:
> From: Matthew Lear <matt@bubblegen.co.uk>
> To: notmuch@notmuchmail.org
> Cc: Matthew Lear <matt@bubblegen.co.uk>
> Subject: [PATCH] Update date search syntax.
> Date: Thu, 1 Feb 2018 20:52:18 +0000
> Message-Id: <20180201205218.4368-1-matt@bubblegen.co.uk>
> X-Mailer: git-send-email 2.14.1
>
> If searching using the date prefix and timestamps, each timestamp
> is required to be prefixed with an @
> Legacy syntax of <initial-timestamp>..<final-timestamp> without the
> date prefix is still honoured, only without the @ specifiers.
> ---
> doc/man7/notmuch-search-terms.rst | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst
> index 6d2bf62a..b6e7079a 100644
> --- a/doc/man7/notmuch-search-terms.rst
> +++ b/doc/man7/notmuch-search-terms.rst
> @@ -124,10 +124,13 @@ date:<since>..<until> or date:<date>
> The time range can also be specified using timestamps with a
> syntax of:
>
> - <initial-timestamp>..<final-timestamp>
> + @<initial-timestamp>..@<final-timestamp>
So I think I'd add the @ syntax in the DATE AND TIME SEARCH section,
maybe under a separate new heading, and just emphasize this here is
about the non-date prefixed thing.
BR,
Jani.
> Each timestamp is a number representing the number of seconds
> - since 1970-01-01 00:00:00 UTC.
> + since 1970-01-01 00:00:00 UTC. A date range search using
> + timestamps is also permitted without using the date prefix and
> + @ specifiers, although this is considered legacy and pre-dates
> + the date prefix.
>
> lastmod:<initial-revision>..<final-revision>
> The **lastmod:** prefix can be used to restrict the result by the
> --
> 2.14.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH] Add Emacs' imenu support in notmuch-show and notmuch-search
@ 2017-06-11 11:00 David Bremner
2017-06-12 13:30 ` Damien Cassou
0 siblings, 1 reply; 84+ messages in thread
From: David Bremner @ 2017-06-11 11:00 UTC (permalink / raw)
To: Damien Cassou, notmuch
Damien Cassou <damien@cassou.me> writes:
> David Bremner <david@tethera.net> writes:
>> I am indeed using the default. I think you forgot the screen
>> shot.
>
>
> indeed. Attached to this email.
>
>
>>> I can still get rid of indentation if you confirm you don't
>>> want it.
>>
>> I think so, although to be honest I never tried imenu before
>> testing your patches, perhaps we should wait for other opinions.
>
>
> I advise you to install counsel at least for that (I don't use it
> for anything else).
>
OK, I see with counsel-imenu the current indexing by header lines is
reasonable. It might be improvable by adding the subject, but I'm not
sure about line lengths.
- maybe the docstrings should recomment counsel-imenu?
- I think the indentation should probably go to make it more
usable with the builtin imenu
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
2017-06-11 11:00 [PATCH] Add Emacs' imenu support in notmuch-show and notmuch-search David Bremner
@ 2017-06-12 13:30 ` Damien Cassou
2017-06-14 1:22 ` David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: Damien Cassou @ 2017-06-12 13:30 UTC (permalink / raw)
To: David Bremner, Damien Cassou, notmuch
> OK, I see with counsel-imenu the current indexing by header lines is
> reasonable. It might be improvable by adding the subject, but I'm
> not sure about line lengths.
> - maybe the docstrings should recomment counsel-imenu?
I'm not sure as the function
`notmuch-show-imenu-extract-index-name-function` is private and there
are other imenu frontends available. What about a NEWS entry instead
along those lines:
* Add Emacs' imenu support in notmuch-show and notmuch-search
Emacs' major modes can facilitate navigation in their buffers by
supporting Imenu. In such major modes, launching Imenu (M-x imenu)
makes Emacs display a list of items (e.g., function definitions in
a code buffer). Selecting an item from this list moves point to
this item.
This release adds Imenu support to both notmuch-show and
notmuch-search buffers:
* in notmuch-show, Imenu will present a list of all messages in
the currently visible thread;
* in notmuch-search, Imenu will present a list of all messages in the
search buffer.
We recommand an external imenu frontend, such as counsel-imenu,
which will make the experience much better that the default `M-x
imenu`.
> I think the indentation should probably go to make it more usable
> with the builtin imenu
I did that in the patch even though I liked it with indentation better.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2017-06-12 13:30 ` Damien Cassou
@ 2017-06-14 1:22 ` David Bremner
2017-06-14 9:44 ` Re: David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: David Bremner @ 2017-06-14 1:22 UTC (permalink / raw)
To: Damien Cassou, Damien Cassou, notmuch
Damien Cassou <damien@cassou.me> writes:
>> OK, I see with counsel-imenu the current indexing by header lines is
>> reasonable. It might be improvable by adding the subject, but I'm
>> not sure about line lengths.
>> - maybe the docstrings should recomment counsel-imenu?
>
> I'm not sure as the function
> `notmuch-show-imenu-extract-index-name-function` is private and there
> are other imenu frontends available. What about a NEWS entry instead
> along those lines:
>
> * Add Emacs' imenu support in notmuch-show and notmuch-search
>
> Emacs' major modes can facilitate navigation in their buffers by
> supporting Imenu. In such major modes, launching Imenu (M-x imenu)
> makes Emacs display a list of items (e.g., function definitions in
> a code buffer). Selecting an item from this list moves point to
> this item.
>
> This release adds Imenu support to both notmuch-show and
> notmuch-search buffers:
>
> * in notmuch-show, Imenu will present a list of all messages in
> the currently visible thread;
>
> * in notmuch-search, Imenu will present a list of all messages in the
> search buffer.
>
> We recommand an external imenu frontend, such as counsel-imenu,
> which will make the experience much better that the default `M-x
> imenu`.
That sounds fine.
>> I think the indentation should probably go to make it more usable
>> with the builtin imenu
>
> I did that in the patch even though I liked it with indentation better.
I haven't had a chance to test the new version yet, but I think I know
what you mean from testing counsel-imenu. Is it worth adding a
customization variable so that the user can choose indentation if they
have a more sophisticated imenu front end?
d
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2017-06-14 1:22 ` David Bremner
@ 2017-06-14 9:44 ` David Bremner
2017-06-14 9:54 ` Re: Damien Cassou
0 siblings, 1 reply; 84+ messages in thread
From: David Bremner @ 2017-06-14 9:44 UTC (permalink / raw)
To: Damien Cassou, Damien Cassou, notmuch
David Bremner <david@tethera.net> writes:
>> I did that in the patch even though I liked it with indentation better.
>
> I haven't had a chance to test the new version yet, but I think I know
> what you mean from testing counsel-imenu. Is it worth adding a
> customization variable so that the user can choose indentation if they
> have a more sophisticated imenu front end?
So this version is ok with both builtin and counsel imenu front
ends. It's up to you. Do you want to leave the question of controllable
indentation for a later commit or add it now?
d
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2017-06-14 9:44 ` Re: David Bremner
@ 2017-06-14 9:54 ` Damien Cassou
0 siblings, 0 replies; 84+ messages in thread
From: Damien Cassou @ 2017-06-14 9:54 UTC (permalink / raw)
To: David Bremner, notmuch
David Bremner <david@tethera.net> writes:
> David Bremner <david@tethera.net> writes:
>
>>> I did that in the patch even though I liked it with
>>> indentation better.
>>
>> I haven't had a chance to test the new version yet, but I think
>> I know what you mean from testing counsel-imenu. Is it worth
>> adding a customization variable so that the user can choose
>> indentation if they have a more sophisticated imenu front end?
>
> So this version is ok with both builtin and counsel imenu front
> ends. It's up to you. Do you want to leave the question of
> controllable indentation for a later commit or add it now?
if you are ok to merge that right now, that would be perfect for
me. Thanks.
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
@ 2017-05-23 18:54 Tomi Ollila
2017-05-26 10:40 ` David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: Tomi Ollila @ 2017-05-23 18:54 UTC (permalink / raw)
To: notmuch; +Cc: tomi.ollila
This implementation adds add_exit_function (and rm_exit_function)
which can also be used for other things in the future.
Now that I did this simpler way would be to just check for
existence of $GNUPGHOME for indication to exit gpg processes.
If that path is taken this series can be used for future reference
if need for atexit functionality arises.
From Tomi Ollila <tomi.ollila@iki.fi> # This line is ignored.
From: Tomi Ollila <tomi.ollila@iki.fi>
Subject: stop gpg-agent (among other) processes at test module exit
In-Reply-To:
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
@ 2016-10-15 8:44 Matthew Lear
0 siblings, 0 replies; 84+ messages in thread
From: Matthew Lear @ 2016-10-15 8:44 UTC (permalink / raw)
To: Mark Walters, notmuch
[-- Attachment #1: Type: text/plain, Size: 2594 bytes --]
Hi Mark. Excellent :-) I'll look out for it in the repository at some point soon. Cheers, Matt
-------- Original message --------From: Mark Walters <markwalters1009@gmail.com> Date: 15/10/2016 08:09 (GMT+00:00) To: matt@bubblegen.co.uk, notmuch@notmuchmail.org, matt@bubblegen.co.uk Subject: Re:
On Wed, 12 Oct 2016, Mark Walters <markwalters1009@gmail.com> wrote:
> On Tue, 11 Oct 2016, matt@bubblegen.co.uk wrote:
>> From: Matthew Lear <matt@bubblegen.co.uk>
>> To: notmuch@notmuchmail.org
>> Cc: Matthew Lear <matt@bubblegen.co.uk>
>> Subject: [PATCH] Fix reply to encrypted mail when discouraging plain text.
>> Date: Tue, 11 Oct 2016 22:24:18 +0100
>> Message-Id: <1476221058-10431-1-git-send-email-matt@bubblegen.co.uk>
>> X-Mailer: git-send-email 2.4.10
>>
>> If an encrypted multipart message is received which contains html and
>> notmuch-multipart/alternative-discouraged is set to discourage "text/plain",
>> any encrypted parts are not decrypted during generation of the reply
>> text. This fixes that problem by making sure notmuch-mua-reply does
>> that.
>
> Hi
>
> I haven't tested this but it looks correct: more broadly I think this is
> needed whenever notmuch-show has to get a part directly rather than just
> from the sexp reply.
Hi
Just to confirm I have now tested this -- it compiles and test suite
passes. (Note I don't have suitable encrypted messages to test).
Anyway LGTM +1
Best wishes
Mark
>
> Best wishes
>
> Mark
>
>
>> ---
>> emacs/notmuch-mua.el | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
>> index c567173..f333655 100644
>> --- a/emacs/notmuch-mua.el
>> +++ b/emacs/notmuch-mua.el
>> @@ -251,6 +251,10 @@ mutiple parts get a header."
>> (notmuch-show-max-text-part-size 0)
>> ;; Insert headers for parts as appropriate for replying.
>> (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function)
>> + ;; Ensure that any encrypted parts are
>> + ;; decrypted during the generation of the reply
>> + ;; text.
>> + (notmuch-show-process-crypto process-crypto)
>> ;; Don't indent multipart sub-parts.
>> (notmuch-show-indent-multipart nil))
>> ;; We don't want sigstatus buttons (an information leak and usually wrong anyway).
>> --
>> 2.4.10
>>
>> _______________________________________________
>> notmuch mailing list
>> notmuch@notmuchmail.org
>> https://notmuchmail.org/mailman/listinfo/notmuch
[-- Attachment #2: Type: text/html, Size: 3660 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
@ 2016-10-13 19:37 Matt Armstrong
2016-10-13 19:42 ` Matt Armstrong
0 siblings, 1 reply; 84+ messages in thread
From: Matt Armstrong @ 2016-10-13 19:37 UTC (permalink / raw)
To: notmuch
This supercedes
id:1476207707-21827-1-git-send-email-marmstrong@google.com with
changes steming from Mark's helpful feedback.
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
@ 2016-10-11 21:24 matt
2016-10-12 7:51 ` Mark Walters
2016-10-17 12:01 ` Re: David Bremner
0 siblings, 2 replies; 84+ messages in thread
From: matt @ 2016-10-11 21:24 UTC (permalink / raw)
To: notmuch, matt
From: Matthew Lear <matt@bubblegen.co.uk>
To: notmuch@notmuchmail.org
Cc: Matthew Lear <matt@bubblegen.co.uk>
Subject: [PATCH] Fix reply to encrypted mail when discouraging plain text.
Date: Tue, 11 Oct 2016 22:24:18 +0100
Message-Id: <1476221058-10431-1-git-send-email-matt@bubblegen.co.uk>
X-Mailer: git-send-email 2.4.10
If an encrypted multipart message is received which contains html and
notmuch-multipart/alternative-discouraged is set to discourage "text/plain",
any encrypted parts are not decrypted during generation of the reply
text. This fixes that problem by making sure notmuch-mua-reply does
that.
---
emacs/notmuch-mua.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index c567173..f333655 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -251,6 +251,10 @@ mutiple parts get a header."
(notmuch-show-max-text-part-size 0)
;; Insert headers for parts as appropriate for replying.
(notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function)
+ ;; Ensure that any encrypted parts are
+ ;; decrypted during the generation of the reply
+ ;; text.
+ (notmuch-show-process-crypto process-crypto)
;; Don't indent multipart sub-parts.
(notmuch-show-indent-multipart nil))
;; We don't want sigstatus buttons (an information leak and usually wrong anyway).
--
2.4.10
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re:
2016-10-11 21:24 matt
@ 2016-10-12 7:51 ` Mark Walters
2016-10-15 7:09 ` Re: Mark Walters
2016-10-17 12:01 ` Re: David Bremner
1 sibling, 1 reply; 84+ messages in thread
From: Mark Walters @ 2016-10-12 7:51 UTC (permalink / raw)
To: matt, notmuch, matt
On Tue, 11 Oct 2016, matt@bubblegen.co.uk wrote:
> From: Matthew Lear <matt@bubblegen.co.uk>
> To: notmuch@notmuchmail.org
> Cc: Matthew Lear <matt@bubblegen.co.uk>
> Subject: [PATCH] Fix reply to encrypted mail when discouraging plain text.
> Date: Tue, 11 Oct 2016 22:24:18 +0100
> Message-Id: <1476221058-10431-1-git-send-email-matt@bubblegen.co.uk>
> X-Mailer: git-send-email 2.4.10
>
> If an encrypted multipart message is received which contains html and
> notmuch-multipart/alternative-discouraged is set to discourage "text/plain",
> any encrypted parts are not decrypted during generation of the reply
> text. This fixes that problem by making sure notmuch-mua-reply does
> that.
Hi
I haven't tested this but it looks correct: more broadly I think this is
needed whenever notmuch-show has to get a part directly rather than just
from the sexp reply.
Best wishes
Mark
> ---
> emacs/notmuch-mua.el | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index c567173..f333655 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -251,6 +251,10 @@ mutiple parts get a header."
> (notmuch-show-max-text-part-size 0)
> ;; Insert headers for parts as appropriate for replying.
> (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function)
> + ;; Ensure that any encrypted parts are
> + ;; decrypted during the generation of the reply
> + ;; text.
> + (notmuch-show-process-crypto process-crypto)
> ;; Don't indent multipart sub-parts.
> (notmuch-show-indent-multipart nil))
> ;; We don't want sigstatus buttons (an information leak and usually wrong anyway).
> --
> 2.4.10
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2016-10-12 7:51 ` Mark Walters
@ 2016-10-15 7:09 ` Mark Walters
0 siblings, 0 replies; 84+ messages in thread
From: Mark Walters @ 2016-10-15 7:09 UTC (permalink / raw)
To: matt, notmuch, matt
On Wed, 12 Oct 2016, Mark Walters <markwalters1009@gmail.com> wrote:
> On Tue, 11 Oct 2016, matt@bubblegen.co.uk wrote:
>> From: Matthew Lear <matt@bubblegen.co.uk>
>> To: notmuch@notmuchmail.org
>> Cc: Matthew Lear <matt@bubblegen.co.uk>
>> Subject: [PATCH] Fix reply to encrypted mail when discouraging plain text.
>> Date: Tue, 11 Oct 2016 22:24:18 +0100
>> Message-Id: <1476221058-10431-1-git-send-email-matt@bubblegen.co.uk>
>> X-Mailer: git-send-email 2.4.10
>>
>> If an encrypted multipart message is received which contains html and
>> notmuch-multipart/alternative-discouraged is set to discourage "text/plain",
>> any encrypted parts are not decrypted during generation of the reply
>> text. This fixes that problem by making sure notmuch-mua-reply does
>> that.
>
> Hi
>
> I haven't tested this but it looks correct: more broadly I think this is
> needed whenever notmuch-show has to get a part directly rather than just
> from the sexp reply.
Hi
Just to confirm I have now tested this -- it compiles and test suite
passes. (Note I don't have suitable encrypted messages to test).
Anyway LGTM +1
Best wishes
Mark
>
> Best wishes
>
> Mark
>
>
>> ---
>> emacs/notmuch-mua.el | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
>> index c567173..f333655 100644
>> --- a/emacs/notmuch-mua.el
>> +++ b/emacs/notmuch-mua.el
>> @@ -251,6 +251,10 @@ mutiple parts get a header."
>> (notmuch-show-max-text-part-size 0)
>> ;; Insert headers for parts as appropriate for replying.
>> (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function)
>> + ;; Ensure that any encrypted parts are
>> + ;; decrypted during the generation of the reply
>> + ;; text.
>> + (notmuch-show-process-crypto process-crypto)
>> ;; Don't indent multipart sub-parts.
>> (notmuch-show-indent-multipart nil))
>> ;; We don't want sigstatus buttons (an information leak and usually wrong anyway).
>> --
>> 2.4.10
>>
>> _______________________________________________
>> notmuch mailing list
>> notmuch@notmuchmail.org
>> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2016-10-11 21:24 matt
2016-10-12 7:51 ` Mark Walters
@ 2016-10-17 12:01 ` David Bremner
1 sibling, 0 replies; 84+ messages in thread
From: David Bremner @ 2016-10-17 12:01 UTC (permalink / raw)
To: matt, notmuch, matt
matt@bubblegen.co.uk writes:
> From: Matthew Lear <matt@bubblegen.co.uk>
> To: notmuch@notmuchmail.org
> Cc: Matthew Lear <matt@bubblegen.co.uk>
> Subject: [PATCH] Fix reply to encrypted mail when discouraging plain text.
> Date: Tue, 11 Oct 2016 22:24:18 +0100
> Message-Id: <1476221058-10431-1-git-send-email-matt@bubblegen.co.uk>
> X-Mailer: git-send-email 2.4.10
Pushed to master. For future reference it would be nice if the actual
git send-email output made to the list, so I don't have to fix up the
commit message by hand.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 1/3] doc: add details about Xapian search syntax
@ 2015-01-25 17:58 David Bremner
2015-02-23 20:05 ` David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: David Bremner @ 2015-01-25 17:58 UTC (permalink / raw)
To: Jani Nikula, notmuch
David Bremner <david@tethera.net> writes:
> Questions related to the way that probabilistic prefixes and phrases
> are handled come up quite often and it is nicer to have the documentation self contained. Hopefully putting it in subsections prevents it from being overwhelming.
Pushed the first patch to master.
d
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
@ 2014-10-03 21:18 David Bremner
2014-10-03 21:22 ` David Bremner
2014-10-16 21:14 ` Re: Jani Nikula
0 siblings, 2 replies; 84+ messages in thread
From: David Bremner @ 2014-10-03 21:18 UTC (permalink / raw)
To: notmuch
This is in some sense a successor to
id:cover.1411914914.git.jani@nikula.org
It includes the first two patches of that series verbatim, and adds
some tests.
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
@ 2014-05-06 13:06 David Bremner
2014-05-06 18:14 ` Jameson Graef Rollins
2014-05-06 18:26 ` Re: Tomi Ollila
0 siblings, 2 replies; 84+ messages in thread
From: David Bremner @ 2014-05-06 13:06 UTC (permalink / raw)
To: notmuch
The first of these fixes a build failure on Debian Linux/armhf (and
OS/X). If the patch seems ok, I'd like to roll it into a bug fix
release. The second is more of a suggestion to make that atomicity
test easier to debug, since it seems to find the dark corners of gdb.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2014-05-06 13:06 David Bremner
@ 2014-05-06 18:14 ` Jameson Graef Rollins
2014-05-06 18:26 ` Re: Tomi Ollila
1 sibling, 0 replies; 84+ messages in thread
From: Jameson Graef Rollins @ 2014-05-06 18:14 UTC (permalink / raw)
To: David Bremner, notmuch
[-- Attachment #1: Type: text/plain, Size: 498 bytes --]
On Tue, May 06 2014, David Bremner <david@tethera.net> wrote:
> The first of these fixes a build failure on Debian Linux/armhf (and
> OS/X). If the patch seems ok, I'd like to roll it into a bug fix
> release. The second is more of a suggestion to make that atomicity
> test easier to debug, since it seems to find the dark corners of gdb.
Hey, David. It looks like Charles's series fixes some of these same
issues and more:
id:1399395748-44920-1-git-send-email-cceleri@cs.stanford.edu
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2014-05-06 13:06 David Bremner
2014-05-06 18:14 ` Jameson Graef Rollins
@ 2014-05-06 18:26 ` Tomi Ollila
1 sibling, 0 replies; 84+ messages in thread
From: Tomi Ollila @ 2014-05-06 18:26 UTC (permalink / raw)
To: David Bremner, notmuch
On Tue, May 06 2014, David Bremner <david@tethera.net> wrote:
> The first of these fixes a build failure on Debian Linux/armhf (and
> OS/X). If the patch seems ok, I'd like to roll it into a bug fix
> release. The second is more of a suggestion to make that atomicity
> test easier to debug, since it seems to find the dark corners of gdb.
Series LGTM.
Tomi
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: v2 man page build fixups
@ 2014-03-11 18:16 Tomi Ollila
2014-03-13 3:21 ` David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: Tomi Ollila @ 2014-03-11 18:16 UTC (permalink / raw)
To: David Bremner, notmuch
On Tue, Mar 11 2014, David Bremner <david@tethera.net> wrote:
> Here is an improved version of somewhat hasty series of last night.
>
> It incorporates fixups from Jani that he sent to me off list.
I played with the series trying various tricks and all seems to
work fine. Also it is nice to see that one line in prerst2man.py
is fixed to better shape :D
Also a command line, should anyone ever need it (I doubt ;)
$ make SPHINXBUILD=sphinx-1.0-build HAVE_SPHINX=1 build-man
worked fine.
+1
Tomi
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
2014-03-11 18:16 v2 man page build fixups Tomi Ollila
@ 2014-03-13 3:21 ` David Bremner
2014-03-17 10:55 ` Tomi Ollila
2014-03-18 10:52 ` Re: David Bremner
0 siblings, 2 replies; 84+ messages in thread
From: David Bremner @ 2014-03-13 3:21 UTC (permalink / raw)
To: notmuch
Several people observed a problem with the test T010-help not finding
the man pages anymore. To fix that, I had change the previous fix:
instead of flattening the rst2man output into one directory, I had to
move the sphinx output into a hierarchy.
Patches 1 and 3 should be the same as
id:1394539555-28334-1-git-send-email-david@tethera.net
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2014-03-13 3:21 ` David Bremner
@ 2014-03-17 10:55 ` Tomi Ollila
2014-03-18 10:52 ` Re: David Bremner
1 sibling, 0 replies; 84+ messages in thread
From: Tomi Ollila @ 2014-03-17 10:55 UTC (permalink / raw)
To: David Bremner, notmuch
On Thu, Mar 13 2014, David Bremner <david@tethera.net> wrote:
> Several people observed a problem with the test T010-help not finding
> the man pages anymore. To fix that, I had change the previous fix:
> instead of flattening the rst2man output into one directory, I had to
> move the sphinx output into a hierarchy.
These patches fix my build and tests pass. +1
Database upgraded (real men don't use backups or how did it go ?).
Tomi
>
> Patches 1 and 3 should be the same as
>
> id:1394539555-28334-1-git-send-email-david@tethera.net
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2014-03-13 3:21 ` David Bremner
2014-03-17 10:55 ` Tomi Ollila
@ 2014-03-18 10:52 ` David Bremner
1 sibling, 0 replies; 84+ messages in thread
From: David Bremner @ 2014-03-18 10:52 UTC (permalink / raw)
To: notmuch
David Bremner <david@tethera.net> writes:
> Several people observed a problem with the test T010-help not finding
> the man pages anymore. To fix that, I had change the previous fix:
> instead of flattening the rst2man output into one directory, I had to
> move the sphinx output into a hierarchy.
>
> Patches 1 and 3 should be the same as
>
> id:1394539555-28334-1-git-send-email-david@tethera.net
>
pushed this series
d
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [RFC Patch] start of sphinx based docs
@ 2014-01-19 18:57 David Bremner
2014-01-28 16:12 ` David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: David Bremner @ 2014-01-19 18:57 UTC (permalink / raw)
To: Tomi Ollila, notmuch
Tomi Ollila <tomi.ollila@iki.fi> writes:
>
> This looks like a good plan, only Makefile & conf.py is a bit noisy
> (like Jani's original Doxyfile)
That should be easy to fix. Whoevery posted that patch was incredibly
lazy ;).
> Also;
> centos 6$ sudo yum install python-sphinx
> ...
> Downloading Packages:
> (1/5): python-babel-0.9.4-5.1.el6.noarch.rpm | 1.4 MB 00:07
> (2/5): python-jinja2-2.2.1-1.el6.x86_64.rpm | 464 kB 00:02
> (3/5): python-pygments-1.1.1-1.el6.noarch.rpm | 561 kB 00:02
> (4/5): python-setuptools-0.6.10-3.el6.noarch.rpm | 335 kB 00:01
> (5/5): python-sphinx-0.6.6-2.el6.noarch.rpm | 486 kB 00:02
> ---------------------------------------------------------------------------
> Total 200 kB/s | 3.2 MB 00:16
>
> (python-docutils were already installed)
> I wonder how hard it is to install these on some systems...
It's definitely a concern. We could fall back to python-docutils to
generate the manpages, since there is a standalone rst2man script there.
There are some incompatibilities about how the TH line is generated, but
I think those could be hacked around, if people thought it was worth it.
d
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
2014-01-19 18:57 [RFC Patch] start of sphinx based docs David Bremner
@ 2014-01-28 16:12 ` David Bremner
2014-01-28 22:54 ` Mark Walters
0 siblings, 1 reply; 84+ messages in thread
From: David Bremner @ 2014-01-28 16:12 UTC (permalink / raw)
To: notmuch
Here's a second try.
- less build system cruft
- integrate into notmuch's build system
- optionally build the man pages (but not info) using just
python-docutils.
No doubt this could use polishing; I'm still looking for feedback on
the general approach.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2014-01-28 16:12 ` David Bremner
@ 2014-01-28 22:54 ` Mark Walters
2014-01-29 2:26 ` Re: David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: Mark Walters @ 2014-01-28 22:54 UTC (permalink / raw)
To: David Bremner, notmuch
Hi
I have been playing with this. One thing that is worrying me a little at
the moment is that the man page looks different from before (imo less
nice). More importantly, I can't tweak the rst to get the generated
pages to look like the current ones (this could just be my lack of skill
with rst)
I do like the general approach but would like to make sure we can get
manpages (amongst other things) that we like from it. See below for one
example which I thought looked less nice
Best wishes
Mark
The particular thing is the indentation for options (eg options in the
notmuch.1 page) In the original pages it looks like
OPTIONS
Supported global options for notmuch include
--help
Print a synopsis of available commands and exit.
and in the new ones
OPTIONS
Supported global options for notmuch include
--help
Print a synopsis of available commands and exit.
I find this makes it more difficult to scan the man page quickly.
On Tue, 28 Jan 2014, David Bremner <david@tethera.net> wrote:
> Here's a second try.
>
> - less build system cruft
>
> - integrate into notmuch's build system
>
> - optionally build the man pages (but not info) using just
> python-docutils.
>
> No doubt this could use polishing; I'm still looking for feedback on
> the general approach.
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2014-01-28 22:54 ` Mark Walters
@ 2014-01-29 2:26 ` David Bremner
0 siblings, 0 replies; 84+ messages in thread
From: David Bremner @ 2014-01-29 2:26 UTC (permalink / raw)
To: Mark Walters, notmuch
Mark Walters <markwalters1009@gmail.com> writes:
>
> The particular thing is the indentation for options (eg options in the
> notmuch.1 page) In the original pages it looks like
>
> OPTIONS
> Supported global options for notmuch include
>
> --help
>
> Print a synopsis of available commands and exit.
>
> and in the new ones
>
> OPTIONS
> Supported global options for notmuch include
>
> --help
>
> Print a synopsis of available commands and exit.
>
> I find this makes it more difficult to scan the man page quickly.
This rst is mainly autogenerated, and hence a bit ugly.
This particular example doesn't seem too hard to fix; try replacing the
relevant bit of notmuch.rst with
Supported global options for \ **notmuch**\ include
\ --help
Print a synopsis of available commands and exit.
\ --version
Print the installed version of notmuch, and exit.
\ --config=FILE
Specify the configuration file to use. This overrides any
configuration file specified by ${NOTMUCH_CONFIG}.
or
Supported global options for \ **notmuch**\ include
--help Print a synopsis of available commands and exit.
--version Print the installed version of notmuch, and exit.
--config=FILE Specify the configuration file to use. This overrides any
configuration file specified by ${NOTMUCH_CONFIG}.
--help Print a synopsis of available commands and exit.
The latter is an "option list" [1], so I guess is the most official way
to do it.
The former is a more generic "definition list"
[1]
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#option-lists
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
@ 2013-02-25 20:44 Martin Owens
2013-02-25 21:02 ` David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: Martin Owens @ 2013-02-25 20:44 UTC (permalink / raw)
To: notmuch
Dear NotMuch,
I'm getting an error from the packages in Ubuntu 13.04 (beta) version
14.1 of python-notmuch:
File "/usr/lib/python2.7/dist-packages/notmuch/database.py", line 156,
in __init__
self.create(path)
File "/usr/lib/python2.7/dist-packages/notmuch/database.py", line 191,
in create
res = Database._create(_str(path), Database.MODE.READ_WRITE)
ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>:
expected LP_LP_NotmuchDatabaseS instance instead of int
Looking at trunk it looks like this code was rewritten completely.
Should the packages be ignored and should trunk be used instead?
Best Regards, Martin Owens
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
@ 2013-01-16 12:44 david
2013-01-17 10:36 ` David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: david @ 2013-01-16 12:44 UTC (permalink / raw)
To: notmuch
Hi Gang;
Here are some proposed changes to the debian packaging for 0.15.
Most will probably be boring to people not familiar with debian
packaging, with the excepotion of 4/5, which has a shell pipeline with
two xargs in it, and almost can certainly be improved by several
readers of this list.
[PATCH 1/5] debian: change priority to optional.
[PATCH 2/5] debian: remove Dm-Upload-Allowed field.
[PATCH 3/5] debian/compat: upgrade to compat level 9
[PATCH 4/5] debian: add python 3 bindings
[PATCH 5/5] debian: note that ical bug is fixed
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2013-01-16 12:44 david
@ 2013-01-17 10:36 ` David Bremner
0 siblings, 0 replies; 84+ messages in thread
From: David Bremner @ 2013-01-17 10:36 UTC (permalink / raw)
To: notmuch
david@tethera.net writes:
> Hi Gang;
>
> Here are some proposed changes to the debian packaging for 0.15.
>
> Most will probably be boring to people not familiar with debian
> packaging, with the excepotion of 4/5, which has a shell pipeline with
> two xargs in it, and almost can certainly be improved by several
> readers of this list.
As Tomi suggested, I left this alone and pushed as is for now.
d
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
@ 2012-12-11 9:00 Damien Cassou
2012-12-13 11:45 ` Mark Walters
0 siblings, 1 reply; 84+ messages in thread
From: Damien Cassou @ 2012-12-11 9:00 UTC (permalink / raw)
To: notmuch
From: Damien Cassou <damien.cassou@gmail.com>
Subject: [PATCH v4] emacs: display tags in notmuch-show with links
In-Reply-To:
This patch obsoletes:
id:1355149964-27905-1-git-send-email-damien.cassou@gmail.com
[PATCH 1/4] emacs: Add a thread's tags to notmuch-show header-line
[PATCH 2/4] emacs: Make tags in notmuch-show header-line clickable
[PATCH 3/4] emacs: Make all tags in `notmuch-show' clickable
[PATCH 4/4] emacs: Add unit-tests for clickable tags
These patches make clickable all tags that appear in notmuch-show
buffers. Each tag is a link to open a new notmuch-search buffer for
this tag. Additionally, the buffer's header-line now shows the
thread's tags (clickable only if the `header-button' library is loaded
or loadable).
These patches are the first of an upcoming series whose goal is to
integrate notmuch-labeler into notmuch. See the following for more
details: https://github.com/DamienCassou/notmuch-labeler
With respect to v3, I took care of the comments you made:
- the header-line now updates when tags are changed
- the tags in the body stays clickable when tags are changed
Additionally, I added two unit tests to cover the above two comments
and fixed some others unit tests of mine.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2012-12-11 9:00 Damien Cassou
@ 2012-12-13 11:45 ` Mark Walters
0 siblings, 0 replies; 84+ messages in thread
From: Mark Walters @ 2012-12-13 11:45 UTC (permalink / raw)
To: Damien Cassou, notmuch
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
Hi
This is looking good: I have two comments the second of which is significant.
The first is do you want to sort (alphabetically) the headerline tags?
As it stands they are in the order they appear in the thread which is
probably not what is wanted.
The second is that there is a notmuch-show-tag-all functions to tag all
messages in the thread. Your patch is quadratic for the update (as it
calculates the list of thread tags once for each message). The attached
patch would avoid this and doesn't look too bad. (Note I retained
no-headerline-update as an optional argument in case there are out of
tree callers, eg users' .emacs files)
[Note this is not purely of academic interest: on my test large thread
(178 messages) updating the display after tagging all messages took some
seconds without my patch and almost no time with it.]
Best wishes
Mark
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-mjw-tweak.patch --]
[-- Type: text/x-diff, Size: 2186 bytes --]
From ab15a4bdb50bcf6b2851806195bbe8bea3b099dc Mon Sep 17 00:00:00 2001
From: Mark Walters <markwalters1009@gmail.com>
Date: Thu, 13 Dec 2012 11:23:09 +0000
Subject: [PATCH] Avoid quadratic update
---
emacs/notmuch-show.el | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 93bce07..8dd6010 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -356,7 +356,7 @@ operation on the contents of the current buffer."
"Return a string comprised of `n' spaces."
(make-string n ? ))
-(defun notmuch-show-update-tags (tags)
+(defun notmuch-show-update-tags (tags &optional no-headerline-update)
"Update the displayed tags of the current message."
(save-excursion
(goto-char (notmuch-show-message-top))
@@ -364,7 +364,8 @@ operation on the contents of the current buffer."
(let ((inhibit-read-only t))
(replace-match (propertize (notmuch-tagger-format-tags tags)
'face 'notmuch-tag-face)))))
- (notmuch-show-update-header-line))
+ (unless no-headerline-update
+ (notmuch-show-update-header-line)))
(defun notmuch-clean-address (address)
"Try to clean a single email ADDRESS for display. Return a cons
@@ -1461,10 +1462,10 @@ current thread."
(defun notmuch-show-get-depth ()
(notmuch-show-get-prop :depth))
-(defun notmuch-show-set-tags (tags)
+(defun notmuch-show-set-tags (tags &optional no-headerline-update)
"Set the tags of the current message."
(notmuch-show-set-prop :tags tags)
- (notmuch-show-update-tags tags))
+ (notmuch-show-update-tags tags no-headerline-update))
(defun notmuch-show-get-tags ()
"Return the tags of the current message."
@@ -1778,7 +1779,8 @@ See `notmuch-tag' for information on the format of TAG-CHANGES."
(let* ((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))))))
+ (notmuch-show-set-tags new-tags t)))))
+ (notmuch-show-update-header-line))
(defun notmuch-show-add-tag ()
"Same as `notmuch-show-tag' but sets initial input to '+'."
--
1.7.9.1
[-- Attachment #3: Type: text/plain, Size: 1489 bytes --]
On Tue, 11 Dec 2012, Damien Cassou <damien.cassou@gmail.com> wrote:
> From: Damien Cassou <damien.cassou@gmail.com>
> Subject: [PATCH v4] emacs: display tags in notmuch-show with links
> In-Reply-To:
>
> This patch obsoletes:
> id:1355149964-27905-1-git-send-email-damien.cassou@gmail.com
>
> [PATCH 1/4] emacs: Add a thread's tags to notmuch-show header-line
> [PATCH 2/4] emacs: Make tags in notmuch-show header-line clickable
> [PATCH 3/4] emacs: Make all tags in `notmuch-show' clickable
> [PATCH 4/4] emacs: Add unit-tests for clickable tags
>
> These patches make clickable all tags that appear in notmuch-show
> buffers. Each tag is a link to open a new notmuch-search buffer for
> this tag. Additionally, the buffer's header-line now shows the
> thread's tags (clickable only if the `header-button' library is loaded
> or loadable).
>
> These patches are the first of an upcoming series whose goal is to
> integrate notmuch-labeler into notmuch. See the following for more
> details: https://github.com/DamienCassou/notmuch-labeler
>
> With respect to v3, I took care of the comments you made:
> - the header-line now updates when tags are changed
> - the tags in the body stays clickable when tags are changed
>
> Additionally, I added two unit tests to cover the above two comments
> and fixed some others unit tests of mine.
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply related [flat|nested] 84+ messages in thread
* emacs: quote MML tags in replies
@ 2012-02-01 2:49 Dmitry Kurochkin
2012-02-02 4:01 ` David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: Dmitry Kurochkin @ 2012-02-01 2:49 UTC (permalink / raw)
To: notmuch
Hi Aaron.
Thanks for your work! I took the liberty to do some cleanups for your
patch. Below is a detailed list of changes.
Hope this helps.
Changes since v2:
* change patch names to be consistent with others:
- s/emacs:/test:/ for the test patch
- lower case the first word after colon in the patch title
* polish NEWS wording, move it to 0.12 section
* add comment to `mml-quote-region' call, as suggested by Tomi [1]
* fix and clean up the test:
- set `notmuch-fcc-dirs' to nil to avoid adding the Fcc header,
otherwise it breaks the test on other systems as pointed by
David [2]
- use default values for add_message parameters where possible
- use a sane subject value in add_message
- use shorter MML tag as produced by (mml-insert-part)
- indenting and other minor cleanups
Regards,
Dmitry
[1] id:"m2wr89ioos.fsf@guru.guru-group.fi"
[2] id:"87ehugzycb.fsf@zancas.localnet"
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
2012-02-01 2:49 emacs: quote MML tags in replies Dmitry Kurochkin
@ 2012-02-02 4:01 ` David Bremner
2012-02-03 10:22 ` Pieter Praet
0 siblings, 1 reply; 84+ messages in thread
From: David Bremner @ 2012-02-02 4:01 UTC (permalink / raw)
To: notmuch
I rebased these against branch release (and copied a comment from
aaron's email), but the test fails there, as does the reply within emacs test.
FAIL Reply within emacs
--- emacs.24.expected 2012-02-02 03:55:14.000000000 +0000
+++ emacs.24.output 2012-02-02 03:55:14.000000000 +0000
@@ -1,8 +1,4 @@
From: Notmuch Test Suite <test_suite@notmuchmail.org>
-To: user@example.com
-Subject: Re: Testing message sent via SMTP
-In-Reply-To: <XXX>
-Fcc: /home/bremner/software/upstream/notmuch/test/tmp.emacs/mail/sent
+To:
+Subject:
--text follows this line--
-On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
-> This is a test that messages are sent via SMTP
*ERROR*: Wrong type argument: integer-or-marker-p, nil
FAIL Quote MML tags in reply
--- emacs.25.expected 2012-02-02 03:55:15.000000000 +0000
+++ emacs.25.output 2012-02-02 03:55:15.000000000 +0000
@@ -1,7 +1,4 @@
From: Notmuch Test Suite <test_suite@notmuchmail.org>
To:
-Subject: Re: Quote MML tags in reply
-In-Reply-To: <test-emacs-mml-quoting@message.id>
+Subject:
--text follows this line--
-On Fri, 05 Jan 2001 15:43:57 +0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
-> <#!part disposition=inline>
*ERROR*: Wrong type argument: integer-or-marker-p, nil
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2012-02-02 4:01 ` David Bremner
@ 2012-02-03 10:22 ` Pieter Praet
0 siblings, 0 replies; 84+ messages in thread
From: Pieter Praet @ 2012-02-03 10:22 UTC (permalink / raw)
To: David Bremner, notmuch
On Thu, 2 Feb 2012 00:01:31 -0400, David Bremner <david@tethera.net> wrote:
> I rebased these against branch release (and copied a comment from
> aaron's email), but the test fails there, as does the reply within emacs test.
>
Same issue here.
That mark was introduced in commit 03146f20, so isn't available in the
release branch yet. Let's just use `point-max' instead, merge 'release'
into 'master', and change it back to `mark' there. It's better to break
MML tags in the user's sig for a little while than leave this security
hole wide open.
Same issue wrt commit 66ecd906; the citation line should still be:
On Tue, 05 Jan 2001 15:43:57 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
instead of:
On Fri, 05 Jan 2001 15:43:57 +0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
Fixed patches follow, including a post-merge fix.
> FAIL Reply within emacs
> --- emacs.24.expected 2012-02-02 03:55:14.000000000 +0000
> +++ emacs.24.output 2012-02-02 03:55:14.000000000 +0000
> @@ -1,8 +1,4 @@
> From: Notmuch Test Suite <test_suite@notmuchmail.org>
> -To: user@example.com
> -Subject: Re: Testing message sent via SMTP
> -In-Reply-To: <XXX>
> -Fcc: /home/bremner/software/upstream/notmuch/test/tmp.emacs/mail/sent
> +To:
> +Subject:
> --text follows this line--
> -On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
> -> This is a test that messages are sent via SMTP
> *ERROR*: Wrong type argument: integer-or-marker-p, nil
> FAIL Quote MML tags in reply
> --- emacs.25.expected 2012-02-02 03:55:15.000000000 +0000
> +++ emacs.25.output 2012-02-02 03:55:15.000000000 +0000
> @@ -1,7 +1,4 @@
> From: Notmuch Test Suite <test_suite@notmuchmail.org>
> To:
> -Subject: Re: Quote MML tags in reply
> -In-Reply-To: <test-emacs-mml-quoting@message.id>
> +Subject:
> --text follows this line--
> -On Fri, 05 Jan 2001 15:43:57 +0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
> -> <#!part disposition=inline>
> *ERROR*: Wrong type argument: integer-or-marker-p, nil
>
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
Peace
--
Pieter
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: output file argument to notmuch dump.
@ 2011-10-09 16:01 David Bremner
2011-10-10 13:49 ` david
0 siblings, 1 reply; 84+ messages in thread
From: David Bremner @ 2011-10-09 16:01 UTC (permalink / raw)
To: notmuch
[-- Attachment #1: Type: text/plain, Size: 869 bytes --]
On Thu, 06 Oct 2011 21:20:40 -0300, David Bremner <bremner@unb.ca> wrote:
>
> I'd like to add a search term argument to notmuch dump (see
> id:"87wrcijn1w.fsf@zancas.localnet" and followup for context). The
> "notmuch" way would be to have
>
> notmuch dump <search-term>
>
> do the right thing
Another option occured to me that is consistent at least with notmuch
tag and notmuch show would be to support the following transitional
syntaxes
notmuch dump file
notmuch dump file [--] search terms
notmuch dump -- search terms
the first two could then be deprecated, and eventually the syntax
notmuch dump search terms
could be enabled.
the question of whether to support
notmuch dump --file foo.txt
or something like
notmuch --stdout=foo.txt dump
could be dealt with later.
David
[-- Attachment #2: Type: application/pgp-signature, Size: 315 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* (no subject)
2011-10-09 16:01 output file argument to notmuch dump David Bremner
@ 2011-10-10 13:49 ` david
2011-10-16 20:34 ` Thomas Schwinge
0 siblings, 1 reply; 84+ messages in thread
From: david @ 2011-10-10 13:49 UTC (permalink / raw)
To: notmuch
OK, here is my proposal to add search terms to notmuch dump.
Most of the work is in argument processing. It would be nice if we
could factor some of that out.
02be821 notmuch-dump: deprecate use of output file argument.
2b7781d test: all dump-restore tests should be working now
7a203d6 notmuch-dump: treat any remaining arguments after the filename as search t
be762d9 notmuch-dump: update handling of file name argument
d6715d7 test: add tests for command line arguments to notmuch-dump
08e76cc test: update dump-restore to use redirection instead of filename args
notmuch-dump.c | 37 ++++++++++++++++++++++++++-----------
test/dump-restore | 39 ++++++++++++++++++++++++++++++++++-----
2 files changed, 60 insertions(+), 16 deletions(-)
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re:
2011-10-10 13:49 ` david
@ 2011-10-16 20:34 ` Thomas Schwinge
2011-10-16 23:25 ` Re: David Bremner
0 siblings, 1 reply; 84+ messages in thread
From: Thomas Schwinge @ 2011-10-16 20:34 UTC (permalink / raw)
To: david; +Cc: notmuch
[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]
Hi!
On Mon, 10 Oct 2011 10:49:15 -0300, david@tethera.net wrote:
> OK, here is my proposal to add search terms to notmuch dump.
Having worked in the same area ;-), I felt competent to review this. And
I definitely do like David's approach. The patches look good, with the
following comments:
What's missing is adding (roughly) the same text to the notmuch manpage,
``notmuch help dump'', NEWS file. These should be added to the
respective patches, for enhance functionality and deprecation of output
filename.
> 2b7781d test: all dump-restore tests should be working now
> 7a203d6 notmuch-dump: treat any remaining arguments after the filename as search t
I would suggest to combine these two into one patch: enhance
implementation (7a203d6) and update the tests (2b7781d) is one unit.
> d6715d7 test: add tests for command line arguments to notmuch-dump
Specifically:
On Mon, 10 Oct 2011 10:49:17 -0300, david@tethera.net wrote:
> The plan is to add the possibility of search terms after the file name,
> and the use of -- to stop looking for an output file name.
> ---
> test/dump-restore | 28 ++++++++++++++++++++++++++++
> 1 files changed, 28 insertions(+), 0 deletions(-)
>
> diff --git a/test/dump-restore b/test/dump-restore
> index 96c4f19..699337c 100755
> --- a/test/dump-restore
> +++ b/test/dump-restore
> @@ -8,6 +8,34 @@ test_expect_success "Dumping all tags" "generate_message &&
> notmuch new &&
> notmuch dump > dump.expected"
>
> +test_begin_subtest "dump outfile"
> +notmuch dump dump-outfile.actual
> +test_expect_equal_file dump.expected dump-outfile.actual
> +
> +test_begin_subtest "dump outfile --"
> +notmuch dump dump-1-arg-dash.actual
> +test_expect_equal_file dump.expected dump-1-arg-dash.actual
>
> [...]
I don't understand the purpose of the second test above. Was this meant
to be ``notmuch dump dump-1-arg-dash.actual --'' (as suggested by the
description), or ``notmuch dump -- > dump-1-arg-dash.actual''?
Grüße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
end of thread, other threads:[~2018-02-03 22:38 UTC | newest]
Thread overview: 84+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-17 18:05 show-mode message/thread archiving improvements Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
2012-01-17 18:05 ` [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
2012-01-18 8:13 ` David Edmondson
2012-01-18 8:12 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end David Edmondson
2012-01-18 8:47 ` Jameson Graef Rollins
2012-01-18 8:56 ` David Edmondson
2012-01-18 18:53 ` Jameson Graef Rollins
2012-01-17 18:43 ` [PATCH] emacs: fix archive thread/message function documentation Jameson Graef Rollins
2012-01-17 20:13 ` [PATCH 3/6] emacs: add message archiving functions Aaron Ecay
2012-01-17 20:18 ` Jameson Graef Rollins
2012-01-18 8:09 ` David Edmondson
2012-01-18 8:08 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread David Edmondson
2012-01-17 20:10 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two generally useful functions Aaron Ecay
2012-01-17 20:17 ` Jameson Graef Rollins
2012-01-17 20:57 ` Aaron Ecay
2012-01-18 8:14 ` David Edmondson
2012-01-18 8:06 ` David Edmondson
2012-01-17 20:09 ` show-mode message/thread archiving improvements Aaron Ecay
2012-01-23 8:33 ` Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 3/6] emacs: add message archiving functions Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 5/6] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
2012-01-23 8:34 ` [PATCH 6/6] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
2012-01-23 11:14 ` David Edmondson
2012-01-23 21:03 ` Xavier Maillard
2012-01-24 18:50 ` Tomi Ollila
2012-01-23 11:02 ` [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end David Edmondson
2012-01-23 17:39 ` Jameson Graef Rollins
2012-01-23 17:55 ` David Edmondson
2012-01-23 18:51 ` Jameson Graef Rollins
2012-01-23 11:01 ` [PATCH 3/6] emacs: add message archiving functions David Edmondson
2012-01-24 18:44 ` Tomi Ollila
2012-01-23 11:01 ` [PATCH 2/6] emacs: break out thread navigation from notmuch-show-archive-thread David Edmondson
2012-01-23 11:00 ` [PATCH 1/6] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions David Edmondson
2012-01-25 0:06 ` Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 4/8] emacs: add message archiving functions Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 7/8] emacs: modify the default show-mode key bindings for archiving Jameson Graef Rollins
2012-01-25 0:06 ` [PATCH v3 8/8] emacs: fix show-previous-message doc string Jameson Graef Rollins
2012-01-25 10:53 ` David Edmondson
2012-01-25 10:53 ` [PATCH v3 7/8] emacs: modify the default show-mode key bindings for archiving David Edmondson
2012-01-25 10:52 ` [PATCH v3 6/8] emacs: use pop-at-end functionality in show-archive-message-then-next function David Edmondson
2012-01-25 10:51 ` [PATCH v3 5/8] emacs: add option to show-next-{, open-}message functions to pop out to parent buffer if at end David Edmondson
2012-01-25 10:50 ` [PATCH v3 4/8] emacs: add message archiving functions David Edmondson
2012-01-25 10:49 ` [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread David Edmondson
2012-01-25 10:47 ` [PATCH v3 2/8] emacs: break up notmuch-show-archive-thread-internal into two more generally useful functions David Edmondson
2012-01-25 10:53 ` [PATCH v3 1/8] emacs: use search-next-thread to move to next thread in show mode David Edmondson
2012-01-31 3:28 ` David Bremner
-- strict thread matches above, loose matches on Subject: below --
2018-02-01 20:53 Matthew Lear
2018-02-03 22:38 ` Jani Nikula
2017-06-11 11:00 [PATCH] Add Emacs' imenu support in notmuch-show and notmuch-search David Bremner
2017-06-12 13:30 ` Damien Cassou
2017-06-14 1:22 ` David Bremner
2017-06-14 9:44 ` Re: David Bremner
2017-06-14 9:54 ` Re: Damien Cassou
2017-05-23 18:54 Tomi Ollila
2017-05-26 10:40 ` David Bremner
2016-10-15 8:44 Re: Matthew Lear
2016-10-13 19:37 Matt Armstrong
2016-10-13 19:42 ` Matt Armstrong
2016-10-11 21:24 matt
2016-10-12 7:51 ` Mark Walters
2016-10-15 7:09 ` Re: Mark Walters
2016-10-17 12:01 ` Re: David Bremner
2015-01-25 17:58 [PATCH 1/3] doc: add details about Xapian search syntax David Bremner
2015-02-23 20:05 ` David Bremner
2015-02-24 7:32 ` David Bremner
2014-10-03 21:18 David Bremner
2014-10-03 21:22 ` David Bremner
2014-10-16 21:14 ` Re: Jani Nikula
2014-05-06 13:06 David Bremner
2014-05-06 18:14 ` Jameson Graef Rollins
2014-05-06 18:26 ` Re: Tomi Ollila
2014-03-11 18:16 v2 man page build fixups Tomi Ollila
2014-03-13 3:21 ` David Bremner
2014-03-17 10:55 ` Tomi Ollila
2014-03-18 10:52 ` Re: David Bremner
2014-01-19 18:57 [RFC Patch] start of sphinx based docs David Bremner
2014-01-28 16:12 ` David Bremner
2014-01-28 22:54 ` Mark Walters
2014-01-29 2:26 ` Re: David Bremner
2013-02-25 20:44 Martin Owens
2013-02-25 21:02 ` David Bremner
2013-01-16 12:44 david
2013-01-17 10:36 ` David Bremner
2012-12-11 9:00 Damien Cassou
2012-12-13 11:45 ` Mark Walters
2012-02-01 2:49 emacs: quote MML tags in replies Dmitry Kurochkin
2012-02-02 4:01 ` David Bremner
2012-02-03 10:22 ` Pieter Praet
2011-10-09 16:01 output file argument to notmuch dump David Bremner
2011-10-10 13:49 ` david
2011-10-16 20:34 ` Thomas Schwinge
2011-10-16 23:25 ` Re: 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).