From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [patch][babel] `org-babel-result-end' bug fix and regression tests Date: Fri, 06 Jan 2012 10:47:26 -0700 Message-ID: <87ipkozpsh.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjDtF-0005BK-UM for emacs-orgmode@gnu.org; Fri, 06 Jan 2012 12:47:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjDtE-00025J-Mn for emacs-orgmode@gnu.org; Fri, 06 Jan 2012 12:47:41 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:58698) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RjDtE-000256-Fm for emacs-orgmode@gnu.org; Fri, 06 Jan 2012 12:47:40 -0500 In-Reply-To: (Martyn Jago's message of "Fri, 06 Jan 2012 17:31:58 +0000") 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: Martyn Jago Cc: emacs-orgmode@gnu.org Hi Martyn, Unfortunately there is no way to remove raw results because there is no way to know where the results end. While your patch will certainly work most of the time, it will not work in cases where the results includes an empty line, and ultimately I think any attempt to remove raw results will result in confusion. If removable raw results are desired then the ":results wrap" option may be used. I believe this is mentioned in the manual (if not it should be). I think this patch should not be applied (although maybe some of the test cases could still be useful). Thanks, Martyn Jago writes: > `org-babel-result-end' bug fix and `org-babel-remove-result' regression tests. > > * lisp/ob.el: > > The code block below will currently act as though :results prepend > is set. This is due to `org-babel-result-end' being unable to > find the correct end of a raw result. This patch fixes that. > > #+begin_src emacs-lisp :results raw > "a line" > #+end_src > > #+results: > a line > a line > > * testing/lisp/test-ob.el: > > Several regression tests that test the correct (multiple) execution of > code blocks in the various results formats. The tests also test that > 'org-babel-remove-result' correctly removes the result. > > Best, Martyn > > -- Eric Schulte http://cs.unm.edu/~eschulte/