From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: [Babel] Reporting 2 problems of code execution Date: Sun, 28 Nov 2010 20:34:03 -0800 Message-ID: References: <80wrnxi59j.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-715244222-1291005243=:26123" Return-path: Received: from [140.186.70.92] (port=43961 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMvRd-0000wQ-LO for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 23:34:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMvRc-000207-4o for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 23:34:29 -0500 Received: from tajo.ucsd.edu ([137.110.122.165]:58870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMvRb-0001v2-Vs for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 23:34:28 -0500 In-Reply-To: <80wrnxi59j.fsf@missioncriticalit.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien_Vauban?= Cc: emacs-orgmode@gnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-715244222-1291005243=:26123 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 28 Nov 2010, S=C3=A9bastien Vauban wrote: > #+TITLE: 2 problems with executing block codes > #+DATE: 2010-11-28 > #+LANGUAGE: en > > Hi Eric and Dan, > > * Abstract > > Reporting two problems: Did you mean to include ":results output" in the headers? When I do that in eaco of the src blocks I get what I think you were=20 expecting. See inline below. Chuck > > 1. parsing problem of unescaped text from a shell block > 2. end marker repeated upon execution of elisp block > > Note that I added the RESULT thing in my default headers. > > * Data > > Let's say I want to grep trough arbitrary text, such as: > > #+results:a-couple-of-lines > : He said "I'll do it" > : but that cannot be echo'ed! > > ... or to let it scanned by AWK for post-processing (like generating some= DOT > representation). > > But, first, as errors are popping up, let's say I can just output it as i= s. > > * Shell code > > #+begin_src sh :var data=3Da-couple-of-lines :exports both > echo "$data" > #+end_src > > #+results: > #+BEGIN_RESULT > #+END_RESULT #+begin_src sh :results output :var data=3Da-couple-of-lines :exports both echo "$data" #+end_src #+results: : He said "I'll do it" : but that cannot be echo'ed! > > The data is impossible (*for me*, as is) to print out from a shell code. > Though, it is in Emacs-Lisp... without any change. > > Note that it's the second *single quote* only that's causing a problem, n= ot > the first one... > > * Emacs-Lisp code > > Executing this: > > #+begin_src emacs-lisp :var data=3Da-couple-of-lines :exports both > (prin1-to-string data) > #+end_src > > #+results: > #+BEGIN_RESULT > #+begin_example > "He said \"I'll do it\" > but that cannot be echoed!" > #+END_RESULT#+end_example > #+end_example > #+end_example > #+end_example > #+end_example > #+end_example > #+end_example > #+end_example > #+end_example > > works, but the *end marker is repeated* as long as we re-execute the bloc= k. #+begin_src emacs-lisp results output :var data=3Da-couple-of-lines :export= s=20 both (prin1-to-string data) #+end_src #+results: : "He said \"I'll do it\" : but that cannot be echo'ed!" > > Best regards, > Seb > > --=20 > S=C3=A9bastien Vauban > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > Charles C. Berry Dept of Family/Preventive Medic= ine cberry@tajo.ucsd.edu=09=09=09 UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 --8323328-715244222-1291005243=:26123 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --8323328-715244222-1291005243=:26123--