-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org-msg-improve-reply-header
fails in mu4e
#9
Comments
org-msg-improve-html-buffer
fails in mu4eorg-msg-improve-reply-header
fails in mu4e
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 |
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 |
I don't htink I cna test this properly, but my first attempt fails with:
(sorry I can't figure this out immediately) |
Do you have 82e97a0 (last patch on the experimental branch) ? |
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 "ee4b5a6e-0b82-4b29-827c-fecbf0c0f331@xtinmta1351.x..." :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" . "info@mail.hotels.com")) :reply-to (("Hotels.com" . "reply-fe5b1672766102757011-1935712_HTML-1759215362...")) :to ((nil . "MATT.PRICE@UTORONTO.CA")) :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 <%s>" ... ...)) 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 "ee4b5a6e-0b82-4b29-827c-fecbf0c0f331@xtinmta1351.x..." :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" . "info@mail.hotels.com")) :reply-to (("Hotels.com" . "reply-fe5b1672766102757011-1935712_HTML-1759215362...")) :to ((nil . "MATT.PRICE@UTORONTO.CA")) :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 "ee4b5a6e-0b82-4b29-827c-fecbf0c0f331@xtinmta1351.x..." :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" . "info@mail.hotels.com")) :reply-to (("Hotels.com" . "reply-fe5b1672766102757011-1935712_HTML-1759215362...")) :to ((nil . "MATT.PRICE@UTORONTO.CA")) :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 <%s>" ... ...)) 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 "ee4b5a6e-0b82-4b29-827c-fecbf0c0f331@xtinmta1351.x..." :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" . "info@mail.hotels.com")) :reply-to (("Hotels.com" . "reply-fe5b1672766102757011-1935712_HTML-1759215362...")) :to ((nil . "MATT.PRICE@UTORONTO.CA")) :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) |
Thanks I have pushed an extra fix on the experimental branch. Could you tell me if it works now ? |
getting closer! maybe somehtign wrong with the flet binding -- I odn't really understand cl-flet:
|
I pushed a new patch on the |
Could you give a try to the new |
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. |
Feel free to open a new one if you see an issue like again. |
org-msg-improve-reply-header
assumes that the html string has been generated bygnus-article-browse-html-article
inorg-msg-save-article-for-reply-gnus
, which is not called by the mu4e backend. WHat's the best way to fix this?The text was updated successfully, but these errors were encountered: