From mboxrd@z Thu Jan 1 00:00:00 1970 From: Franz Sommer Subject: What sport should I practice today, random TODO generator: bugfixing help requested Date: Tue, 27 Dec 2011 04:16:38 +0100 Message-ID: <819AF3F5-81D1-45C8-AD5D-3E2E995E1E85@franz.sommerp.net> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfNWt-0001Mq-Nf for emacs-orgmode@gnu.org; Mon, 26 Dec 2011 22:16:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RfNWs-0006Dn-LO for emacs-orgmode@gnu.org; Mon, 26 Dec 2011 22:16:43 -0500 Received: from smtprelay04.ispgateway.de ([80.67.18.16]:32887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfNWs-0006Db-GV for emacs-orgmode@gnu.org; Mon, 26 Dec 2011 22:16:42 -0500 Received: from [109.125.115.143] (helo=[192.168.3.109]) by smtprelay04.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1RfNWp-0001sQ-8a for emacs-orgmode@gnu.org; Tue, 27 Dec 2011 04:16:39 +0100 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 Hi, I have a small lisp code block evaluation problem generating org-mode = style output. Motivation and so on, see below.=20 Would appreciate the communities help.=20 Gladly will return feedback once my setup has advanced and you are = interested. Tks in advance, Franz =3D=3D=3D=3D=3D=3D=3D =3D Goal:=3D =3D=3D=3D=3D=3D=3D=3D Hava a random (weekly) generator of activities and / or todo items. = Think of everyday question like sports (shall I go cycling , swimming or = running) May also be used for creativity teasers and any other kind of = randomizable decission making. (see why here:=20 = http://books.google.de/books?id=3Dm5vQHbj2Vi0C&pg=3DPA71&dq=3Do+reilly+min= d+hack+random&hl=3Dde&sa=3DX&ei=3D4TH5Tv3lOcStsgaZ3dzgDw&ved=3D0CEMQ6AEwAg= #v=3Donepage&q=3Do%20reilly%20mind%20hack%20random&f=3Dfalse ) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D =3D Current Stage / Actual Debug Problem =3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D I like to get=20 ** TODO running and not | ** TODO running :random: | What is wrong with my approach ? (Yes I am new to lisp, but I hope that does not matter here to much. ) =3D=3D=3D=3D=3D=3D=3D =3DCode:=3D =3D=3D=3D=3D=3D=3D=3D #+headers: :results value varbatim replace=20 #+begin_src emacs-lisp=20 (defun table '()) (add-to-list 'table "** TODO running :random:") ;; = later on some scheduling and tracking properties will be added (add-to-list 'table "** TODO cycling :random:") (setq returnlist '() ) ;;later a loop shall be here to say make list of 5 items ) (add-to-list 'returnlist (nth (random (length table)) = table))) (returnlist) #+end_src #+results: | ** TODO Cereals :random: |