Giter Site home page Giter Site logo

jeremy-compostella / org-msg Goto Github PK

View Code? Open in Web Editor NEW
273.0 18.0 55.0 256 KB

OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.

License: GNU General Public License v3.0

Emacs Lisp 100.00%
emacs emacs-mode emacs-packages mail composing org-mode orgmode outlook html

org-msg's People

Contributors

abougouffa avatar chris00 avatar dakra avatar danielfleischer avatar gajama avatar hugo-heagren avatar jeremy-compostella avatar jsravn avatar julienmasson avatar jumper047 avatar mgttlinger avatar mzhu-um avatar natecox avatar obar avatar podiki avatar seblemaguer avatar syohex avatar timquelch avatar titaniumbones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

org-msg's Issues

'Unedited' email compose buffers prompt to save on kill

It seems to me that opening a new mail buffer to compose or reply, then changing your mind and deciding to kill that buffer, should not prompt to save a modified buffer.

Of course org-msg inserts org properties (and optional possible greeting+signature) when opening the mail buffer, so I understand why the behavior occurs, but this doesn't really count as editing that the user might want to save. I've been using a simple fix for this locally and will send a pull request.

message content not parsed

Hi,

I'm using mu4 but from what I can tell this error occurs prior to any mu4e-specific code. I tried this in a normal org-buffer:

* testing

- hi
#+begin_src emacs-lisp :results code
(org-msg-build)
#+end_src

#+RESULTS:
#+begin_src emacs-lisp
(html nil
      (body nil
            (p
             ((style . "text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:\"Arial\";max-width:100ch;"))
             "* testing\n\n- hi\n#+begin_src emacs-lisp :results code\n(org-msg-build)\n#+end_src\n\n")))
#+end_src

As you can see, the buffer isn't actually being parsed, and hte raw text is just wrapped in a p tag.

M-x emacs-version: GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10, cairo version 1.17.3) of 2019-08-30

M-x org-version: Org mode version 9.2.5 (release_9.2.5-504-g3c24be @ /home/matt/src/org-mode/emacs/site-lisp/org/)

MELPA version of org-msg

Happy to help with debugging, but not sure where to do it. I did try running

(libxml-parse-html-region (point-min) (point-max) )

on the HTML temp buffer, and i nthat case the fully parsed tree was returned.

Send as plain text command?

Hi Mr. Compostella,

Thanks for the excelent work!

The behavior of org-msg, as I understood it, is to reply as plain text or html according to the message being replied to. Is there any way to, when composing a new message, intruct org-msg to send it in plain text? It's a kind of "oops, forgot to disable org-msg and don't want to copy, disable org-msg, new message, paste, send, enable it gain" thing.

Thanks a lot for your time.

Multipart alternative

This currently sends a multipart/related of the HTML message plus any attachments. I would also like to send a plaintext or org encoded version of the message for MUAs that don't support HTML messages. This should be placed inside a multipart/alternative.

From playing around in the implementation I was able to send the plain variant but this breaks things due to the enclosing related environment and also attachments were missing then.

mu4e-compose-new cites custom mu4e signature

Cool package! I'm using it with mu4e.

When I have org-msg-mode enabled and compose a new mail with mu4e, org-msg automatically cites my mu4e-compose-signature. It looks like this:

From: ...
...
--text follows this line--
...
--citation follows this line (read-only)--
-- 
Jakob
Phone: ...

Is it possible to clear the buffer for new mails or never cite anything for new mails?

I think it's reasonable to not use the normal MUA signature when org-msg-mode is enabled since in that case, often a different HTML signature is wanted.

todos are not highlighted correctly in generated html

When previewing or sending a message that contains org-todo items, they are not highlighted. The problem seems to stem from org-msg-html--todo which calls color-rgb-to-hex which takes an optional input parameter to determine how many bytes to use per color which is set to 4 per default in the emacs 27 version I am using. The result is that colors get encoded as 12 instead 6 character hex which are not accepted by the browser.

Possible fix:

  • using the optional parameters of color-rgb-to-hex to ensure that only 2 bytes are used per color:
(apply 'color-rgb-to-hex (append (color-name-to-rgb ,val) '(2))

instead of

