emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: D M German <dmg@uvic.ca>
To: emacs-orgmode@gnu.org
Subject: Re: bug in expansion of variables in babel Perl
Date: Sun, 24 Feb 2013 10:20:04 -0800	[thread overview]
Message-ID: <87obf9y3or.fsf@mn.cs.uvic.ca> (raw)
In-Reply-To: <87mwutzwo2.fsf@Rainer.invalid> (Achim Gratz's message of "Sun, 24 Feb 2013 14:08:45 +0100")




 Achim> D M German writes:
 Achim> […]

 Achim> Please leave the formats alone, if you change the number of parameters
 Achim> there folks that use their own definitions won't know what hit them.
 Achim> What you want is to prepend something to the body that Babel gives you,
 Achim> so let-bind that result and use it.  You could even advise the function
 Achim> and have it submit to your will without changing Org.

Hi Achim, thanks for the recommendation. As I said before, see my
previous patch as a proof-of-concept and not as something that I think
should be applied. I am fully aware of the potential consequences.

 Achim> BTW, now that I think some more about it: debugging Perl is much easier
 Achim> than you seem to let on:

 Achim> (setq org-babel-perl-command "perl -Mstrict -ne print").

Using strict is complicated by use of variables from org tables and the
way that the code in R is executed. It would require the variable @r and
each of the created variables from tables to be defined as my. I know I
can change the behaviour of org-babel-variable-assignment, but perhaps
simply adding "my" to any variable created in org would be a good thing
to do. I don't think it would harm, anyways.

 Achim> This will echo the program sent to Perl in full glory into the output
 Achim> block.

thanks, this i a great suggestion that I didn't know about.

--dmg


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

 Achim> Waldorf MIDI Implementation & additional documentation:
 Achim> http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




--
Daniel M. German                  "Beware of bugs in the above code;
                                   I have only proved it
   Donald Knuth  ->                correct, not tried it."
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 

  reply	other threads:[~2013-02-24 18:20 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 [this message]
2013-02-24 12:17 ` Achim Gratz
2013-02-24 16:52   ` Eric Schulte
2013-02-24 17:15     ` Achim Gratz
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=87obf9y3or.fsf@mn.cs.uvic.ca \
    --to=dmg@uvic.ca \
    --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).