[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] org-table-store-formulas bug
From: |
Matt Lundin |
Subject: |
[O] org-table-store-formulas bug |
Date: |
Sat, 28 Apr 2012 09:42:05 -0500 |
User-agent: |
Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux) |
The following commit introduced a bug that prevents org-table from
evaluating formulas inserted into fields:
1c203d8d196aa9b46ea9a455cb891fefe2179d52
Steps to replicate:
1. Enter a simple table:
| 3 |
| 2 |
|---|
| |
2. Add a formula:
| 3 |
| 2 |
|---|
| :address@hidden@2 |
3. Press tab to evaluate:
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
org-table-store-formulas((("@3$1" . #("@address@hidden" 0 5 (face org-formula
fontified t)))))
org-table-get-formula(#("@address@hidden" 0 5 (face org-formula fontified t))
t)
org-table-eval-formula((4) #("@address@hidden" 0 5 (face org-formula
fontified t)))
org-table-maybe-eval-formula()
org-table-next-field()
call-interactively(org-table-next-field)
org-cycle(nil)
call-interactively(org-cycle nil nil)
The problem is the if statement in org-table-store-formulas:
(if (looking-at "\\([ \t]*\n\\)*[ \t]*\\(#\\+tblfm:\\)\\(.*\n?\\)")
(progn
;; don't overwrite TBLFM, we might use text properties to store stuff
(goto-char (match-beginning 3))
(delete-region (match-beginning 3) (match-end 0)))
(org-indent-line-function)
(insert (match-string 2)))
Notice the (insert (match-string 2)). This fails because if there is
no looking-at match, then there will be no (match-string 2).
Best,
Matt
- [O] org-table-store-formulas bug,
Matt Lundin <=