From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-edit-src-code outside of org
Date: Tue, 27 May 2014 10:32:04 +0200 [thread overview]
Message-ID: <877g571v23.fsf@gmail.com> (raw)
In-Reply-To: 87y4y55rpm.fsf@gmail.com
jorge.a.alfaro@gmail.com (Jorge A. Alfaro-Murillo) writes:
> Hi, I would like to use org-edit-src-code outside of org, I think it
> would be very handy in Message mode, to send messages that contain code
> and edit that code in the proper mode.
This can be done with outshine.el and outorg.el.
Install them as described in the docs and then add
,------------------------------------------------------------
| (when (require 'outline nil t)
| (add-hook 'message-mode-hook 'outline-minor-mode))
|
| (require 'outshine nil t)
| (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
|
| (setq outshine-use-speed-commands t)
`------------------------------------------------------------
M-# M-# will then convert your message-mode buffer to full Org-mode, M-#
will copy the changes back to message-mode. As a proof of concept, I
attach this mail exported to ASCII by evaluating the following
source-block directly in the outorg-edit-buffer:
#+begin_src emacs-lisp
(org-export-as 'ascii)
#+end_src
#+results:
_________________
745
Thorsten Jolitz
_________________
Table of Contents
_________________
1 --text follows this line--
1 --text follows this line--
============================
jorge.a.alfaro@gmail.com (Jorge A. Alfaro-Murillo) writes:
> Hi, I would like to use org-edit-src-code outside of org, I think it
> would be very handy in Message mode, to send messages that contain
> code and edit that code in the proper mode.
This can be done with outshine.el and outorg.el. Install them as
described in the docs and then add
,------------------------------------------------------------
(when (require 'outline nil t)
(add-hook 'message-mode-hook 'outline-minor-mode))
(require 'outshine nil t)
(add-hook 'outline-minor-mode-hook 'outshine-hook-function)
(setq outshine-use-speed-commands t)
`------------------------------------------------------------
M-# M-# will then convert your message-mode buffer to full Org-mode,
M-# will copy the changes back to message-mode. As a proof of concept,
I attach this mail exported to ASCII.
,----
| (org-export-as 'ascii)
`----
-- cheers, Thorsten
--
cheers,
Thorsten
prev parent reply other threads:[~2014-05-27 8:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 20:49 org-edit-src-code outside of org Jorge A. Alfaro-Murillo
2014-05-13 20:58 ` Ken Mankoff
2014-05-13 21:12 ` Jorge A. Alfaro-Murillo
2014-05-14 13:44 ` Hubert Chathi
2014-05-17 6:33 ` Jorge A. Alfaro-Murillo
2014-05-17 8:23 ` Alexander Baier
2014-05-27 8:32 ` Thorsten Jolitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877g571v23.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).