From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: org-edit-src-code outside of org Date: Tue, 27 May 2014 10:32:04 +0200 Message-ID: <877g571v23.fsf@gmail.com> References: <87y4y55rpm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpCoH-0001IX-Oj for emacs-orgmode@gnu.org; Tue, 27 May 2014 04:32:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpCo8-00077n-57 for emacs-orgmode@gnu.org; Tue, 27 May 2014 04:32:37 -0400 Received: from plane.gmane.org ([80.91.229.3]:60785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpCo7-00077T-Uc for emacs-orgmode@gnu.org; Tue, 27 May 2014 04:32:28 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WpCny-0007Ke-Gx for emacs-orgmode@gnu.org; Tue, 27 May 2014 10:32:18 +0200 Received: from e178190143.adsl.alicedsl.de ([85.178.190.143]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 May 2014 10:32:18 +0200 Received: from tjolitz by e178190143.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 May 2014 10:32:18 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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