emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: bug in expansion of variables in babel Perl
Date: Sun, 24 Feb 2013 18:15:38 +0100	[thread overview]
Message-ID: <878v6dhbut.fsf@Rainer.invalid> (raw)
In-Reply-To: 87a9qtk62c.fsf@gmail.com

Eric Schulte writes:
> I just added the variable `org-babel-perl-var-wrap', into ob-perl.el
>
>     ;; emacs-lisp
>     (defvar org-babel-perl-var-wrap "q(%s)"
>       "Wrapper for variables inserted into Perl code.")
>
> This way we will get what sounds like improved wrapping by default, but
> users who really do want to insert interpolated values can customize
> this variable.

It would be impossible to use any user variables for interpolation since
we don't have Perl sessions, so only pre-defined variables from Perl
would ever deliver a value (perhaps).  So all interpolation would do
most of the the time is to replace something that happens to look like a
perl variable by nothing.  Having the variable doesn't hurt, but I'm not
sure we should advertize its existence widely since with a more devious
definition you can do arbitrary code execution.

> This complexity is related to the need to occasionally run in remote
> directories or on remote machines.  If there are ways to reduce this
> complexity without losing functionality I'm game.

Already done by throwing away those parts of the code we never used
anyway.  It looks much more manageable now.

> I'm not currently aware of any language-wide support for printing the
> expanded code block along with the results.  I don't think there has
> been any desire for this previously.  It shouldn't be hard to write an
> emacs lisp block to give the desired result...

Also done.  The file the OP wanted to look at gets written out anyway,
we just need to prevent its deletion.  This is a manual affair for now,
if this is really a big issue we can add an option for this.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

  reply	other threads:[~2013-02-24 17:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-24  9:16 bug in expansion of variables in babel Perl D M German
2013-02-24  9:45 ` dmg
2013-02-24 10:23   ` D M German
2013-02-24 13:08     ` Achim Gratz
2013-02-24 18:20       ` D M German
2013-02-24 12:17 ` Achim Gratz
2013-02-24 16:52   ` Eric Schulte
2013-02-24 17:15     ` Achim Gratz [this message]
2013-02-24 18:03     ` Achim Gratz
2013-02-25  9:44       ` D M German
2013-02-24 17:05 ` [PATCH] " Achim Gratz
2013-02-25  9:42   ` D M German
2013-02-25 12:48     ` Achim Gratz
2013-02-25 21:54       ` D M German
2013-02-26 11:13         ` Achim Gratz
2013-03-02 22:01   ` Achim Gratz

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=878v6dhbut.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --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).