From 4eea81b57a58edb94572eeb89b5b69db99c2f684 Mon Sep 17 00:00:00 2001 From: uu1101 Date: Sat, 30 Nov 2013 23:45:09 +0100 Subject: [PATCH] * mu-proc: Don't rename when moving inside a Maildir `mbsync' expects messages moving inside a Maildir (from `new' to `cur', for example) to mantain its basename. --- mu4e/mu4e-proc.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mu4e/mu4e-proc.el b/mu4e/mu4e-proc.el index 13badaa7..3feaa353 100644 --- a/mu4e/mu4e-proc.el +++ b/mu4e/mu4e-proc.el @@ -376,9 +376,9 @@ The flags are any of `deleted', `flagged', `new', `passed', `replied' `seen' or The server reports the results for the operation through `mu4e-update-func'. -If the the variable `mu4e-change-filenames-when-moving' is non-nil, -the move generates new names for the target files; this helps -certain tools (such as mbsync). +If the the variable `mu4e-change-filenames-when-moving' is +non-nil, moving to a different maildir generates new names for +the target files; this helps certain tools (such as mbsync). The results are reported through either (:update ... ) or (:error ) sexp, which are handled my `mu4e-update-func' and @@ -394,10 +394,12 @@ or (:error ) sexp, which are handled my `mu4e-update-func' and (if (stringp flags) flags (mu4e-flags-to-string flags))))) (path (when maildir - (format " maildir:%s" (mu4e~proc-escape maildir))))) + (format " maildir:%s" (mu4e~proc-escape maildir)))) + (rename + (if (and maildir mu4e-change-filenames-when-moving) "true" "false"))) (mu4e~proc-send-command "cmd:move %s %s %s %s" idparam (or flagstr "") (or path "") - (format "newname:%s" (if mu4e-change-filenames-when-moving "true" "false"))))) + (format "newname:%s" rename)))) (defun mu4e~proc-index (path my-addresses) "Update the message database for filesystem PATH, which should