emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* small bug in table alignment
@ 2013-03-14  8:43 Eric Abrahamsen
  2013-03-14 11:23 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Abrahamsen @ 2013-03-14  8:43 UTC (permalink / raw)
  To: emacs-orgmode

If you call "C-c C-c" within a table to align it, and point happens to
be on a horizontal rule, it throws an error that originates in
org-element-context.

The let at the top of that function sets "type" to 'table-row, and
"element" to:

(table-row (:type rule :begin XX :end XX :contents-begin nil :contents-end nil etc...))

Then on line 4749 comes:

  (and (memq type '(paragraph table-row verse-block))
       (let ((cbeg (org-element-property
		    :contents-begin element))
	     (cend (org-element-property
		    :contents-end element)))
	 (and (>= origin cbeg)
	      (<= origin cend)
	      (progn (goto-char cbeg) (setq end cend)))))

"cbeg" and "cend" are nil, and strenuously object to being compared
using >= or <=.

I'm not sure what the context of a table rule ought to be, but it will
need to be something with a non-nil :contents-begin value, since that
gets called in `org-ctrl-c-ctrl-c' as well.

Hope that's enough info...

Eric

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-14 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-14  8:43 small bug in table alignment Eric Abrahamsen
2013-03-14 11:23 ` Bastien

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).