Revert "org-table-eval-formula: Fix parsing of mode string when formula has ;"
This reverts commit 5af0625113
.
The commit broken handling custom `format' spec for formula results:
Reported-by: Daniel Clemente <n142857@gmail.com>
Link: https://orgmode.org/list/CAJKAhPDFrgZY6sgefxu85qjEXnE2_HkPCHzbDOLsAD4Je57z7w@mail.gmail.com
This commit is contained in:
parent
3f539bc3d6
commit
bae1b1fe70
|
@ -2491,13 +2491,7 @@ location of point."
|
|||
duration duration-output-format)
|
||||
;; Parse the format string. Since we have a lot of modes, this is
|
||||
;; a lot of work. However, I think calc still uses most of the time.
|
||||
(if (string-match
|
||||
(rx (group (0+ any)) ";"
|
||||
(group
|
||||
(1+ (or whitespace
|
||||
(seq (in "pnfse") (opt "-") (1+ digit))
|
||||
(in "tTUNLEDRFSu")))))
|
||||
formula)
|
||||
(if (string-match "\\(.*\\);\\(.*\\)" formula)
|
||||
(progn
|
||||
(setq fmt (concat (cdr (assoc "%" org-table-local-parameters))
|
||||
(match-string-no-properties 2 formula)))
|
||||
|
|
|
@ -2026,12 +2026,6 @@ See also `test-org-table/copy-field'."
|
|||
(equal "| 1 | 1 |"
|
||||
(org-test-with-temp-text "| 1 | <point> |"
|
||||
(org-table-eval-formula nil "$<" nil nil t)
|
||||
(buffer-string))))
|
||||
;; Do not disambiguate ; in the formula itself with mode string.
|
||||
(should
|
||||
(equal "| 1 | 1; |"
|
||||
(org-test-with-temp-text "| 1 | <point> |"
|
||||
(org-table-eval-formula nil "'(concat $1 \";\")" nil nil t)
|
||||
(buffer-string)))))
|
||||
|
||||
(ert-deftest test-org-table/field-formula-outside-table ()
|
||||
|
|
Loading…
Reference in New Issue