From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Sivokon Subject: Bug: TBLFM regexp doesn't account for possible white space after the pipe [8.2.2 (release_8.2.2-188-gc57372 @ /home/wvxvw/Projects/org-mode/lisp/)] Date: Fri, 08 May 2015 00:35:18 +0300 Message-ID: <87vbg42hrd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqTTJ-0003XF-A7 for emacs-orgmode@gnu.org; Thu, 07 May 2015 17:36:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqTTF-00088k-V2 for emacs-orgmode@gnu.org; Thu, 07 May 2015 17:36:45 -0400 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:34950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqTTF-00088U-OR for emacs-orgmode@gnu.org; Thu, 07 May 2015 17:36:41 -0400 Received: by wgyo15 with SMTP id o15so56134338wgy.2 for ; Thu, 07 May 2015 14:36:41 -0700 (PDT) Received: from wvxvvw-laptop (bzq-79-180-129-17.red.bezeqint.net. [79.180.129.17]) by mx.google.com with ESMTPSA id k9sm9338354wia.6.2015.05.07.14.36.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2015 14:36:40 -0700 (PDT) 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 --=-=-= Content-Type: text/plain Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. ------------------------------------------------------------------------ When evaluating a formula, the regular expression used to locate the formula will miss, if there is a white space after the rightmost pipe in the last row, i.e. |1|* #+tblfm: vsum($1) asterisk is where the extra space character appears. Attached is my attempt at patching it. Best, Oleg Emacs : GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.12) of 2015-05-03 on wvxvvw-laptop Package: Org-mode version 8.2.2 (release_8.2.2-188-gc57372 @ /home/wvxvw/Projects/org-mode/lisp/) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-TBLFM-regex-account-for-white-space-after-last-colum.patch Content-Description: Account for space after last column in tblfm regex >From b91aeaf01f8f4a11f55cc60bbfd9c75e64d73554 Mon Sep 17 00:00:00 2001 From: wvxvw Date: Fri, 8 May 2015 00:09:21 +0300 Subject: [PATCH] TBLFM regex account for white space after last column. --- lisp/org-table.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index a644008..3ca0e76 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -56,7 +56,7 @@ This can be used to add additional functionality after the table is sent to the receiver position, otherwise, if table is not sent, the functions are not run.") -(defvar org-table-TBLFM-begin-regexp "|\n[ \t]*#\\+TBLFM: ") +(defvar org-table-TBLFM-begin-regexp "|\s-*\n[ \t]*#\\+TBLFM: ") (defcustom orgtbl-optimized (eq org-enable-table-editor 'optimized) "Non-nil means use the optimized table editor version for `orgtbl-mode'. -- 2.1.0 --=-=-=--