mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-05 22:13:00 +00:00
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.
This commit is contained in:
parent
6fab5bf04b
commit
b06dcf05a8
|
@ -2712,7 +2712,8 @@ not overwrite the stored one."
|
||||||
(or (fboundp 'calc-eval)
|
(or (fboundp 'calc-eval)
|
||||||
(user-error "Calc does not seem to be installed, and is needed to evaluate the formula"))
|
(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
|
;; 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")
|
;; I18n-ize local time-stamps by setting (system-time-locale "C")
|
||||||
(when (string-match org-ts-regexp2 form)
|
(when (string-match org-ts-regexp2 form)
|
||||||
(let* ((ts (match-string 0 form))
|
(let* ((ts (match-string 0 form))
|
||||||
|
|
Loading…
Reference in a new issue