瀏覽代碼

Fix table formula editing bug

William Henney writes:

> Anyone have a clue what is going on here?
>
> Cheers
>
> Will
>
> * Arctan2 bug
> Activate the formula editor for the following table with =C-c '=, then
> exit without changing anything. Note what happens to the arctan2
> formula. For me, "arctan2" changes to "@2$20173232".
> | x | y | arctan | arctan2 |
> |---+---+--------+---------|
> | 1 | 1 |     45 |     45. |
> #+TBLFM: $3=arctan($1/$2)::$4=arctan2($1,$2)
>
> ** Versions
> Org 6.34trans, Aquamacs 2.0preview4, Emacs 23.1.92.1
Carsten Dominik 15 年之前
父節點
當前提交
baa8f05baf
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 5 0
      lisp/ChangeLog
  2. 3 0
      lisp/org-table.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2010-03-07  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-table.el (org-table-convert-refs-to-rc): Do not read arctan2
+	as a reference.
+
 2010-03-05  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-link-unescape): Solve issue with lower-case escapes.

+ 3 - 0
lisp/org-table.el

@@ -2799,6 +2799,9 @@ full TBLFM line."
 	     (not (equal ?. (aref s (max (- (match-beginning 0) 2) 0)))))
 	;; 3.e5 or something like this.
 	(setq start (match-end 0)))
+       ((member (match-string 1 s) '("arctan"))
+	;; function name, just advance
+	(setq start (match-end 0)))
        (t
 	(setq start (match-beginning 0)
 	      s (replace-match