emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: Tables recently stopped aligning
Date: Thu, 09 Jul 2015 11:47:35 +0200	[thread overview]
Message-ID: <87zj35slvs.fsf@gmx.us> (raw)
In-Reply-To: alpine.DEB.2.02.1507082203510.26860@shell.miskatonic.org

William Denton <wtd@pobox.com> 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	other threads:[~2015-07-09  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07  2:30 Tables recently stopped aligning William Denton
2015-07-07  4:56 ` Nick Dokos
2015-07-09  2:06   ` William Denton
2015-07-09  9:47     ` Rasmus [this message]
2015-07-09 16:01     ` Nicolas Goaziou
2015-07-10  0:07       ` Nick Dokos

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=87zj35slvs.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).