emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Programmatically insert source-blocks
Date: Sat, 23 Mar 2013 16:35:04 -0600	[thread overview]
Message-ID: <87k3oxpwvu.fsf@gmail.com> (raw)
In-Reply-To: 8738vppw44.fsf@gmail.com

> So here is my FEATURE REQUEST:
>
> either modify `org-babel-demarcate-block' so that it can be used to
> insert a language-specific code-block (with args?) non-interactively, or
> add something like `org-insert-block' to Org-mode's core. I would prefer
> signature
>
> ,----------------------------------------------
> | (defun org-insert-block (lang &rest args)...)
> `----------------------------------------------
>
> to be able to specify the src-block headline exactly in a program that
> uses this function.

This function may be easily written outside of Org-mode by anyone who
needs it.

I don't see that Org-mode itself will ever want to programatically and
non-interactively insert a code block in an Org-mode file (if fact that
sounds rather dangerous to me), so I would vote against adding such a
function to the core.

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

  reply	other threads:[~2013-03-23 22:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 19:36 Programmatically insert source-blocks Thorsten Jolitz
2013-03-20 20:43 ` Christian Moe
2013-03-20 22:03   ` Thorsten Jolitz
2013-03-23 22:35     ` Eric Schulte [this message]
2013-03-25  5:54       ` Bastien

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=87k3oxpwvu.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tjolitz@gmail.com \
    /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).