jeremy-compostella/org-msg

How to disable org-msg for org-submit-bug-report?

Opened this issue · 1 comments

Hi. I want to copy-paste elisp into my email in plain text without any formatting but no matter what kind of code block I use, the block does not get exported plainly. As an example:
image
How can I toggle org-msg-mode in a message buffer and/or export an elisp block literally without any formatting?

I don't think it is possible to toggle the message buffer in and out of org-msg-mode, but here are three ways you could send the code without the default border on a text part:

  1. Automatically turn OrgMsg off just for this function and then turn it back on again.
(advice-add 'org-submit-bug-report :around #'org-msg-inhibited)
  1. Remove the default border that Org uses for source block exports by adding a filter function to org-export-filter-src-block-functions which replaces or deletes the border characters.

  2. Write the e-mail with separate literal export blocks for each exporter, although this would require that the code is already encoded as HTML for the HTML block.

#+begin_export html
<pre>(code-goes-here)</pre>
#+end_export
#+begin_export ascii
(code-goes-here)
#+end_export

Option 1 would probably be best for submitting a bug report as the Org maintainers and issue tracker are probably only interested in the text part of the message.