emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [bug] org-table-iterate-buffer-tables breaks source code blocks


From: Sebastien Vauban
Subject: [O] [bug] org-table-iterate-buffer-tables breaks source code blocks
Date: Fri, 06 Apr 2012 13:07:01 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (windows-nt)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]