From b07a3970aecee69b0bff88a28b344a4020a3701f Mon Sep 17 00:00:00 2001 From: Henrique Martins Date: Fri, 10 Apr 2026 11:04:09 -0700 Subject: [PATCH] MH-E: remember destination when refiling a thread (SF#473) * lisp/mh-e/mh-thread.el (mh-thread-refile): Add an optional argument 'dont-update-last-destination-flag'. If it is nil, update 'mh-last-destination' and 'mh-last-destination-folder'. Copyright-paperwork-exempt: yes --- lisp/mh-e/mh-thread.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el index 3f2f9b5958d..00351b730c3 100644 --- a/lisp/mh-e/mh-thread.el +++ b/lisp/mh-e/mh-thread.el @@ -193,7 +193,7 @@ sibling." (mh-thread-next-sibling t)) ;;;###mh-autoload -(defun mh-thread-refile (folder) +(defun mh-thread-refile (folder &optional dont-update-last-destination-flag) "Refile (output) thread into FOLDER." (interactive (list (intern (mh-prompt-for-refile-folder)))) (cond ((not (memq 'unthread mh-view-ops)) @@ -201,6 +201,9 @@ sibling." ((eobp) (error "No message at point")) (t (let ((region (mh-thread-find-children))) + (unless dont-update-last-destination-flag + (setq mh-last-destination (cons 'refile folder) + mh-last-destination-folder mh-last-destination)) (mh-iterate-on-messages-in-region () (car region) (cadr region) (mh-refile-a-msg nil folder)) (mh-next-msg)))))