emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Mike McLean <mike.mclean@pobox.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Org Clock Table / Subtree Export subtle bug
Date: Sun, 29 Apr 2012 01:19:36 +0200	[thread overview]
Message-ID: <87aa1vwik7.fsf@gnu.org> (raw)
In-Reply-To: <CANid5Q7YO2jWzLjbsXkhw-vZSs_ATQrrqtx7AexR985p6SWEtg@mail.gmail.com> (Mike McLean's message of "Fri, 27 Apr 2012 14:35:53 -0400")

Hi Mike,

thanks very much for the detailed bug report.

Mike McLean <mike.mclean@pobox.com> writes:

> The general symptom is that if:
>
>     You have org-update-all-dblocks added
>     to org-export-first-hook with the goal of ensuring that dynamic
>     blocks are current before every export; AND
>     You are exporting only a region of the file, for example
>     using C-c C-e 1 b (buffer/subtree export)
>
> The Mark terminating the end of the region to be exported is carried
> into the org-clocktable-write-default formatting function and the
> call of (backward-delete-char 1) on line 2352 oforg-clock.el deletes
> a region (between the Mark of the initial call and point, which is
> immediately before the #+END: construct of the clock table). Deletion
> of the #+END: construct malforms the clock table and ultimately the
> export fails leaving the Org file is a corrupt state.

The trick is to use (let ((delete-active-region nil)) ...) so that 
the active region is not deleted by such adjustments.

I pushed a fix.

Thanks!

-- 
 Bastien

  reply	other threads:[~2012-04-28 23:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 18:35 Org Clock Table / Subtree Export subtle bug Mike McLean
2012-04-28 23:19 ` Bastien [this message]
2012-04-29 11:49   ` Mike McLean
2012-04-29 12:25     ` Mike McLean

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=87aa1vwik7.fsf@gnu.org \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=mike.mclean@pobox.com \
    /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).