emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [bug] org-table-iterate-buffer-tables breaks source code blocks
Date: Fri, 06 Apr 2012 13:07:01 +0200	[thread overview]
Message-ID: <80aa2pdsq2.fsf@somewhere.org> (raw)

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	other threads:[~2012-04-06 11:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-06 11:07 Sebastien Vauban [this message]
2012-04-09 15:27 ` [bug] org-table-iterate-buffer-tables breaks source code blocks Bastien
2012-04-18  8:59   ` Sebastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80aa2pdsq2.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).