From b5656a7991ee7435f72a358dd1b315482206ccf4 Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Sun, 2 May 2021 18:32:07 +0200 Subject: [PATCH] Fix #2006 by using cl-loop in mu4e-action-view-in-browser instead of seq Using cl-loop is much simpler and readable, than using mapconcat+seq+seq. Also it avoids requiring seq (which is not done actually). --- mu4e/mu4e-view-gnus.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mu4e/mu4e-view-gnus.el b/mu4e/mu4e-view-gnus.el index d919e1ed..6cd064fb 100644 --- a/mu4e/mu4e-view-gnus.el +++ b/mu4e/mu4e-view-gnus.el @@ -79,12 +79,9 @@ etc." (insert-file-contents-literally (mu4e-message-field msg :path) nil nil nil t) (run-hooks 'gnus-article-decode-hook) - (let ((header (mapconcat 'identity - (seq-filter (lambda(hdr) hdr) - (seq-map (lambda(field) - (when-let ((val (message-fetch-field field))) - (format "%s: %s" (capitalize field) val))) - '("from" "to" "cc" "date" "subject"))) "\n")) + (let ((header (cl-loop for field in '("from" "to" "cc" "date" "subject") + when (message-fetch-field field) + concat (format "%s: %s\n" (capitalize field) it))) (parts (mm-dissect-buffer t t))) ;; If singlepart, enforce a list. (when (and (bufferp (car parts))