All Projects → jeremy-compostella → Org Msg

jeremy-compostella / Org Msg

Licence: gpl-3.0
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.

Projects that are alternatives of or similar to Org Msg

Mu4e Dashboard
A dashboard for mu4e (mu for emacs)
Stars: ✭ 259 (+69.28%)
Mutual labels:  mail, emacs, org-mode
Novels.org
Novels.org - Your Novels in Plain Text (Emacs . org-mode)
Stars: ✭ 120 (-21.57%)
Mutual labels:  emacs, org-mode
Walkman
Write HTTP requests in Org mode and replay them at will using cURL
Stars: ✭ 120 (-21.57%)
Mutual labels:  emacs, org-mode
Emacs Solaire Mode
If only certain buffers could be so grossly incandescent.
Stars: ✭ 129 (-15.69%)
Mutual labels:  emacs, emacs-packages
Emacs Gtd
Get Things Done with Emacs
Stars: ✭ 111 (-27.45%)
Mutual labels:  emacs, org-mode
Org Pandoc Import
Save yourself from non-org formats, thanks to pandoc
Stars: ✭ 111 (-27.45%)
Mutual labels:  emacs, emacs-packages
Writingwithemacs
Tips, Examples, and Resources for Writing with Emacs
Stars: ✭ 150 (-1.96%)
Mutual labels:  emacs, org-mode
Organice
An implementation of Org mode without the dependency of Emacs - built for mobile and desktop browsers
Stars: ✭ 1,327 (+767.32%)
Mutual labels:  emacs, org-mode
Emacs Gdscript Mode
An Emacs package to get GDScript support and syntax highlighting.
Stars: ✭ 132 (-13.73%)
Mutual labels:  emacs, emacs-packages
Org Fragtog
Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them
Stars: ✭ 149 (-2.61%)
Mutual labels:  emacs, org-mode
Elpa
Emacs China ELPA 镜像
Stars: ✭ 137 (-10.46%)
Mutual labels:  emacs, emacs-packages
Org Brain
Org-mode wiki + concept-mapping
Stars: ✭ 1,512 (+888.24%)
Mutual labels:  emacs, org-mode
Weblorg
Static Site Generator for Emacs
Stars: ✭ 103 (-32.68%)
Mutual labels:  emacs, org-mode
Cheatsheet
Pretty cheat sheets, or ``reference cards'', obtainable from Org files.
Stars: ✭ 116 (-24.18%)
Mutual labels:  emacs, org-mode
Ox Rst
reStructuredText Back-End for Org-Mode Export Engine
Stars: ✭ 94 (-38.56%)
Mutual labels:  emacs, org-mode
Emacs Solidity
The official solidity-mode for EMACS
Stars: ✭ 120 (-21.57%)
Mutual labels:  emacs, emacs-mode
Mu4e Alert
Desktop notifications and modeline display for mu4e
Stars: ✭ 143 (-6.54%)
Mutual labels:  mail, emacs
Ox Jira.el
Org-mode export backend for JIRA markup
Stars: ✭ 88 (-42.48%)
Mutual labels:  emacs, org-mode
Eless
A Better 'less' - A bash script that loads emacs with minimal view-mode config - Created with Org mode
Stars: ✭ 94 (-38.56%)
Mutual labels:  emacs, org-mode
Psc Ide Emacs
Emacs integration for PureScript's psc-ide tool.
Stars: ✭ 130 (-15.03%)
Mutual labels:  emacs, emacs-mode