(apply 'color-rgb-to-hex (color-name-to-rgb ,val))

in org-msg-html--todo

(defun org-msg-html--todo (orig-fun todo &optional info)
  "Format todo keywords into HTML.
This function is used as an advice function of `org-html--todo'.
- ORIG-FUN is the original function.
- TODO is a TODO keyword.
- INFO is a property list."
   (cl-macrolet ((add-if-exist (val lst sym)
  	         `(when ,val
		    (push (cons ,sym (apply 'color-rgb-to-hex
					    (append (color-name-to-rgb ,val) '(2))))
			  ,lst))))
    (if org-msg-export-in-progress
	(let ((face (org-get-todo-face todo)))
	  (when (and todo face)
	    (let (props)
	      (add-if-exist (htmlize-face-foreground face) props 'color)
	      (add-if-exist (htmlize-face-background face) props
			    'background-color)
	      (format "<span%s>%s</span>"
		      (if props
			  (format " style=\"%s\"" (org-msg-props-to-style props))
			"")
		      todo))))
      (if info
	  (funcall orig-fun todo info)
	(funcall orig-fun todo)))))

the version of color-rgb-to-hex in my emacs version:

(defun color-rgb-to-hex  (red green blue &optional digits-per-component)
  "Return hexadecimal #RGB notation for the color specified by RED GREEN BLUE.
RED, GREEN, and BLUE should be numbers between 0.0 and 1.0, inclusive.
Optional argument DIGITS-PER-COMPONENT can be either 4 (the default)
or 2; use the latter if you need a 24-bit specification of a color."
  (or digits-per-component (setq digits-per-component 4))
  (let* ((maxval (if (= digits-per-component 2) 255 65535))
         (fmt (if (= digits-per-component 2) "#%02x%02x%02x" "#%04x%04x%04x")))
    (format fmt (* red maxval) (* green maxval) (* blue maxval))))

`org-msg-improve-reply-header` fails in mu4e

org-msg-improve-reply-header assumes that the html string has been generated by gnus-article-browse-html-article in org-msg-save-article-for-reply-gnus, which is not called by the mu4e backend. WHat's the best way to fix this?

Footnote

Hi,

Thank you for this very useful tool that I recently discovered.

I have a strange behavior with footnotes. The content of the note appears above the number.

image

Do you have the same behavior?

`org-msg-post-setup` chokes in mu4e if message is not currently open

org-msg-post-setup calls org-msg-save-article-for-reply-mu4e in mu4e mode, which assumes that the buffer *mu4e-view* is currently open. However, that may not be the case. If it's not, the method we currently have for inserting message contents will fail.

because org-msg-post-setup is called at the end of mu4e-compose -- the post-execution hook -- it's a bit late at that point to o something simple like just call mu4e-headers-view-message. There's a long sequnce of bouncing function calls in mu4e's window-drawing call stack, but it might be possible to extract the docid attribute and use it to track down the html body. Maybe it's worth asking onmu-discuss?

Nothing Happens with Spacemacs

Hey there,
I saw the package demoed on Mike Zamansky's video and tried installing it on Spacemacs. I get no errors at all installing it, but when I fire up mu4e, I have nothing going on with org-msg. No pre-installed lines of toc stuff or anything else etc... I did an M-x org-msg mode and that works and it is active, but it doesn't display in org-mode style when writing a message in mu4e.

My mu4e version is 1.2.0 C and my Spacemacs version is the latest pull on develop version 0.3 - whatever the latest version is (it's constantly changing).

I know that org-msg is installed because org-msg shows up with M-x org-msg mode. I put org-msg package in 'dotspacemacs-additional-packages' and then I configured it in dotspacemacs/user-config() with just a copy/paste of your own config on your page here. I checked to make sure that mu4e is my mail agent (it is).

So I'm sort of at a loss about what I'm doing wrong. Just curious. If you don't have time to figure it out, I'll post about it in the Spacemacs page. :) I just figured I'd try here first.

Thanks!

org-msg-save-article-for-reply-mu4e not working in mu4e 1.4.3

The temp file this function saves seems broken - it breaks when Emacs tries to open it with complaints about characters it couldn't encode. I put details here: #37 (comment).

Experimenting with it, removing

(quoted-printable-decode-region (point-min) (point-max)))
seems to fix it and I can reply to html emails without a problem.

There seems to be a built in function in mu4e to do this already which org-msg should probably use instead: https://github.com/djcb/mu/blob/05dc6333c38905ce2d1411f06004f7c050532afe/mu4e/mu4e-actions.el#L98

org-msg-mode will not activate automatically under mu4e

The org-msg-mode just don't activate automatically under mu4e when I reply some outlook style email. I could activate it in mu4e:compose mode by org-msg-edit-mode, but with a lot of problems.

My env:

  • OS: macOS 10.14.5
  • Emacs: GNU Emacs 26.3
  • mu/mu4e: 1.3.5C

Configurations for org-msg:

  • Installed by elpa
  • Using the configurations in README

How to modify color of headings?

I switched to org-msg from org-mu4e-compose-mode and I'm enjoying it so far. The only thing that bothers me, is that I don't know how to change the values that determine the rendering of headings.
The mail I sent to myself looks like this.
org-msg

I want first and second level headings to be colored in black and remove the underlining of the second level headings. How do I do this?

org-msg prevents mu4e~compose-mail from working as intended

Hello,

I've just started using this package, but it seems great 😃. One tiny hiccup though, I've found that if I call

(mu4e~compose-mail to subject headers)

while org-msg-mode is active, none of the specified details (to, subject, headers) get filled in!

If it would be possible to fix this behaviour that would be marvelous :)

Can't forward email: These default coding systems were tried to encode text…

When I try to forward this email and org-msg-mode is enabled I get the following error:

These default coding systems were tried to encode text
in the buffer ‘[email protected]’:
  (utf-8-unix (516 . 4194285) (558 . 4194270))
However, each of them encountered characters it couldn’t encode:
  utf-8-unix cannot encode these:  \335 \336

Click on a character (or switch to this window by ‘C-x o’
and select the characters by RET) to jump to the place it appears,
where ‘C-u C-x =’ will give information about it.

Select one of the safe coding systems listed below,
or cancel the writing with C-g and edit the buffer
   to remove or modify the problematic characters,
or specify any other coding system (and risk losing
   the problematic characters).

  raw-text no-conversion

The other window displays the message source in unix-utf-8 coding system. I can see indeed two offending chars marked as \335 and \446 They disappear when I copy/paste the text here, but if I add them manually, it reads:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.qw3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><meta http-equiv="X-UA-Compatible" content="IE\355ge"/><meta name="viewport" content="width\336vice-width, initial-scale=1"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="x-apple-disable-message-reformatting"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-status-bar-style" content="black"/><meta name="format-detection" content="telephone=no"/><title></title>

The messages buffer prints these errors which I believe are from org-msg

Malformed quoted-printable text [318 times]
Saving file /tmp/[email protected]...
Buffer [email protected] modified; kill anyway? (y or n) n
error in process filter: apply: Wrong number of arguments: (8 . 8), 10
error in process filter: Wrong number of arguments: (8 . 8), 10

I use mu4e, which displays the contents of this message just fine. For that the mu4e-view buffer uses utf-8-unix coding system.
But when I display the message source from mu4e, the buffer is iso-latin-1-unix. With this coding system, the source is correctly displayed.

To sum up, as far as I can understand, org-msg seems to stumble in trying to represent the message source using a utf-8-unix buffer, while the message source has chars which are not encoded as utf-8.

The same problem occurred on three other emails (from various senders) prior to this bug report. Disabling org-msg-mode solves the problem allowing me to forward the message using mu4e.

Note: the attached email.txt file is a direct upload of the email file as it sits on my disk, not as displayed by emacs. i hope that it can help to reproduce the problem.

Automatic resize inline images when sending emails

Dear all,

I would like to automatic resize all inline- and attached images in messages I send. The listed code does this for attached images, but not for inline images (ie [[file:~/some_inline_img.jpg]]).

mu4e-resize-image-attachments is run by message-send-hook, looking for something like

<#part type="image/jpeg" filename="/home/user/some_attached_img.jpg" disposition=attachment>

and then replacing the filename with a resized version of the image created in /tmp.

What do I have to look for, for inline messages? org-msg also adds to the message-send-hook. How do I know in which order the different hooks are run in, ie. should I search for [[file:~/some_inline_img.jpg]], resize and replace with [[file:/tmp/some_inline_img.jpg]]?

(defvar mu4e-resize-image-types '("jpg" "png" "svg" "jpeg")
  "List of attached image types to resize.")

(defvar mu4e-resize-img t "if t, then automatic resize images")

(defun mu4e-resize-image-attachments ()
  (when mu4e-resize-img ; unless is the 'no-then' form of when
    (let (cmds
      (image-types
       (mapconcat #'identity mu4e-resize-image-types "\\|")))
      (save-excursion
    (message-goto-body-1)
    (while (re-search-forward 
        (format "<#part.+\\(filename=\"\\)\\(.+\\(\\.%s\\)\\)\""
            image-types)
        nil t)
      (let* ((infile (match-string-no-properties 2))
         (outfile (concat (temporary-file-directory)
                  (file-name-nondirectory infile))))
        (push (format "convert %s -resize 600 %s"
              (shell-quote-argument infile)
              (shell-quote-argument outfile))
          cmds)
        (replace-match outfile t t nil 2)))
    (mapcar #'shell-command cmds)))))

(add-hook 'message-send-hook 'mu4e-resize-image-attachments)

(defun mu4e-toggle-resize-img()
  "Toggle automatic resizing of images to size 600px on largest
side, while keeping aspect ratio"
  (interactive)
  (set (make-local-variable 'mu4e-resize-img) (not (symbol-value 'mu4e-resize-img)))
  (message "mu4e-resize-img toggled (= %s)" (symbol-value 'mu4e-resize-img)) )

Best regards,
Paw

don't hardocde 'div when parsing html

if org-html-html5-fancy is non-nil, there will be no div elements in an exported html buffer.

Probably simple to just let-bind a variable in org-msg-build depending on the value:

ivy and other issues

Hi,

as far as I can see, this is the best solution for sending and replying to html mails with mu4e, great work! Org-mime makes a lot more problems.

After testing I found out two things. If one attach a file, the selection is done with ido, is it possible to use ivy instead?

How can I modify the style cheet to get for example a larger font which is not Arial, say Callibri here?

Regards
Thorsten

send fails with `Wrong type argument: listp, part`

org-msg-ctrl-c-ctrl-c fails for me in emacs 28.0.50 (pretty recent) on line 4250 of message.el (last line of the section of code below). Not sure what's going on exactly.

    (while (and success
		(setq elem (pop alist)))
      (when (funcall (cadr elem))
	(when (and (or (not (memq (car elem)
				  message-sent-message-via))
		       (message-fetch-field "supersedes")
		       (if (or (message-gnksa-enable-p 'multiple-copies)
			       (not (eq (car elem) 'news)))
			   (y-or-n-p
			    (format
			     "Already sent message via %s; resend? "
			     (car elem)))
			 (error "Denied posting -- multiple copies")))
		   (setq success (funcall (caddr elem) arg)))

The message sends fine if I turn off org-msg-mode and manually run message-send, so I assume it has something to do with the parts that get generated. I can attach the message source if that seems helpful.

thanks for you help as always!

mu4e-compose-signature interference

I am probably missing something obvious but if I have mu4e-compose-signature set, when I compose a new mail, it becomes part of the quoted and read-only section. Furthermore, if I have org-msg-text-plain-alternative to tthen this signature will figure inline at the top of the email for the recipient.

So the solution for now is to have mu4e-compose-signature to nil and not send plain text alternative.

Is it expected?

In mu4e C-c C-k should call mu4e-message-kill-buffer

when use org-msg in mu4e the key combination C-c C-k should call mu4e-message-kill-buffer because if C-c C-k call message-kill-buffer the mu4e window layout will also killed.

mu4e-message-kill-buffer is an interactive and compiled function
defined in mu4e-compose.el.

Signature
(mu4e-message-kill-buffer)

Documentation
Wrapper around message-kill-buffer.

It restores mu4e window layout after killing the compose-buffer.

Key Bindings
mu4e-compose-mode-map C-c C-k

References
mu4e-message-kill-buffer is unused in mu4e-compose.el.

Forwarding emails in mu4e does not include original attachments

I'm using org-msg with mu4e. When I forward an email with attachments, with org-msg-mode enabled, the attachments in the original email are included at the bottom of the editing buffer (in the read-only citation section) but not automatically included in the PROPERTIES drawer. When the email is sent (forwarded), the original attachments are not included in it. This behavior is unexpected because by default, the attachments in the original email should be included in and sent with the forwarded email. If org-msg-mode is disabled, the plain-text forwarded email in mu4e automatically includes and sends all the original attachments with it.

Incompatible with BBDB

Like you, I would rather avoid HTML emails but I do have to use them sometimes and this package looks quite nice. However, it doesn't work with bbdb, or more properly, bbdb doesn't know about org-msg. I get the following error:

Debugger entered--Lisp error: (error "BBDB: MUA ‘org-msg-edit-mode’ not supported")
signal(error ("BBDB: MUA ‘org-msg-edit-mode’ not supported"))
error("BBDB: MUA '%s' not supported" org-msg-edit-mode)
bbdb-mua()
bbdb-mua-update-records(nil bbdb-select-message)
bbdb-mua-auto-update()
run-hooks(message-send-hook)
message-send(nil)
message-send-and-exit()
org-msg-ctrl-c-ctrl-c()
run-hook-with-args-until-success(org-msg-ctrl-c-ctrl-c)
org-ctrl-c-ctrl-c(nil)
funcall-interactively(org-ctrl-c-ctrl-c nil)
call-interactively(org-ctrl-c-ctrl-c nil nil)
command-execute(org-ctrl-c-ctrl-c)

Not adding signature nor using org-msg-options under mu4e

I'm sending under mu4e.

I manually activate org-msg-edit-mode and the message is indeed formatted and sent out correctly but I don't get my signature and the org-msg-options aren't used.

If I manually put in the options by adding an:

#+OPTIONS: etc.

line at the top, the options to take effect.

Sending via mu4e fails

Whenever I compose a message using org-msg and try to send it, I get this error:

Debugger entered--Lisp error: (wrong-number-of-arguments #f(compiled-function (path maildir) #<bytecode 0xc17121>) 1)
  mu4e~proc-sent("/maildir/drafts/cur/1588137829.ecfa2055d18955a4.xxx:2,DS")
  #f(compiled-function () #<bytecode 0x19953f9>)()
  run-hooks(message-sent-hook)
  message-send(nil)
  message-send-and-exit()
  org-msg-ctrl-c-ctrl-c()
  run-hook-with-args-until-success(org-msg-ctrl-c-ctrl-c)
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)

I believe the error occurs somewhere in this code https://github.com/jeremy-compostella/org-msg/blob/master/org-msg.el#L1096 introduced in #42

/cc @podiki

Emacs 27
org-msg: 2.7
mu4e: 1.2.0
OS: Linux

GPG-Support missing(?)

GPG Support is missing. At least, I didn't find a way to sign a mail. Even if I call mml-secure-sign, the tag <#part sign=pgpmime> stays in the file/mail, but there is no signature.

Is there a way to achieve that?

(Btw: I just love org-msg mode :) )

Math in Emails

It is quite common in my line of work to send latex math expressions via email and expect the reader to do the rendering in their head. Given that org allows for inline latex math expressions as well as rendering them to inline images (which works out quite well in the preview) it should be fairly easy to attach those as inline parts of the message. This would be very very useful.

I believe the only missing part would be to check for referenced files in the ltximg folder and attach those to the mail before sending as the generation already happens and the preview of the mail renders perfectly.

Underlined text not styled

With _input text_ one gets:

<span class="underline">input text</span>

But since you can expect global css to be removed in email clients, this doesn't work. A better output would be:

<span style="text-decoration: underline">input text</span>

(Or alternatively <u> tags)

This is using Org 9.3.4

Very narrow text columns when viewed in Outlook/Office365

I'm encountering an odd issue when someone replies to a message of mine that I've created with org-msg: once a reply is initiated, the original message text gets compressed into a very narrow column when viewed in Outlook/Office365 on the web. A screenshot is included below.

I'm using the latest org-msg with mu4e 1.4.10. The org-msg configuration is the default one suggested in the README; mail-user-agent is set to mu4e. I've tried setting/unsetting mu4e's format=flowed support, but that doesn't seem to make a difference.

Any idea what could be causing this? Other clients (Gmail, mu4e, etc) are not afflicted by this viewing problem. But Outlook/Office365 is my workplace default for email, so I would love to understand how to fix this.

org-msg-outlook-web

notmuch company support in org-msg-edit-mode

Hi

Related to GH-49. If you patch notmuch-company.el v0.29.1 with this diff:

70c75
<       (prefix (and (derived-mode-p 'message-mode)
---
>       (prefix (and (or (derived-mode-p 'message-mode) (eq major-mode 'org-msg-edit-mode))

Then it's possible to autocomplete email addresses in the To: line when you have this in your init.el:

(require 'notmuch-company)
(add-hook 'org-msg-edit-mode-hook 'notmuch-company-setup)

I'm pretty bad at elisp, what would be the best way to implement this feature?

Best,
Rune

Ability to change HTML formatting inline

Adding:

#+BEGIN_EXPORT html
<div class="foo">
bar
</div>
#+END_EXPORT

Does not work (we just get the text above exported as is. Is there any way to write text with different css attributes (e.g div class="citation") assuming that the class is defined in the variable assigned to org-msg-enforce-css?

Commenting in line

Hi!

Thanks for the wonderful package, it has definitely improved my life :).

At times I need to respond to mails in-line (=CIL) - since the citation is read-only, how do you suggest going about this?

Sending failed with recent emacs

Hi @jeremy-compostella,

Thanks again for all the work you have done around org-msg :)

I compile manually emacs and today after updating the source code I have the following error when I send an email with org-msg enabled:

Debugger entered--Lisp error: (wrong-type-argument listp part)
  mml-compute-boundary-1(part)
  mapc(mml-compute-boundary-1 (part (type . "text/html") (disposition . "inline") (tag-location . 239) (contents . "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"e...")))
  mml-compute-boundary-1((multipart (type . "mixed") part (type . "text/html") (disposition . "inline") (tag-location . 239) (contents . "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"e...")))
  mml-compute-boundary((multipart (type . "mixed") part (type . "text/html") (disposition . "inline") (tag-location . 239) (contents . "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"e...")))
  mml-generate-mime-1((multipart (type . "mixed") part (type . "text/html") (disposition . "inline") (tag-location . 239) (contents . "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"e...")))
  mml-generate-mime(nil nil)
  message-encode-message-body()
  message-send-mail(nil)
  message-send-via-mail(nil)
  message-send(nil)
  message-send-and-exit()
  org-msg-ctrl-c-ctrl-c()
  run-hook-with-args-until-success(org-msg-ctrl-c-ctrl-c)
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)

Emacs version:
GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.11, cairo version 1.16.0) of 2020-04-30

I've tested with only org-msg (no other configuration or modules loaded).

In the emacs source code my head is currently at this commit:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3c810669f7b913f63049826a89e08c1691767506

I have investigated a little bit and it looks like it's due to this change:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3c443e990f933409ab6ab01a5a20097ad86929fd

When I revert this commit 3c443e990f933409ab6ab01a5a20097ad86929fd, it works fine.

For the moment I did not have time to find a "proper" solution ...

I can't send emails

Hello,

Great work with this package, in the last update I ran into the following error when trying to send an email, using mu4e or notmuch:

Debugger entered--Lisp error: (search-failed "[^\11\n\15 -퟿-�𐀀-�]")
  re-search-forward("[^\11\n\15 -퟿-�𐀀-�]")
  xml-escape-string("http://www.w3.org/1999/xhtml")
  #f(compiled-function (x) #<bytecode 0xab9821011ab8faa>)((xmlns . "http://www.w3.org/1999/xhtml"))
  mapcar(#f(compiled-function (x) #<bytecode 0xab9821011ab8faa>) ((xmlns . "http://www.w3.org/1999/xhtml") (lang . "en") (xml:lang . "en")))
  org-msg-attrs-str(((xmlns . "http://www.w3.org/1999/xhtml") (lang . "en") (xml:lang . "en")))
  org-msg-xml-to-str((html ((xmlns . "http://www.w3.org/1999/xhtml") (lang . "en") (xml:lang . "en")) (head nil (comment nil " 2020-05-28 jue 09:26 ") (meta ((http-equiv . "Content-Type") (content . "text/html;charset=utf-8"))) (meta ((name . "viewport") (content . "width=device-width, initial-scale=1"))) (meta ((name . "generator") (content . "Org mode")))) (body nil "\n" (div ((style . "font-family:\"Arial\";font-size:10pt;line-height:11p...") (id . "content")) "\n" (p ((style . "text-decoration:none;margin-bottom:0px;margin-top:...")) "\nEstimado " (b nil "Edison") "," (br nil)) "\n\n" (p ((style . "text-decoration:none;margin-bottom:0px;margin-top:...")) "\nEsto es una Prueba" (br nil)) "\n\n" (p ((style . "text-decoration:none;margin-bottom:0px;margin-top:...")) "\nSaludos," (br nil)) "\n\n" (div ((style . "font-family:\"Arial\";font-size:10pt;margin-bottom:2...")) "\n" (p ((style . "text-decoration:none;margin-bottom:0px;margin-top:...")) "\n– " (b nil "Edison Ibáñez") " " (br nil) (i nil "One Emacs to rule them all") (br nil)) "\n\n") "\n") "\n")))
  org-msg-prepare-to-send()
  run-hooks(message-send-hook)
  message-send(nil)
  #f(compiled-function (&optional arg) "Send message like `message-send', then, if no errors, exit from mail buffer.\nThe usage of ARG is defined by the instance that called Message.\nIt should typically alter the sending method in some way or other." (interactive "P") #<bytecode 0x106574e541912c00>)()
  apply(#f(compiled-function (&optional arg) "Send message like `message-send', then, if no errors, exit from mail buffer.\nThe usage of ARG is defined by the instance that called Message.\nIt should typically alter the sending method in some way or other." (interactive "P") #<bytecode 0x106574e541912c00>) nil)
  message-send-and-exit()
  org-msg-ctrl-c-ctrl-c()
  run-hook-with-args-until-success(org-msg-ctrl-c-ctrl-c)
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)

But disabling org-msg emails are sent without any problem.

Thanks for the help

compatibility with mu4e 1.2

With mu4e 1.2, when replying with org-msg active, it fails with "error in process filter: Symbol's value as variable is void: mu4e~view-msg". The function has been removed in mu4e 1.2.

support for notmuch

I heard about this mode from Using Emacs and am eager to try it.

I use notmuch to handle email in emacs. I get a "Backend not found" message when I try to run activate org-msg-mode in a message buffer.

Have you tried enabling notmuch?

thanks!

Message content disappears in replies

When sending replies, the actual content of the reply (everything between the two separators) disappears.

As far as I can see it is not connected to mu4e in particular. mail-user-agent is set. Configuration same as the default one.

Example:

From: Einar Elén <[email protected]>
To: [email protected]
Subject: Re: 
Date: Wed, 27 Nov 2019 16:38:32 +0100
In-reply-to: <[email protected]>
Fcc: /home/einarelen/.Maildir/gmail/[Gmail]/Sent Mail/cur/1574869112.10c3f1c2a33b0667.elfriede:2,S
--text follows this line--
#+OPTIONS: html-postamble:nil H:5 num:nil ^:{} toc:nil d:nil
#+STARTUP: hidestars indent inlineimages
:PROPERTIES:
:reply-to: ("/tmp/[email protected]")
:attachment: nil
:END:
t
--citation follows this line (read-only)--
Einar Elén writes:

f 

produces
`


From
: "Einar Elén

Subject
:

To
: nil

Cc
:

Date
: Wed, 27 Nov 2019 15:57:54 +0100


f

`

Using Emacs 27, mu 1.3.5, msmtp 1.8.6

Sent messages are not saved when using org-msg

I have the following code that adds GCC header, and it works without org-msg. All sent messages are saved to "Sent Items" folder.

(setq gnus-message-archive-group "nnimap+name:Sent Items")

But when I use org-msg, I see GCC header with the correct folder specified, but sent emails are not saved anywhere.

I tried setting mail-user-agent to gnus-user-agent, but the result is the same - sent messages are not saved anywhere.

Is this is a known issue?

[questen] HTML signature

I have to use a specific HTML signature at work. It is already written in HTML. But every attempt to send it fails. It always arrives as HTML code. Do you know how I can achieve this?

Thank you!

handle forwarded messages

last in a whole bunch of reports (sorry!). I'm pretty sure that org-msg chokes on forwarded messages, because of this line:

	     (temp-files (org-msg-get-prop "reply-to"))

which forwarded messages do not contain. Maybe there's a way to use References in an analogous way? Though that does seem somewhat more complex.

What if mail-user-agent is gnus-user-agent

Hello Jérémy and others,

How difficult would it be to support mail-user-agent being gnus-user-agent, so that gcc are created? If I can help, I'd be very happy to

currently, I get:

Debugger entered--Lisp error: (error "Backend not found").

Interaction with signed messages?

Hi,

I use gnus so I thought I'd give org-msg a try. It took a little time to sort out some weird incompatibility in bbdb, but I got there. I composed a test message and sent it to myself.
All well and good...except: whereas gnus usually signs my messages with pgp, with org-msg, I get this line literally at the top of my HTMLified mail:

<#secure method=pgpmime mode=sign>

Is this a bug, a limitation, or user error on my part?

Flags not being set after sending a message (mu4e)

Flags are not being set on a message after replying or forwarding when using mu4e. This is handled in mu4e by mu4e-sent-handler (see mu4e-compose.el) which is called after a message is sent. This will add the flags for replied/forwarded to the parent message if needed. I'm not sure how best to do this for org-msg, as that function in mu4e is called by it's process filter (see mu4e-proc.el), and I didn't quite understand how that works/how it should be used here. Maybe just call mu4e-sent-handler directly?

Difference to org-mime

I use org-mime to write my
html mails with mu4e (as I think most people do).

Can you make a feature comparison table or something
so people can see if they should use org-msg or org-mime.

org-msg mu4e reply to msg problem

emacs 26.3
OSX 10.15.1

I can compose E-Mails with org-msg without any problems. But when I replay to a message from my inbox pressing 'R', the default mu4e compose mode will open and send an text-only message not an html message.

Is there some option I forget to include in my configuration?

Best regards
Ronny

preview/send message not possible "org-msg-build: Wrong type argument: consp, nil"

mail-agent mu4e
emacs 26.3
spacemacs developer distribution

Message could not send or preview, if the original reply message does not contain a "

"-tag.

error message is:

org-msg-build: Wrong type argument: consp, nil

backtrace:

Debugger entered--Lisp error: (wrong-type-argument consp nil)
org-msg-improve-reply-header((html nil (head nil (meta ((http-equiv . "Content-Type") snip ""))) ...))
org-msg-build()
org-msg-preview(nil)
funcall-interactively(org-msg-preview nil)
call-interactively(org-msg-preview nil nil)
command-execute(org-msg-preview)

--text follows this line--
#+OPTIONS: html-postamble:nil H:5 num:nil ^:{} toc:nil \n:t d:nil
#+STARTUP: hidestars indent inlineimages
:PROPERTIES:
:reply-to: ("/tmp/rt-4.0.8-7237")
:attachment: nil
:END:

If the file /tmp/rt-4.0.8-7237 does not include a "

"-tag the error happens.
After I manually inserted the tag org-msg could send/preview the message.

not working:

cat /tmp/rt-4.0.8-7237
from: asdfs
asdfasdf
asdfasdfsadf
asdfasdfasdf

working:

cat /tmp/rt-4.0.8-7237
from: asdfs
asdfasdf
asdfasdfsadf
asdfasdfasdf
<div></div>

The problem is that sometimes I reply need to message which does not have a

-tag.

"# coding: utf-8" line when replying

I use org-msg with mu4e (1.2.0) and emacs 27.

When I reply to a message, # coding: utf-8 gets added at the end of the message. It's not present when I type the reply, so it's added by some hook. When I do org-msg-preview on the reply, this line is also added after the reply text.

html of the reply:

<html><body><div style="font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt;" id="content">
<p style="text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
replying<br/></p>
</div><p># coding: utf-8
</p><!-- 2020-02-28 Fri 16:35 --><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><meta name="viewport" content="widthÞvice-width, initial-scale=1"/><meta name="generator" content="Org mode"/><meta name="author" content="wedens"/><div style="padding:3.0pt 0in 0in 0in;border-top:solid #e1e1e1 1.0pt;margin-bottom:20px;font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt;" align="left"><p style="text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;"><b>
From</b>: <a style="color:#0071c5;color:black;text-decoration:none;" href="mailto:&quot;wedens&quot; &lt;[email protected]&gt;">wedens</a><br/><b>
Subject</b>: test<br/><b>
To</b>: <a style="color:#0071c5;color:black;text-decoration:none;" href="mailto:&quot;wedens&quot; &lt;[email protected]&gt;">wedens</a><br/><b>
Cc</b>: <br/><b>
Date</b>: Fri, 28 Feb 2020 16:35:20 +0700<br/></p></div>
<div style="font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt;" id="content">
<p style="text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
test123<br/></p>
</div>
</body></html>

Is there some way to avoid this line being added?

org-msg related configuration:

(setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil "
        org-msg-startup "hidestars indent inlineimages")
(org-msg-mode +1)

PS: I'm not sure if it's related to org-msg and if it's not, I'll be glad for any pointers to where to look next.

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.