emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: problem with org-table-export
Date: Sat, 28 May 2016 11:24:25 +0200	[thread overview]
Message-ID: <87y46utu0m.fsf@gmx.us> (raw)
In-Reply-To: 87d1o7ruis.fsf@msstf091.ucc.ie

Hi Andreas,

Thanks for your bug report.

Andreas Amann <a.amann@ucc.ie> writes:

> Hi list,
>
> whenever I use
>
> M-x org-table-export
>
> inside a table, the buffer is marked "modified".  
>
> This is even the case if no modifications are done to the buffer by
> exporting the table.  
>
> This problem happens since at least two years and possibly longer and
> persists with the current git version of org-mode.
>
> As it is quite annoying in my workflow, I tried to investigate the
> problem.  Looking at the definition of org-table-export in
> lisp/org-table.el the problem seems to be that the line
>
>    (org-table-align)             ; Make sure we have everything we need.
>
>
> which seems to always set the modified flag, irrespective of real
> changes being done. When I comment out this line or surround it with
> (org-with-silent-modifications  ... ), then the buffer remains clean.
> However both solutions likely introduce other problems.
>
> I guess the proper solution would be to improve org-table-align to not
> unnecessarily set the "modified" flag, but I would not know how to do
> this.

It sounds rather plausible. AFAIR, org-table basically deletes and redraws
the table (but I didn’t check the code), which would modify the buffer.
Perhaps org-table-align could run in a temporary buffer and only inserted
the "new" table if it the result differs from what’s already in the
buffer.

Andreas, do you want to try to fix this issue?

Thanks,
Rasmus

-- 
In theory, practice and theory are the same. In practice they are not

  reply	other threads:[~2016-05-28  9:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27 22:44 problem with org-table-export Andreas Amann
2016-05-28  9:24 ` Rasmus [this message]
2016-05-28 11:59   ` Nicolas Goaziou
2016-05-28 19:39     ` Andreas Amann
2016-05-29  8:24       ` Nicolas Goaziou
2016-05-29 18:12         ` Andreas Amann

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=87y46utu0m.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.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).