Giter Site home page Giter Site logo

Comments (11)

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

Correct. This function is just making the reply header looks better. How do this header looks like with mu4e ? Is there any ?

The function in which you could introduce the reply header would be org-msg-save-article-for-reply-mu4e.

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

Hi Matt,

Could you give a try to the experimental branch that I just created and provide me your feedback ? It include a patch from @JulienMasson that was pending for a while. It also include a patch cleaning his patch. If you notice a difference between with his patch only compared to his+mine let me know.

Jeremy
One Emacs to rule them all

from org-msg.

titaniumbones avatar titaniumbones commented on May 20, 2024

I don't htink I cna test this properly, but my first attempt fails with:

Debugger entered--Lisp error: (wrong-number-of-arguments mapconcat 2)
  (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date)))
  (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date))) "</div>\n<hr>\n")
  (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date))) "</div>\n<hr>\n"))
  (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date))) "</div>\n<hr>\n")))
  (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region (point-min) (match-beginning 0))))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject ...) (:to function mails2str) (:date ...))) "</div>\n<hr>\n"))) (write-file file))
  (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region (point-min) (match-beginning 0))))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '(... ... ... ...)) "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region (point-min) (match-beginning 0))))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '...) "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region ... ...)))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- ...) "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn ...))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char ...) (insert "<div align=\"left\">\n" ... "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (list file))
  (let* ((--cl-field2str-- #'(lambda (f) (format "%s: %s<br>\n" (capitalize (substring ... 1)) (funcall (cdr e) (mu4e-message-field msg ...)))))) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if ... ...)) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn ... ...)) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (list file)))
  (progn (let* ((--cl-field2str-- #'(lambda (f) (format "%s: %s<br>\n" (capitalize ...) (funcall ... ...))))) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion ...) (save-excursion ...) (if ... ...) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (list file))))
  (let* ((--cl-mails2str-- #'(lambda (l) (mapconcat #'(lambda ... ...) l ", ")))) (progn (let* ((--cl-field2str-- #'(lambda (f) (format "%s: %s<br>\n" ... ...)))) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...)))) (list file)))))
  (let* ((msg (mu4e-message-at-point)) (html (mu4e-message-field msg :body-html)) (file (concat "/tmp/" (mu4e-message-field msg :message-id)))) (let* ((--cl-mails2str-- #'(lambda (l) (mapconcat #'... l ", ")))) (progn (let* ((--cl-field2str-- #'(lambda ... ...))) (progn (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...))) (list file))))))
  (save-current-buffer (set-buffer mu4e~view-buffer-name) (let* ((msg (mu4e-message-at-point)) (html (mu4e-message-field msg :body-html)) (file (concat "/tmp/" (mu4e-message-field msg :message-id)))) (let* ((--cl-mails2str-- #'(lambda (l) (mapconcat ... l ", ")))) (progn (let* ((--cl-field2str-- #'...)) (progn (let (...) (save-current-buffer ... ...)) (list file)))))))
  org-msg-save-article-for-reply-mu4e()

(sorry I can't figure this out immediately)

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

Do you have 82e97a0 (last patch on the experimental branch) ?

from org-msg.

titaniumbones avatar titaniumbones commented on May 20, 2024

I didn't but unfortuantely that gives a different error ☹️

Debugger entered--Lisp error: (void-variable e)
  (car e)
  (symbol-name (car e))
  (substring (symbol-name (car e)) 1)
  (capitalize (substring (symbol-name (car e)) 1))
  (format "%s: %s<br>\n" (capitalize (substring (symbol-name (car e)) 1)) (funcall (cdr e) (mu4e-message-field msg (car e))))
  (closure ((--cl-mails2str-- closure ((file . "/tmp/ee4b5a6e-0b82-4b29-827c-fecbf0c0f331@xtinmta1...") (html . "<!--  //--><!-- --><!--  //--><!-- --><!--  //--><...") (msg :docid 59746 :subject "✅ You've secured this: up to half price offers for..." :date (23920 14223 0) :size 93585 :message-id "[email protected]..." :mailing-list "177351.xt.local" :path "/home/matt/UofTMail/inbox/cur/1567635387_2.27084.a..." :maildir "/inbox" :priority normal :flags (seen list) :parts ((:index 1 :name "1.msgpart" :mime-type "text/plain" :type ... :attachment nil :size 24621) (:index 2 :name "2.msgpart" :mime-type "text/html" :type ... :attachment nil :size 61402)) :from (("Hotels.com" . "[email protected]")) :reply-to (("Hotels.com" . "reply-fe5b1672766102757011-1935712_HTML-1759215362...")) :to ((nil . "[email protected]")) :body-txt-params (("charset" . "utf-8")) :body-txt " \15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n \15\n \15\n\15\n\15..." :body-html "<!--  //--><!-- --><!--  //--><!-- --><!--  //--><...") t) (l) (mapconcat #'(lambda (m) (format "%S &lt;%s&gt;" ... ...)) l ", ")) (file . "/tmp/ee4b5a6e-0b82-4b29-827c-fecbf0c0f331@xtinmta1...") (html . "<!--  //--><!-- --><!--  //--><!-- --><!--  //--><...") (msg :docid 59746 :subject "✅ You've secured this: up to half price offers for..." :date (23920 14223 0) :size 93585 :message-id "[email protected]..." :mailing-list "177351.xt.local" :path "/home/matt/UofTMail/inbox/cur/1567635387_2.27084.a..." :maildir "/inbox" :priority normal :flags (seen list) :parts ((:index 1 :name "1.msgpart" :mime-type "text/plain" :type (leaf) :attachment nil :size 24621) (:index 2 :name "2.msgpart" :mime-type "text/html" :type (leaf) :attachment nil :size 61402)) :from (("Hotels.com" . "[email protected]")) :reply-to (("Hotels.com" . "reply-fe5b1672766102757011-1935712_HTML-1759215362...")) :to ((nil . "[email protected]")) :body-txt-params (("charset" . "utf-8")) :body-txt " \15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n \15\n \15\n\15\n\15..." :body-html "<!--  //--><!-- --><!--  //--><!-- --><!--  //--><...") t) (f) (format "%s: %s<br>\n" (capitalize (substring (symbol-name (car e)) 1)) (funcall (cdr e) (mu4e-message-field msg (car e)))))((:from function mails2str))
  mapconcat((closure ((--cl-mails2str-- closure ((file . "/tmp/ee4b5a6e-0b82-4b29-827c-fecbf0c0f331@xtinmta1...") (html . "<!--  //--><!-- --><!--  //--><!-- --><!--  //--><...") (msg :docid 59746 :subject "✅ You've secured this: up to half price offers for..." :date (23920 14223 0) :size 93585 :message-id "[email protected]..." :mailing-list "177351.xt.local" :path "/home/matt/UofTMail/inbox/cur/1567635387_2.27084.a..." :maildir "/inbox" :priority normal :flags (seen list) :parts ((:index 1 :name "1.msgpart" :mime-type "text/plain" :type ... :attachment nil :size 24621) (:index 2 :name "2.msgpart" :mime-type "text/html" :type ... :attachment nil :size 61402)) :from (("Hotels.com" . "[email protected]")) :reply-to (("Hotels.com" . "reply-fe5b1672766102757011-1935712_HTML-1759215362...")) :to ((nil . "[email protected]")) :body-txt-params (("charset" . "utf-8")) :body-txt " \15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n \15\n \15\n\15\n\15..." :body-html "<!--  //--><!-- --><!--  //--><!-- --><!--  //--><...") t) (l) (mapconcat #'(lambda (m) (format "%S &lt;%s&gt;" ... ...)) l ", ")) (file . "/tmp/ee4b5a6e-0b82-4b29-827c-fecbf0c0f331@xtinmta1...") (html . "<!--  //--><!-- --><!--  //--><!-- --><!--  //--><...") (msg :docid 59746 :subject "✅ You've secured this: up to half price offers for..." :date (23920 14223 0) :size 93585 :message-id "[email protected]..." :mailing-list "177351.xt.local" :path "/home/matt/UofTMail/inbox/cur/1567635387_2.27084.a..." :maildir "/inbox" :priority normal :flags (seen list) :parts ((:index 1 :name "1.msgpart" :mime-type "text/plain" :type (leaf) :attachment nil :size 24621) (:index 2 :name "2.msgpart" :mime-type "text/html" :type (leaf) :attachment nil :size 61402)) :from (("Hotels.com" . "[email protected]")) :reply-to (("Hotels.com" . "reply-fe5b1672766102757011-1935712_HTML-1759215362...")) :to ((nil . "[email protected]")) :body-txt-params (("charset" . "utf-8")) :body-txt " \15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n\15\n \15\n \15\n\15\n\15..." :body-html "<!--  //--><!-- --><!--  //--><!-- --><!--  //--><...") t) (f) (format "%s: %s<br>\n" (capitalize (substring (symbol-name (car e)) 1)) (funcall (cdr e) (mu4e-message-field msg (car e))))) ((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date)) "")
  (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date)) "") "</div>\n<hr>\n")
  (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date)) "") "</div>\n<hr>\n"))
  (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date)) "") "</div>\n<hr>\n")))
  (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region (point-min) (match-beginning 0))))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject ...) (:to function mails2str) (:date ...)) "") "</div>\n<hr>\n"))) (write-file file))
  (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region (point-min) (match-beginning 0))))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '(... ... ... ...) "") "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region (point-min) (match-beginning 0))))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '... "") "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region ... ...)))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- ... "") "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn ...))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char ...) (insert "<div align=\"left\">\n" ... "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (list file))
  (let* ((--cl-field2str-- #'(lambda (f) (format "%s: %s<br>\n" (capitalize (substring ... 1)) (funcall (cdr e) (mu4e-message-field msg ...)))))) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if ... ...)) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn ... ...)) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (list file)))
  (progn (let* ((--cl-field2str-- #'(lambda (f) (format "%s: %s<br>\n" (capitalize ...) (funcall ... ...))))) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion ...) (save-excursion ...) (if ... ...) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (list file))))
  (let* ((--cl-mails2str-- #'(lambda (l) (mapconcat #'(lambda ... ...) l ", ")))) (progn (let* ((--cl-field2str-- #'(lambda (f) (format "%s: %s<br>\n" ... ...)))) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...)))) (list file)))))
  (let* ((msg (mu4e-message-at-point)) (html (mu4e-message-field msg :body-html)) (file (concat "/tmp/" (mu4e-message-field msg :message-id)))) (let* ((--cl-mails2str-- #'(lambda (l) (mapconcat #'... l ", ")))) (progn (let* ((--cl-field2str-- #'(lambda ... ...))) (progn (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...))) (list file))))))
  (save-current-buffer (set-buffer mu4e~view-buffer-name) (let* ((msg (mu4e-message-at-point)) (html (mu4e-message-field msg :body-html)) (file (concat "/tmp/" (mu4e-message-field msg :message-id)))) (let* ((--cl-mails2str-- #'(lambda (l) (mapconcat ... l ", ")))) (progn (let* ((--cl-field2str-- #'...)) (progn (let (...) (save-current-buffer ... ...)) (list file)))))))
  org-msg-save-article-for-reply-mu4e()
  apply(org-msg-save-article-for-reply-mu4e nil)

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

Thanks I have pushed an extra fix on the experimental branch. Could you tell me if it works now ?

from org-msg.

titaniumbones avatar titaniumbones commented on May 20, 2024

getting closer! maybe somehtign wrong with the flet binding -- I odn't really understand cl-flet:

Debugger entered--Lisp error: (invalid-function #'mails2str)
  #'mails2str((("Groupon Deals of the Day" . "[email protected]")))
  funcall(#'mails2str (("Groupon Deals of the Day" . "[email protected]")))
  (format "%s: %s<br>\n" (capitalize (substring (symbol-name (car f)) 1)) (funcall (cdr f) (mu4e-message-field msg (car f))))
  (closure ((--cl-mails2str-- closure ((file . "/tmp/569102591.31201090.1567632422072.JavaMail.roc...") (html . "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Trans...") (msg :docid 59739 :subject "These 24-Hour Deals Might Surprise You..." :date (23920 11302 0) :size 112892 :message-id "569102591.31201090.1567632422072.JavaMail.rocketma..." :mailing-list "channel-goods_goods_test_6_us_im_20190730_channel-..." :path "/home/matt/UofTMail/inbox/cur/1567632688_0.18001.a..." :maildir "/inbox" :priority normal :flags (seen list) :parts ((:index 1 :name "1.msgpart" :mime-type "text/html" :type ... :attachment nil :size 104914)) :from (("Groupon Deals of the Day" . "[email protected]")) :to ((nil . "[email protected]")) :body-html "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Trans...") t) (l) (mapconcat (lambda (m) (format "%S &lt;%s&gt;" (car m) (cdr m))) l ", ")) (file . "/tmp/569102591.31201090.1567632422072.JavaMail.roc...") (html . "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Trans...") (msg :docid 59739 :subject "These 24-Hour Deals Might Surprise You..." :date (23920 11302 0) :size 112892 :message-id "569102591.31201090.1567632422072.JavaMail.rocketma..." :mailing-list "channel-goods_goods_test_6_us_im_20190730_channel-..." :path "/home/matt/UofTMail/inbox/cur/1567632688_0.18001.a..." :maildir "/inbox" :priority normal :flags (seen list) :parts ((:index 1 :name "1.msgpart" :mime-type "text/html" :type (leaf) :attachment nil :size 104914)) :from (("Groupon Deals of the Day" . "[email protected]")) :to ((nil . "[email protected]")) :body-html "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Trans...") t) (f) (format "%s: %s<br>\n" (capitalize (substring (symbol-name (car f)) 1)) (funcall (cdr f) (mu4e-message-field msg (car f)))))((:from function mails2str))
  mapconcat((closure ((--cl-mails2str-- closure ((file . "/tmp/569102591.31201090.1567632422072.JavaMail.roc...") (html . "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Trans...") (msg :docid 59739 :subject "These 24-Hour Deals Might Surprise You..." :date (23920 11302 0) :size 112892 :message-id "569102591.31201090.1567632422072.JavaMail.rocketma..." :mailing-list "channel-goods_goods_test_6_us_im_20190730_channel-..." :path "/home/matt/UofTMail/inbox/cur/1567632688_0.18001.a..." :maildir "/inbox" :priority normal :flags (seen list) :parts ((:index 1 :name "1.msgpart" :mime-type "text/html" :type ... :attachment nil :size 104914)) :from (("Groupon Deals of the Day" . "[email protected]")) :to ((nil . "[email protected]")) :body-html "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Trans...") t) (l) (mapconcat (lambda (m) (format "%S &lt;%s&gt;" (car m) (cdr m))) l ", ")) (file . "/tmp/569102591.31201090.1567632422072.JavaMail.roc...") (html . "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Trans...") (msg :docid 59739 :subject "These 24-Hour Deals Might Surprise You..." :date (23920 11302 0) :size 112892 :message-id "569102591.31201090.1567632422072.JavaMail.rocketma..." :mailing-list "channel-goods_goods_test_6_us_im_20190730_channel-..." :path "/home/matt/UofTMail/inbox/cur/1567632688_0.18001.a..." :maildir "/inbox" :priority normal :flags (seen list) :parts ((:index 1 :name "1.msgpart" :mime-type "text/html" :type (leaf) :attachment nil :size 104914)) :from (("Groupon Deals of the Day" . "[email protected]")) :to ((nil . "[email protected]")) :body-html "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Trans...") t) (f) (format "%s: %s<br>\n" (capitalize (substring (symbol-name (car f)) 1)) (funcall (cdr f) (mu4e-message-field msg (car f))))) ((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date)) "")
  (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date)) "") "</div>\n<hr>\n")
  (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date)) "") "</div>\n<hr>\n"))
  (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject 'identity) (:to function mails2str) (:date 'message-make-date)) "") "</div>\n<hr>\n")))
  (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region (point-min) (match-beginning 0))))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '((:from function mails2str) (:subject ...) (:to function mails2str) (:date ...)) "") "</div>\n<hr>\n"))) (write-file file))
  (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region (point-min) (match-beginning 0))))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '(... ... ... ...) "") "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region (point-min) (match-beginning 0))))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- '... "") "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn (delete-region ... ...)))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat --cl-field2str-- ... "") "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if (re-search-forward "^<html\\(.*?\\)>" nil t) (progn ...))) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn (goto-char ...) (insert "<div align=\"left\">\n" ... "</div>\n<hr>\n"))) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (list file))
  (let* ((--cl-field2str-- #'(lambda (f) (format "%s: %s<br>\n" (capitalize (substring ... 1)) (funcall (cdr f) (mu4e-message-field msg ...)))))) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion (insert html)) (save-excursion (if ... ...)) (if (re-search-forward "<body\\(.*?\\)>" nil t) (progn ... ...)) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (list file)))
  (progn (let* ((--cl-field2str-- #'(lambda (f) (format "%s: %s<br>\n" (capitalize ...) (funcall ... ...))))) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (save-excursion ...) (save-excursion ...) (if ... ...) (write-file file)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (list file))))
  (let* ((--cl-mails2str-- (cl-function (lambda (l) (mapconcat (lambda (m) (format "%S &lt;%s&gt;" ... ...)) l ", "))))) (progn (let* ((--cl-field2str-- #'(lambda (f) (format "%s: %s<br>\n" ... ...)))) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...)))) (list file)))))
  (cl-flet ((mails2str (l) (mapconcat (lambda (m) (format "%S &lt;%s&gt;" (car m) (cdr m))) l ", "))) (cl-flet* ((field2str (f) (format "%s: %s<br>\n" (capitalize (substring (symbol-name ...) 1)) (funcall (cdr f) (mu4e-message-field msg (car f)))))) (with-temp-buffer (save-excursion (insert html)) (save-excursion (when (re-search-forward "^<html\\(.*?\\)>" nil t) (delete-region (point-min) (match-beginning 0)))) (when (re-search-forward "<body\\(.*?\\)>" nil t) (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat #'field2str '(... ... ... ...) "") "</div>\n<hr>\n")) (write-file file)) (list file)))
  (cl-flet* ((mails2str (l) (mapconcat (lambda (m) (format "%S &lt;%s&gt;" (car m) (cdr m))) l ", ")) (field2str (f) (format "%s: %s<br>\n" (capitalize (substring (symbol-name (car f)) 1)) (funcall (cdr f) (mu4e-message-field msg (car f)))))) (with-temp-buffer (save-excursion (insert html)) (save-excursion (when (re-search-forward "^<html\\(.*?\\)>" nil t) (delete-region (point-min) (match-beginning 0)))) (when (re-search-forward "<body\\(.*?\\)>" nil t) (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat #'field2str '((:from function mails2str) (:subject ...) (:to function mails2str) (:date ...)) "") "</div>\n<hr>\n")) (write-file file)) (list file))
  (let* ((msg (mu4e-message-at-point)) (html (mu4e-message-field msg :body-html)) (file (concat "/tmp/" (mu4e-message-field msg :message-id)))) (cl-flet* ((mails2str (l) (mapconcat (lambda (m) (format "%S &lt;%s&gt;" (car m) (cdr m))) l ", ")) (field2str (f) (format "%s: %s<br>\n" (capitalize (substring (symbol-name ...) 1)) (funcall (cdr f) (mu4e-message-field msg (car f)))))) (with-temp-buffer (save-excursion (insert html)) (save-excursion (when (re-search-forward "^<html\\(.*?\\)>" nil t) (delete-region (point-min) (match-beginning 0)))) (when (re-search-forward "<body\\(.*?\\)>" nil t) (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat #'field2str '(... ... ... ...) "") "</div>\n<hr>\n")) (write-file file)) (list file)))
  (save-current-buffer (set-buffer mu4e~view-buffer-name) (let* ((msg (mu4e-message-at-point)) (html (mu4e-message-field msg :body-html)) (file (concat "/tmp/" (mu4e-message-field msg :message-id)))) (cl-flet* ((mails2str (l) (mapconcat (lambda (m) (format "%S &lt;%s&gt;" ... ...)) l ", ")) (field2str (f) (format "%s: %s<br>\n" (capitalize (substring ... 1)) (funcall (cdr f) (mu4e-message-field msg ...))))) (with-temp-buffer (save-excursion (insert html)) (save-excursion (when (re-search-forward "^<html\\(.*?\\)>" nil t) (delete-region (point-min) (match-beginning 0)))) (when (re-search-forward "<body\\(.*?\\)>" nil t) (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat #'field2str '... "") "</div>\n<hr>\n")) (write-file file)) (list file))))
  (with-current-buffer mu4e~view-buffer-name (let* ((msg (mu4e-message-at-point)) (html (mu4e-message-field msg :body-html)) (file (concat "/tmp/" (mu4e-message-field msg :message-id)))) (cl-flet* ((mails2str (l) (mapconcat (lambda (m) (format "%S &lt;%s&gt;" ... ...)) l ", ")) (field2str (f) (format "%s: %s<br>\n" (capitalize (substring ... 1)) (funcall (cdr f) (mu4e-message-field msg ...))))) (with-temp-buffer (save-excursion (insert html)) (save-excursion (when (re-search-forward "^<html\\(.*?\\)>" nil t) (delete-region (point-min) (match-beginning 0)))) (when (re-search-forward "<body\\(.*?\\)>" nil t) (goto-char (match-end 0)) (insert "<div align=\"left\">\n" (mapconcat #'field2str '... "") "</div>\n<hr>\n")) (write-file file)) (list file))))
  org-msg-save-article-for-reply-mu4e()
  apply(org-msg-save-article-for-reply-mu4e nil)

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

I pushed a new patch on the experimental branch which I believe should take care of this.

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

Could you give a try to the new experimental branch and tell me if it works fine for you ?
I would like to push the experimental as the new master branch today.

from org-msg.

titaniumbones avatar titaniumbones commented on May 20, 2024

I think this issue is now fixed for me! I just did a very simple test though, with one messgee. #12 is of course still an issue but I don't see how to fix that ATM. thank you @jeremy-compostella !

I'll let you close in the merge message maybe, but I believe I no longer have an isuse.

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

Feel free to open a new one if you see an issue like again.

from org-msg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.