diff options
author | Bastien Guerry <bzg@altern.org> | 2014-05-20 22:03:30 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-05-20 22:03:30 +0200 |
commit | b06dcf05a868f23334c8f9f430158c81687ed6b4 (patch) | |
tree | d3618d021a0f0e953d7737bd289c3716761a2733 | |
parent | 6fab5bf04b6ec182c86db1fc7b879b73e83809a8 (diff) | |
download | org-mode-b06dcf05a868f23334c8f9f430158c81687ed6b4.tar.gz |
org-table.el (org-table-eval-formula): Fix conversion of inactive timestamps
* org-table.el (org-table-eval-formula): Fix conversion of
inactive timestamps to active ones.
Thanks to Gang Chen for reporting this.
-rw-r--r-- | lisp/org-table.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index c952234..1d6bee0 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2712,7 +2712,8 @@ not overwrite the stored one." (or (fboundp 'calc-eval) (user-error "Calc does not seem to be installed, and is needed to evaluate the formula")) ;; Use <...> time-stamps so that Calc can handle them - (setq form (replace-regexp-in-string org-ts-regexp3 "<\\1>" form)) + (while (string-match (concat "\\[" org-ts-regexp1 "\\]") form) + (setq form (replace-match "<\\1>" nil nil form))) ;; I18n-ize local time-stamps by setting (system-time-locale "C") (when (string-match org-ts-regexp2 form) (let* ((ts (match-string 0 form)) |