diff options
author | Bastien Guerry <bzg@altern.org> | 2014-05-31 10:47:55 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-05-31 10:47:55 +0200 |
commit | 66db8836b5479e4ef8cd88319101d16ac8851848 (patch) | |
tree | ac55ad3db7432a2773caae9fcfaeddff21ea9122 | |
parent | 9f5e698679aecbed872a2030e4157e5e2b1d87e0 (diff) | |
download | org-mode-66db8836b5479e4ef8cd88319101d16ac8851848.tar.gz |
org-table.el (org-table-copy-down): Fix bug
* org-table.el (org-table-copy-down): When the text above does
not contain a number, fall back on incrementing by one.
-rw-r--r-- | lisp/org-table.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index d1f9686..8cd8f8b 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1183,8 +1183,10 @@ to a number. In the case of a timestamp, increment by days." (- (org-time-string-to-absolute txt) (org-time-string-to-absolute txt-up))) ((string-match org-ts-regexp3 txt) 1) - (t (- (string-to-number txt) - (string-to-number txt-up))))) + ((string-match "^[0-9]+\\(\.[0-9]+\\)?" txt-up) + (- (string-to-number txt) + (string-to-number (match-string 0 txt-up)))) + (t 1))) (t 1))) (if (not txt) (user-error "No non-empty field found") |