From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: small bug in table alignment Date: Thu, 14 Mar 2013 16:43:03 +0800 Message-ID: <87620u74o8.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG3fe-0006vm-MF for emacs-orgmode@gnu.org; Thu, 14 Mar 2013 04:37:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG3fd-0001Ee-Oe for emacs-orgmode@gnu.org; Thu, 14 Mar 2013 04:37:54 -0400 Received: from plane.gmane.org ([80.91.229.3]:59483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG3fd-0001EI-I6 for emacs-orgmode@gnu.org; Thu, 14 Mar 2013 04:37:53 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UG3fv-0000eD-Lx for emacs-orgmode@gnu.org; Thu, 14 Mar 2013 09:38:11 +0100 Received: from 114.252.246.33 ([114.252.246.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Mar 2013 09:38:11 +0100 Received: from eric by 114.252.246.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Mar 2013 09:38:11 +0100 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: emacs-orgmode@gnu.org 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