[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-edit-src-code outside of org
From: |
Thorsten Jolitz |
Subject: |
Re: [O] org-edit-src-code outside of org |
Date: |
Tue, 27 May 2014 10:32:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
address@hidden (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--
============================
address@hidden (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