From d3e7b9cf05156ed77ed57a6b68527bbfdfeaaab4 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sat, 13 Apr 2024 13:08:05 +0300 Subject: [PATCH] mu4e-compose: handle no-fcc-path in sent-hook Workaround for #2688. --- mu4e/mu4e-compose.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index 523ac88c..a8e9fed2 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -560,12 +560,13 @@ appropriate flag at the message forwarded or replied-to." ;; appropriate flag at the message forwarded or replied-to. (add-hook 'message-sent-hook (lambda () - (mu4e--set-parent-flags fcc-path) - ;; we end up with a ((buried) buffer here, visiting - ;; the fcc-path; not quite sure why. But let's - ;; get rid of it (#2681) - (when-let ((buf (find-buffer-visiting fcc-path))) - (kill-buffer buf))) + (when fcc-path ;; hmmm... #2688 + (mu4e--set-parent-flags fcc-path) + ;; we end up with a ((buried) buffer here, visiting + ;; the fcc-path; not quite sure why. But let's + ;; get rid of it (#2681) + (when-let ((buf (find-buffer-visiting fcc-path))) + (kill-buffer buf)))) nil t)))) ;;; Crypto