OrgMsg is a [[https://www.gnu.org/software/emacs/][GNU Emacs]] global minor mode mixing up [[https://orgmode.org/][Org mode]] and your Mail User Agent Mode ([[https://www.gnu.org/software/emacs/manual/html_mono/message.html][Message mode]], [[https://www.djcbsoftware.nl/code/mu/mu4e/][mu4e mode]], or [[https://notmuchmail.org/notmuch-emacs/][notmuch mode]]) to compose and reply to emails in a Outlook HTML friendly style.

[[https://melpa.org/#/org-msg][https://melpa.org/packages/org-msg-badge.svg]] [[https://img.shields.io/badge/License-GPLv3-blue.svg]]

  • Presentation

Not that I really like the Outlook email style but in a work environment dominated by this software, it is good to be able to reply with the same style. By default, if the original message is in text form OrgMsg keeps it that way and does not activate itself. It allows to reply to developer mailing list (or any real technical people who knows how to handle text email) seamlessly. If the original message is in the HTML form, it activates the OrgMsg mode on the reply buffer.

OrgMsg provides a org-msg-edit-mode which is an derivation of [[https://orgmode.org/][Org mode]] in which some functionality of the current Mail User Agent ([[https://www.gnu.org/software/emacs/manual/html_mono/message.html][Message mode]], [[https://www.djcbsoftware.nl/code/mu/mu4e/][mu4e mode]], or [[https://notmuchmail.org/notmuch-emacs/][notmuch mode]]) are imported or replicated. For instance, a OrgMsg buffer uses the same font-lock-keywords than [[https://www.gnu.org/software/emacs/manual/html_mono/message.html][Message mode]] or the TAB key while the cursor is in the header calls the message-tab function.

For convenience, the original message is quoted below the --citation follows this line (read-only)-- marker. So you can easily refer to the original message. However, the entire quoted text is read-only because OrgMsg does not support modification of the original content.

OrgMsg has a mechanism to support different Mail User Agents (message, mu4e, notmuch ...). Each function which depends on the Mail User Agent calls org-msg-mua-call function which is an indirection to the OrgMsg Mail User Agent specific function.

Outlook email are really poor compared to what can be achieved by [[https://orgmode.org/][Org mode]]. I personally use the #+{begin|end}_quote to quote part of the email I am replying to. I extensively make use of #+{begin|end}_src mode to provide extract of code or example of changes, I sometimes use [[https://orgmode.org/worg/org-contrib/babel/][Org babel]] to generate an on the fly sequence diagram (using [[http://plantuml.com/][plantuml]]) or a simple graph (using [[https://en.wikipedia.org/wiki/DOT_(graph_description_language)][dot]]).

  • Keys and interactive functions

The OrgMsg mode keys are the usual key combination used in either [[https://orgmode.org/][Org mode]] or [[https://www.gnu.org/software/emacs/manual/html_mono/message.html][Message mode]].

  • C-c C-e -- calls org-msg-preview, it generates the final HTML email, save it into a temporary file and call the browse-url function on that file.
  • C-c C-k -- calls message-kill-buffer
  • C-c C-s -- calls message-goto-subject (same as in [[https://www.gnu.org/software/emacs/manual/html_mono/message.html][Message mode]])
  • C-c C-b -- calls org-msg-goto-body (similar to message-goto-body in [[https://www.gnu.org/software/emacs/manual/html_mono/message.html][Message mode]])
  • C-c C-a -- calls org-msg-attach, very similar to the org-attach function. It lets you add or delete attachment for this email. Attachment list is stored in the :attachment: property.
  • C-c C-c -- calls org-ctrl-c-ctrl-c. OrgMsg configures org-msg-ctrl-c-ctrl-c as a final hook of [[https://orgmode.org/][Org mode]]. When org-msg-ctrl-c-ctrl-c is called in a OrgMsg buffer it generates the MIME message and send it.

The org-msg-mode interactive function can be called to enable/disable OrgMsg. By default, once the module is loaded, it is disable. If you want to reply to an email without making use of OrgMsg, you should call that function before you call the reply-to function.

To start composing a new OrgMsg email, you can call the interactive message-mail function. If your mail-user-agent is message-user-agent (which is the by default Emacs configuration), compose-mail calls message-mail and is bound to [C-x m] by default.

  • Configuration

OrgMsg depends on this module: [[https://github.com/hniksic/emacs-htmlize][emacs-htmlize]]

The default Emacs Mail User Agent is [[https://www.gnu.org/software/emacs/manual/html_mono/message.html][Message]], if you are a [[https://www.djcbsoftware.nl/code/mu/mu4e/][mu4e]] user, you need to define your mail user agent (see [[https://www.djcbsoftware.nl/code/mu/mu4e/Emacs-default.html#Emacs-default][mu4e documentation - Emacs-default]]) because OrgMsg places some hooks and runs specific functions depending on the current Mail User Agent. The proper Mail User Agent should be defined before you activate OrgMsg (call the org-msg-mode function). Here is how you can define the Mail User Agent [[https://www.djcbsoftware.nl/code/mu/mu4e/][mu4e]].

#+begin_src emacs-lisp (setq mail-user-agent 'mu4e-user-agent) #+end_src

The following is my configuration which you can use as an example.

#+begin_src emacs-lisp (require 'org-msg) (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \n:t" org-msg-startup "hidestars indent inlineimages" org-msg-greeting-fmt "\nHi %s,\n\n" org-msg-recipient-names '(("[email protected]" . "Jérémy")) org-msg-greeting-name-limit 3 org-msg-default-alternatives '(text html) org-msg-convert-citation t org-msg-signature "

Regards,

,#+begin_signature -- Jeremy \\ /One Emacs to rule them all/ ,#+end_signature") (org-msg-mode) #+end_src

The org-msg-greeting-fmt can be customized to configure the default greeting message. If this format contains a %s token it is automatically replaced with the name of the person you are replying to. The name is either the recipient name specified in the org-msg-recipient-names list or the first name automatically extracted from the email address. If org-msg-greeting-fmt-mailto is t, the name is formatted as mailto link.

The types of MIME alternatives that are sent can be modified by editing the :alternatives: property on each message. For example, setting this property to (html text) will send both text and HTML alternatives to your message, whereas (html) or (text) will just send HTML or plain text respectively. The default value of :alternatives: can be set with org-msg-default-alternatives. If you want to add your own custom exporters, this can be done by modifying org-msg-alternative-exporters.

Alternatives listed in org-msg-default-alternatives should be placed in increasing order of preference to meet [[https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html][RFC-1341]] section 7.2.3 guidelines.

In order to avoid CSS conflict, OrgMsg performs inline replacement when it generates the final HTML message. See the org-msg-enforce-css variable to customize the style (and the default org-msg-default-style variable for reference).

Setting the org export option tex:dvipng or tex:dvisvgm is handeled correctly by this mode by producing inline images or inlining the generated SVG. Note that most mailclients however sadly do not display SVG content in mails so it might be best to stick to settings producing images unless you know your recipient's mailclient supports SVG.

  • Quotes

Org mode supports quotes using [[https://www.gnu.org/software/emacs/manual/html_mono/org.html#Paragraphs][quote blocks]]. The Org mode HTML backend exports such blocks as blockquote HTML tags and OrgMsg will apply a CSS style on top of it. Unfortunately, the Org mode engine does not allow nested quote blocks.

OrgMsg supports nested quotes with special #+{begin|end}_quote[0-9]+ blocks. A #+{begin|end}_quote1 block can be nested in a #+{begin|end}_quote block, a #+{begin|end}_quote2 block can be nested in a #+{begin|end}_quote1 block ... In order to ease the identification of the different levels of quotes once exported to HTML, each level uses a different color.

Using #+{begin|end}_quote[0-9]+ can be cumbersome and as thus, OrgMsg also supports the automatic conversion of the well established ASCII quote form based on the > characters. For instance, if the org-msg-convert-citation customization variable is set to t, the following text will be automatically converted to multi-level quote blocks before being exported to HTML.

#+begin_src

quote an email

which had quoted another email

which had quoted another email #+end_src

And it will look like this.

[[./quotes.png]]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].