From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: [bug] org-table-iterate-buffer-tables breaks source code blocks Date: Fri, 06 Apr 2012 13:07:01 +0200 Message-ID: <80aa2pdsq2.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, When running `org-table-iterate-buffer-tables' over a file containing source code blocks, these can be broken by the recalculate process: *pipe signs are inserted in source code blocks*. Here an ECM: --8<---------------cut here---------------start------------->8--- #+TITLE: Export table to PDF #+AUTHOR: Seb Vauban * Tasks ** Do it :LOGBOOK: CLOCK: [2012-04-02 Mon 09:00]--[2012-04-02 Mon 10:52] => 1:52 :END: Here is the code I've done: #+begin_src sh egrep "^[^ #A-Z]+:" Somefile \ | sed 's/:[^#]*//' #+end_src * Reporting #+TBLNAME: report #+BEGIN: clocktable :scope file :block 2012-04 Clock summary at [2012-04-06 Fri 12:59], for April 2012. | Headline | Time | | |------------+------+------| | Total time | 1:52 | | |------------+------+------| | Tasks | 1:52 | | | Do it | | 1:52 | #+END: * Summary Time worked on Tasks: | Total | 1:51 | #+TBLFM: @1$2=remote(report,@3$2) --8<---------------cut here---------------end--------------->8--- Steps to reproduce the problem: 1. Save the ECM as `table.org' 2. Run from the command line: emacs --batch -Q --eval "(add-to-list 'load-path \"~/src/org-mode/lisp\")" -l org-install.el --eval "(require 'org-table)" "table.org" -f org-update-all-dblocks -f org-table-iterate-buffer-tables --eval '(write-file "table-out.org")' where ~/src/org-mode/lisp should be adjusted to reflect where your latest Org files reside. 3. Open the update Org file (called `table-out.org') and you'll discover the bug: The source code block now contains an extra pipe at the end of the line. #+begin_src sh egrep "^[^ #A-Z]+:" Somefile \ | sed 's/:[^#]*//' | #+end_src ^ Here Best regards, Seb -- Sebastien Vauban