From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Subject: Re: Tangle with conditional statement Date: Sun, 6 Oct 2013 21:50:41 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0116057cb9d24904e817d9a0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSuLm-0004sn-8t for emacs-orgmode@gnu.org; Sun, 06 Oct 2013 15:50:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSuLj-0000q5-8u for emacs-orgmode@gnu.org; Sun, 06 Oct 2013 15:50:46 -0400 Received: from mail-ie0-x22b.google.com ([2607:f8b0:4001:c03::22b]:44709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSuLi-0000py-VB for emacs-orgmode@gnu.org; Sun, 06 Oct 2013 15:50:43 -0400 Received: by mail-ie0-f171.google.com with SMTP id at1so14119627iec.30 for ; Sun, 06 Oct 2013 12:50:41 -0700 (PDT) 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: emacs-orgmode@gnu.org --089e0116057cb9d24904e817d9a0 Content-Type: text/plain; charset=ISO-8859-1 Hi Fabrice and Eric, A long over due response. Apologies. I got a unanimous answer about not putting the conditional statements in the code block header, that was reassuring =). I guess the use case here is if you have different configurations for different users or machines or something similar. I looked at the code I was shown. I noticed there was some pieces missing but even though adding them I could not get the code to work properly. I figured it was due to me using el-get for my packages and no packages are actually required, but somehow autoloaded instead, by the el-get setup, or it's just a matter of me being a noob elisper. Anyway, when I was fiddling around with the code I stumbled upon el-gets built in functions. I noticed that, of course, el-get has functions for checking install status of packages. My current solution therefore looks like this: (if (el-get-package-exists-p "") (do stuff) ) which seems to work well for now but is not optimal. Of course it's only works with el-get installed packages but I'll have to live with it for now. Thanks Fabrice and Eric for your swift responses. Regards Andreas --089e0116057cb9d24904e817d9a0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Fabrice an= d Eric,

A long over due response. Apologies.

I go= t a unanimous answer about not putting the conditional statements in the co= de block header, that was reassuring =3D). I guess the use case here is if = you have different configurations for different users or machines or someth= ing similar.

I looked at the code I was shown. I noticed there was some pieces= missing but even though adding them I could not get the code to work prope= rly. I figured it was due to me using el-get for my packages and no package= s are actually required, but somehow autoloaded instead, by the el-get setu= p, or it's just a matter of me being a noob elisper.

Anyway,=A0 when I was fiddling around with the code I stumbled up= on el-gets built in functions. I noticed that, of course, el-get has functi= ons for checking install status of packages. My current solution therefore = looks like this:
(if (el-get-package-exists-p "<package>")
=A0=A0= =A0=A0=A0 (do stuff) )

which seems to work well for now but is= not optimal. Of course it's only works with el-get installed packages = but I'll have to live with it for now.

Thanks Fabrice and Eric for your swift responses.

Re= gards

Andrea= s
--089e0116057cb9d24904e817d9a0--