From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: problem with org-table-export Date: Sat, 28 May 2016 11:24:25 +0200 Message-ID: <87y46utu0m.fsf@gmx.us> References: <87d1o7ruis.fsf@msstf091.ucc.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6aU4-0005rW-O1 for emacs-orgmode@gnu.org; Sat, 28 May 2016 05:24:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6aU0-0006Cv-IF for emacs-orgmode@gnu.org; Sat, 28 May 2016 05:24:39 -0400 Received: from plane.gmane.org ([80.91.229.3]:35634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6aU0-0006Cm-8Q for emacs-orgmode@gnu.org; Sat, 28 May 2016 05:24:36 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b6aTv-0000SC-2o for emacs-orgmode@gnu.org; Sat, 28 May 2016 11:24:31 +0200 Received: from ip-178-203-233-130.hsi10.unitymediagroup.de ([178.203.233.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 May 2016 11:24:31 +0200 Received: from rasmus by ip-178-203-233-130.hsi10.unitymediagroup.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 May 2016 11:24:31 +0200 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@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi Andreas, Thanks for your bug report. Andreas Amann 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