From: Michael Welle <mwe012008@gmx.net>
To: emacs-orgmode@gnu.org
Subject: Re: Table formula from code block
Date: Wed, 25 Jan 2017 15:19:33 +0100 [thread overview]
Message-ID: <8737g72pe2.fsf@luisa.c0t0d0s0.de> (raw)
In-Reply-To: <871svsjv0b.fsf@delle7240.chemeng.ucl.ac.uk> (Eric S. Fraga's message of "Tue, 24 Jan 2017 16:13:56 +0000")
Hello,
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> On Tuesday, 24 Jan 2017 at 14:14, Michael Welle wrote:
>> ohschockschwerenot, I found it. I set org-confirm-babel-evaluate to a
>> function that does look at the body of the code block and then decides
>> if it should be executed without confirmation or not.
>>
>> I'm not sure, why that is a problem. In the case of the examples, the
>> function returns t and that is the default value of o-c-b-evaluate.
>
> Interesting. I cannot help with this but I would be quite interested in
> seeing your function in case it's something I could use! Would it be
> possible to share?
it's quite a hack. I don't want Org to evaluate source code blocks
without confirmation. This could lead to all sorts of trouble. On the
other hand, there are a few source code blocks, that I want to eval
without confirmation. So I use this:
(defun hmw/org-post-publish-export-confirm-evaluate (lang body)
(not (string-match "^#post publish exporter" body)))
(setq org-confirm-babel-evaluate 'hmw/org-post-publish-export-confirm-evaluate)
A source code block looks like follows:
#+BEGIN_SRC shell :exports results :shebang #!/bin/sh :var SRCDIR=(expand-file-name (plist-get plist :base-directory)) :var DESTDIR=(expand-file-name (plist-get plist :publishing-directory))
#post publish exporter
(
echo "Starting esxwithforeman.org $(date)"
cd ${SRCDIR}
....
echo "Finish esxwithforeman.org $(date)"
) >> /tmp/c0t0d0s0_publish.log 2>&1
#+END_SRC
As you can see, this is not a security feature, esp. now that I
published it ;).
Regards
hmw
next prev parent reply other threads:[~2017-01-25 15:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-22 12:27 Table formula from code block Roger Mason
2017-01-23 12:04 ` Michael Welle
2017-01-24 12:10 ` Roger Mason
2017-01-24 13:07 ` Michael Welle
2017-01-24 12:14 ` Michael Welle
[not found] ` <fbefc85e10fc401ebab2f7ef3794eade@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-24 9:04 ` Eric S Fraga
2017-01-24 10:52 ` Michael Welle
[not found] ` <a780781601084f15802822fade909e25@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-24 11:43 ` Eric S Fraga
2017-01-24 13:38 ` Michael Welle
2017-01-24 14:14 ` Michael Welle
[not found] ` <3b626627d0e74bd69bcf3a7941acf9f8@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-24 16:13 ` Eric S Fraga
2017-01-25 14:19 ` Michael Welle [this message]
2017-01-24 13:01 ` Michael Welle
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=8737g72pe2.fsf@luisa.c0t0d0s0.de \
--to=mwe012008@gmx.net \
--cc=emacs-orgmode@gnu.org \
/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).