From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Apply patch from org document Date: Sat, 23 Jul 2016 19:12:30 -0700 Message-ID: References: <87h9bf52ic.fsf@wanadoo.es> Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="0-1298681013-1469326350=:1030" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bR8uC-0007oO-ND for emacs-orgmode@gnu.org; Sat, 23 Jul 2016 22:12:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bR8u8-0005JR-Bt for emacs-orgmode@gnu.org; Sat, 23 Jul 2016 22:12:35 -0400 Received: from iport-acv4-out.ucsd.edu ([132.239.0.7]:54323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bR8u8-0005JN-3X for emacs-orgmode@gnu.org; Sat, 23 Jul 2016 22:12:32 -0400 In-Reply-To: <87h9bf52ic.fsf@wanadoo.es> 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" To: =?ISO-8859-15?Q?=D3scar_Fuentes?= Cc: emacs-orgmode@gnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1298681013-1469326350=:1030 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT On Sun, 24 Jul 2016, Óscar Fuentes wrote: > Is there a method for applying a patch/diff embedded in a code block? > If by `embedded' you mean that the body of a src block is a patch such as provided by `git format-patch', you could use the language `diff'. `org-edit-src-code' (typing C-c ') with point in the block will open a buffer with the body as its contents in Diff mode. You can use the Diff menu to do various things like apply the patch. When you are done another C-c ' will close the buffer. With some effort, you can follow ob-template.el[1] as a guide to crafting ob-diff.el (say) to allow execution of src blocks, if you think you need to go that far. HTH, Chuck [1] http://orgmode.org/w/worg.git/blob/HEAD:/org-contrib/babel/ob-template.el --0-1298681013-1469326350=:1030--