From 522f4104f98baed3d29c4f28b7338fe07e238c39 Mon Sep 17 00:00:00 2001 From: Wataru MIYAGUNI Date: Wed, 5 Dec 2012 16:46:12 +0900 Subject: [PATCH] Change refile target in region email. Now, mark commands with region on headers view, target of the first email is reflected in the rest of email. ``` Date From Subject -------------------------------------------- 2012-12-05 Github ... 2012-12-05 Yahoo! ... 2012-12-05 Work ... refiling to Date From Subject -------------------------------------------- r -> /github 2012-12-05 Github ... r -> /github 2012-12-05 Yahoo! ... r -> /github 2012-12-05 Work ... ``` In this patch, change target in region email. ``` Date From Subject -------------------------------------------- r -> /github 2012-12-05 Github ... r -> /yahoo 2012-12-05 Yahoo! ... r -> /work 2012-12-05 Work ... ``` --- mu4e/mu4e-mark.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mu4e/mu4e-mark.el b/mu4e/mu4e-mark.el index b910d2bd..957a6c6d 100644 --- a/mu4e/mu4e-mark.el +++ b/mu4e/mu4e-mark.el @@ -189,6 +189,8 @@ headers in the region. Optionally, provide TARGET (for moves)." (let ((cant-go-further) (eor (region-end))) (goto-char (region-beginning)) (while (and (<= (point) eor) (not cant-go-further)) + (when (eq mark 'refile) + (setq target (mu4e~mark-get-target mark target))) (mu4e-mark-at-point mark target) (setq cant-go-further (not (mu4e-headers-next))))))))