From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Different behavior of exported results in org-babel Date: Fri, 17 Jan 2014 19:32:17 -0500 Message-ID: <87wqhyi0z2.fsf@gmail.com> References: <87y52e1lc1.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4Jq5-0001Nb-GD for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 19:32:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4Jpy-0000NO-6N for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 19:32:41 -0500 Received: from plane.gmane.org ([80.91.229.3]:41341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4Jpy-0000Mz-0E for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 19:32:34 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W4Jpu-000554-NI for emacs-orgmode@gnu.org; Sat, 18 Jan 2014 01:32:30 +0100 Received: from pool-98-110-175-184.bstnma.fios.verizon.net ([98.110.175.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Jan 2014 01:32:30 +0100 Received: from ndokos by pool-98-110-175-184.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Jan 2014 01:32:30 +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 Ahmadou Dicko writes: > As a workaround I will use your trick (in buffer evaluation before > exporting) but I was thinking of writing a filter. A better workaround is to delete the white space (spaces, tabs and newlines) at the end of the file: without that, the problem goes away. If white space is added to the end of the file, the problem might reappear, with different amounts of junk added depending on the amount of added white space. I have traced it down to org-babel-exp-process-buffer: it does the deletions of the source code blocks (possibly putting them back again if the header args tell it to) but it does not always delete the right region. More details later. Nick