From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: [PATCH] Prevent overwriting of output files from babel calls with nil result Date: Thu, 29 Oct 2015 19:59:58 +0000 Message-ID: <87ziz1wim9.fsf@gmail.com> References: <563000F7.3090409@gmail.com> <87si4tye5b.fsf@gmail.com> <87f4f16f12829a921a198d2f05f1874b.squirrel@www.gibiris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrtMi-0003SO-9y for emacs-orgmode@gnu.org; Thu, 29 Oct 2015 16:00:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrtMf-0006M7-35 for emacs-orgmode@gnu.org; Thu, 29 Oct 2015 16:00:04 -0400 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:35956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrtMe-0006Lx-Sj for emacs-orgmode@gnu.org; Thu, 29 Oct 2015 16:00:01 -0400 Received: by wmec75 with SMTP id c75so31586943wme.1 for ; Thu, 29 Oct 2015 13:00:00 -0700 (PDT) In-Reply-To: <87f4f16f12829a921a198d2f05f1874b.squirrel@www.gibiris.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?=C3=89ibhear?= , Org Mode Hi =C3=89ibhear, Thanks for sending the example. I think it is not expected to work going forward because the lisp block relies on being able to pick up the value of =E2=80=98params=E2=80=99, which will not be possible now that org = is moving to lexical binding. In general, org-babel-execute:foo are internal functions, so trying to trick them int working properly in an elisp code block is a bad idea. The emacs-lisp babel backend is special, so I can=E2=80=99t predict what the result would be of making it return the symbol nil instead of the string =E2=80=9Cnil.=E2=80=9D (Though for the sake of consistency it ought to all= ow nil symbol returns.) On the balance, I recommend you do something like the following, using two code blocks (untested): ,---- | #+name: dot-code | #+begin_src emacs-lisp :results verbatim | (generate-dot-code) | #+end_src |=20 | #+RESULTS: dot-code | : "your dot code will appear here" |=20 | #+begin_src dot :file foo.png :var code=3Ddot-code() | $code | #+end_src | | #+RESULTS: | [[file:foo.png]] `---- Hope this helps, --=20 Aaron Ecay