emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tables recently stopped aligning


From: Rasmus
Subject: Re: [O] Tables recently stopped aligning
Date: Thu, 09 Jul 2015 11:47:35 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

William Denton <address@hidden> writes:

> Thanks for locating this.  I don't know enough about Org's workings to
> see what in the change introduced the bug, but something did go wrong,
> and column widths + table alignments are broken.  I hope someone can
> fix it!

The problem is that the highlighted condition is always true.  There are
two things causing this.  First, format doesn't truncate string unless you
do something like %40.40.  Second, buffer-substring also returns invisible
text.  In practice this imply that tables can only grow and not truncate
now.

    ;; Replace modified lines only.
    (dolist (l lines)
      (let ((line (if l (apply #'format rfmt (append (pop fields) emptystrings))
                    hfmt)))
        (if (equal (buffer-substring (point) (line-beginning-position 2)) line)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Rasmus

-- 
A page of history is worth a volume of logic




reply via email to

[Prev in Thread] Current Thread [Next in Thread]