Comments (6)
I am a bit lost here. What is the status of this issue ?
from org-msg.
Sorry to leave you hanging. From what I can tell, the status is "still a problem". Calling mu4e-compose-reply
from the mu4e mailbox summary buffer (*mu4e-headers*
) when *mu4e-view*
is not open will cause an error as seen below, because org-msg-article-htmlp-mu4e
will try to open and parse an existing *mu4e-view*
buffer to test if the message is html. My guess is that there's a lower-level function available somewhere that would allow org-msg to parse the underlying message itself, but I haven't had a chance to look mroe closely at the mu4e code. When I get a change I can try to ask o nthe mu-discuss mailing list, or perhaps there's someone else better positioned to fix this...
Debugger entered--Lisp error: (error "No buffer named *mu4e-view*")
set-buffer("*mu4e-view*")
(save-current-buffer (set-buffer mu4e~view-buffer-name) (if (mu4e-message-field-at-point :body-html) (progn t)))
org-msg-article-htmlp-mu4e()
apply(org-msg-article-htmlp-mu4e nil)
(progn (apply fun arg))
(if (functionp fun) (progn (apply fun arg)))
(let ((fun (intern (format "org-msg-%s-%s" sym mua)))) (if (functionp fun) (progn (apply fun arg))))
(if mua (let ((fun (intern (format "org-msg-%s-%s" sym mua)))) (if (functionp fun) (progn (apply fun arg)))) (error "Backend not found"))
(let ((mua (assoc-default mail-user-agent org-msg-supported-mua))) (if mua (let ((fun (intern (format "org-msg-%s-%s" sym mua)))) (if (functionp fun) (progn (apply fun arg)))) (error "Backend not found")))
org-msg-mua-call(article-htmlp)
(or new (org-msg-mua-call 'article-htmlp))
(if (or new (org-msg-mua-call 'article-htmlp)) (progn (if new nil (setq reply-to (org-msg-mua-call 'save-article-for-reply))) (insert (org-msg-header reply-to)) (if org-msg-greeting-fmt (progn (insert (format org-msg-greeting-fmt (if new "" (org-msg-get-to-first-name)))))) (save-excursion (if with-original (progn (save-excursion (insert "\n\n" org-msg-separator "\n") (delete-region (line-beginning-position) (1+ ...)) (save-excursion (while ... ...)) (org-escape-code-in-region (point) (point-max))))) (if org-msg-signature (progn (insert org-msg-signature))) (org-msg-edit-mode))))
(let ((new (not (and (message-fetch-field "to") (message-fetch-field "subject")))) (with-original (not (= (point) (point-max)))) (reply-to)) (if (or new (org-msg-mua-call 'article-htmlp)) (progn (if new nil (setq reply-to (org-msg-mua-call 'save-article-for-reply))) (insert (org-msg-header reply-to)) (if org-msg-greeting-fmt (progn (insert (format org-msg-greeting-fmt (if new "" ...))))) (save-excursion (if with-original (progn (save-excursion (insert "\n\n" org-msg-separator "\n") (delete-region ... ...) (save-excursion ...) (org-escape-code-in-region ... ...)))) (if org-msg-signature (progn (insert org-msg-signature))) (org-msg-edit-mode)))) (if new (message-goto-to) (org-msg-goto-body)))
org-msg-post-setup()
run-hooks(change-major-mode-after-body-hook text-mode-hook message-mode-hook mu4e-compose-mode-hook)
apply(run-hooks (change-major-mode-after-body-hook text-mode-hook message-mode-hook mu4e-compose-mode-hook))
run-mode-hooks(mu4e-compose-mode-hook)
mu4e-compose-mode()
mu4e~compose-handler(reply (:docid 102611 :subject "Firefox Monitor found your email in a new data bre..." :date (24027 26864 0) :size 27057 :message-id "0101016ea111eb02-4c624c51-ce86-42e2-853b-214d985fd..." :path "/home/matt/UofTMail/inbox/cur/1574686684_1.205752...." :maildir "/inbox" :priority normal :flags (replied seen) :parts ((:index 1 :name "1.msgpart" :mime-type "text/html" :type (leaf) :attachment nil :size 19769)) :from (("Firefox Monitor" . "[email protected]")) :to ((nil . "[email protected]")) :body-html "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Stric...") nil)
mu4e~proc-filter(#<process *mu4e-proc*> "rgin: 0px; text-decoration: none; line-height: 1.5...")
from org-msg.
Poking around just a little bit, I think that the call to mu4e-message-field-at-point :body-html) would succeed *without* the
(set-buffer mu4e~view-buffer-name ...)if it were attached to
mu4e-compose-pre-hookinstead of
mu4e-compose-hook`. That is, it would be easy to get access to the info if we could store information in a variable that persists from pre-composition to post-composition. Since the buffer changes across the composition process, I guess the variable couldn't be buffer-local, so potentially you could end up with the wrong message in the compose buffer.
If this method is not practical it might be possible to get the msg object via the msg id, which I think is preserved in the "References" header, but I haven't yet found out how
from org-msg.
Not perfect, but this seemed to help
(defun mu4e-headers-compose-reply ()
(interactive)
(mu4e-headers-view-message)
(switch-to-buffer "*mu4e-headers*")
(mu4e-compose-reply)
(org-msg-goto-body)
)
(defun mu4e-headers-compose-forward ()
(interactive)
(mu4e-headers-view-message)
(switch-to-buffer "*mu4e-headers*")
(mu4e-compose-forward)
)
(define-key mu4e-headers-mode-map (kbd "R") 'mu4e-headers-compose-reply)
(define-key mu4e-view-mode-map (kbd "F") 'mu4e-headers-compose-forward)
from org-msg.
The method based on pre-composition hook and composition hook is not very elegant but it should work. Feel free to submit a patch one you have something which work and does not require a hack in mu4e.
from org-msg.
Waiting for a response form mu-discuss list to see if I can get access to the msg object through the References
header instead -- this seems more sustainable to me. However, at present mu4e filters the mu process output in a way that seems to make it impossible to get the raw object directly.
from org-msg.
Related Issues (20)
- Odd Issue with Forwarded Messages, Empty Message at Top
- Tab does not auto-complete emails in the To: field HOT 15
- Wrong cursor position after reply — missing call to `goto-body` HOT 1
- Unwanted *ORG ASCII Export* buffer HOT 5
- Forwarding email with inline image or LaTeX formula fails (reverts to text), but replying works (keeps html) HOT 1
- Customise reply/forward citation lines (currently sometimes shows several authors in From: and duplicate authors in Cc:)
- Temporary reply-to filepaths are not persisted HOT 1
- Proper way to inject css
- Documentation for org-msg-options HOT 1
- `mu` v1.11.23 breaks `org-msg` HOT 3
- inline images in parent message have the wrong content-disposition (attached) when replying HOT 1
- [Feature Request] Addressee tagging generating a mailto link in the message body HOT 2
- How to disable org-msg for org-submit-bug-report?
- `mu 1.12.0` breaks `org-msg` HOT 34
- compose error with mu4e HOT 3
- adding courier font command HOT 4
- when I edit a draft and send -- the email isn't converted to html
- [Feature]: Preview includes the original message when forwarding
- Cannot get proselint to load as checker HOT 1
- org-msg-edit-mode-mu4e: Symbol’s function definition is void: mu4e~compose-remap-faces
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-msg.