From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kodi Arfer Subject: Re: Bug with automatic alignment of table columns in HTML export Date: Tue, 19 Mar 2013 15:39:22 -0400 Message-ID: <5148BEEA.6000702@arfer.net> References: <5145DC81.2070905@arfer.net> <87ehfbrzil.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI2Ng-0008T4-Oo for emacs-orgmode@gnu.org; Tue, 19 Mar 2013 15:39:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UI2Ne-00089M-30 for emacs-orgmode@gnu.org; Tue, 19 Mar 2013 15:39:32 -0400 Received: from mxout-08.mxes.net ([216.86.168.183]:10451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI2Nd-000882-Ur for emacs-orgmode@gnu.org; Tue, 19 Mar 2013 15:39:30 -0400 In-Reply-To: <87ehfbrzil.fsf@bzg.ath.cx> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org On 2013 Mar 19 Tue 1:26:13 PM -0400, Bastien wrote: > Hi Kodi, > > Kodi Arfer writes: > >> Consider an Org file with the following content: >> >> | a | b | >> |-----+---| >> | 100 | 1 | >> | 1 | 1 | >> | | 1 | >> | | 1 | >> | | 1 | >> | | 1 | >> | | 1 | >> | | 1 | >> >> Within Emacs, Org right-aligns the left column, as it should, since most >> nonempty cells in the column are numeric. In HTML export, though (starting >> from "emacs -Q -l /tmp/minimal-org.el"), the column comes out >> left-aligned. The problem seems to be with how the exporter treats empty >> cells, since if you put numbers in all the empty cells above, the column >> comes out right-aligned in HTML export. > > Fixed, thanks. You're quite welcome. That was prompt! I see this case now works in master. The catch is that there are still some cases which give inconsistent alignment between Emacs and HTML export, such as: | a | b | |-----+---| | 100 | 1 | | 1 | 1 | | 1 | 1 | | 1 | 1 | | a | 1 | | | 1 | | | 1 | | | 1 | | | 1 | | | 1 | | | 1 | I believe the heuristic used for in-buffer display is that empty cells are ignored entirely when doing the comparison against org-table-number-fraction.