From: "Charles C. Berry" <ccberry@ucsd.edu>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-orgmode@gnu.org
Subject: Re: Apply patch from org document
Date: Sat, 23 Jul 2016 19:12:30 -0700 [thread overview]
Message-ID: <alpine.OSX.2.20.1607231859510.1030@charles-berrys-macbook.local> (raw)
In-Reply-To: <87h9bf52ic.fsf@wanadoo.es>
[-- Attachment #1: Type: text/plain, Size: 768 bytes --]
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
next prev parent reply other threads:[~2016-07-24 2:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-24 0:00 Apply patch from org document Óscar Fuentes
2016-07-24 2:12 ` Charles C. Berry [this message]
2016-07-24 13:26 ` Óscar Fuentes
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=alpine.OSX.2.20.1607231859510.1030@charles-berrys-macbook.local \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=ofv@wanadoo.es \
/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).